Octri API Docs — Claude Code MCP server: turn API docs into tools
Wires your Octri API documentation into an AI assistant so it can search endpoints, pull SDK snippets and run real calls.
claude mcp add --env OCTRI_PROJECT_ID=<OCTRI_PROJECT_ID> --env OCTRI_API_BASE_URL=<OCTRI_API_BASE_URL> --env OCTRI_API_TOKEN=<OCTRI_API_TOKEN> --env OCTRI_API_KEY=<OCTRI_API_KEY> --env OCTRI_API_KEY_HEADER=<OCTRI_API_KEY_HEADER> --transport stdio octri-api-docs -- npx -y @octri/mcpWhat Octri API Docs does
This server reads the OpenAPI spec behind your Octri docs site and exposes it as a set of tools. The assistant searches the docs, opens a single endpoint, lists everything available, reads a guide by slug, checks the SDK list and looks at recent breaking changes. It also hands back ready-made code samples for each endpoint in the supported languages.
Run it over stdio for a local client, or as Streamable HTTP when you host it yourself. Node 20 or newer is required, plus an Octri project ID passed through OCTRI_PROJECT_ID or the --project-id flag. Skip both and every tool call has to carry projectId on its own. Calls against your live API take credentials from OCTRI_API_TOKEN, OCTRI_API_KEY with OCTRI_API_KEY_HEADER, or a OCTRI_API_USERNAME / OCTRI_API_PASSWORD pair. They all travel as HTTP headers, so an API that expects its keys in the request body — Plaid with client_id and secret, say — will not see them; the agent passes those as ordinary tool arguments instead.
The project owner decides what each operation tool may do: run on its own, ask first, or stay off. Reads run by default, everything else asks. An approval prompt appears through MCP elicitation (Claude 2.1.76+ and VS Code), and the call only leaves after you accept. A client that cannot prompt is refused. Flags like --read-only, --deny-tools and --allow-tools narrow what the owner already permitted; none of them re-enable a tool that was switched off.
What it helps with
- find the right endpoint by description instead of guessing
- grab a working SDK snippet for one method
- check whether an API update breaks existing code
- call an endpoint from the assistant with real credentials
- read a full integration guide inside the chat
Example prompts for the agent
- Search the docs for the endpoint that creates a payment
- Give me the SDK snippet for that method in Python
- Show the latest breaking changes in the API
How to install Octri API Docs
Platform CLI
claude mcp add --env OCTRI_PROJECT_ID=<OCTRI_PROJECT_ID> --env OCTRI_API_BASE_URL=<OCTRI_API_BASE_URL> --env OCTRI_API_TOKEN=<OCTRI_API_TOKEN> --env OCTRI_API_KEY=<OCTRI_API_KEY> --env OCTRI_API_KEY_HEADER=<OCTRI_API_KEY_HEADER> --transport stdio octri-api-docs -- npx -y @octri/mcpReplace <…> with your own values. 2 more environment variables are in the server README
Platform CLI
codex mcp add octri-api-docs --env OCTRI_PROJECT_ID=<OCTRI_PROJECT_ID> --env OCTRI_API_BASE_URL=<OCTRI_API_BASE_URL> --env OCTRI_API_TOKEN=<OCTRI_API_TOKEN> --env OCTRI_API_KEY=<OCTRI_API_KEY> --env OCTRI_API_KEY_HEADER=<OCTRI_API_KEY_HEADER> -- npx -y @octri/mcpReplace <…> with your own values. 2 more environment variables are in the server README
Config file
{
"mcpServers": {
"octri-api-docs": {
"command": "npx",
"args": [
"-y",
"@octri/mcp"
],
"env": {
"OCTRI_PROJECT_ID": "<OCTRI_PROJECT_ID>",
"OCTRI_API_BASE_URL": "<OCTRI_API_BASE_URL>",
"OCTRI_API_TOKEN": "<OCTRI_API_TOKEN>",
"OCTRI_API_KEY": "<OCTRI_API_KEY>",
"OCTRI_API_KEY_HEADER": "<OCTRI_API_KEY_HEADER>"
}
}
}
}Replace <…> with your own values. 2 more environment variables are in the server README
Config file
{
"servers": {
"octri-api-docs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@octri/mcp"
],
"env": {
"OCTRI_PROJECT_ID": "<OCTRI_PROJECT_ID>",
"OCTRI_API_BASE_URL": "<OCTRI_API_BASE_URL>",
"OCTRI_API_TOKEN": "<OCTRI_API_TOKEN>",
"OCTRI_API_KEY": "<OCTRI_API_KEY>",
"OCTRI_API_KEY_HEADER": "<OCTRI_API_KEY_HEADER>"
}
}
}
}Replace <…> with your own values. 2 more environment variables are in the server README
Platform CLI
gemini mcp add -e OCTRI_PROJECT_ID=<OCTRI_PROJECT_ID> -e OCTRI_API_BASE_URL=<OCTRI_API_BASE_URL> -e OCTRI_API_TOKEN=<OCTRI_API_TOKEN> -e OCTRI_API_KEY=<OCTRI_API_KEY> -e OCTRI_API_KEY_HEADER=<OCTRI_API_KEY_HEADER> octri-api-docs npx -y @octri/mcpReplace <…> with your own values. 2 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Octri API Docs
How do I install Octri API Docs in Claude Code?
Run `claude mcp add mcp -e OCTRI_PROJECT_ID=<OCTRI_PROJECT_ID> -e OCTRI_API_TOKEN=<OCTRI_API_TOKEN> -e OCTRI_API_KEY=<OCTRI_API_KEY> -e OCTRI_API_PASSWORD=<OCTRI_API_PASSWORD> -- npx -y @octri/mcp. The other form names the transport: claude mcp add --env OCTRI_PROJECT_ID=<OCTRI_PROJECT_ID> --env OCTRI_API_BASE_URL=<OCTRI_API_BASE_URL> --env OCTRI_API_TOKEN=<OCTRI_API_TOKEN> --env OCTRI_API_KEY=<OCTRI_API_KEY> --env OCTRI_API_KEY_HEADER=<OCTRI_API_KEY_HEADER> --transport stdio octri-api-docs -- npx -y @octri/mcp`.
What does Octri API Docs do?
It gives the assistant tools over your API documentation: search, full endpoint details, endpoint listing, written guides, the SDK list, per-endpoint code snippets and the changelog with breaking changes.
Does it need credentials for the API it calls?
Yes, for real requests. A token, an API key or basic-auth values go in as environment variables and are sent as headers. APIs that want their keys in the body get them as tool arguments.