MCP Server
Configuration
Every setting is an environment variable. Only OCTRI_PROJECT_ID is required, and --project-id overrides it.
Selecting the project
| Variable | Default | Purpose |
|---|---|---|
OCTRI_PROJECT_ID | None | The project to expose. Required |
OCTRI_API_URL | https://api.octri.dev/api/v1 | The Octri API to read docs from. Override for self-hosted |
OCTRI_API_URL is where the server reads documentation from. It is not your API.
Calling your API
Only needed for operation tools.
| Variable | Default | Purpose |
|---|---|---|
OCTRI_API_BASE_URL | SDK Studio Base URL | The target API that operation tools call |
OCTRI_API_TOKEN | None | Bearer or OAuth2 token |
OCTRI_API_KEY | None | API key value |
OCTRI_API_KEY_HEADER | X-API-Key | Header to send the API key in |
OCTRI_API_USERNAME | None | Basic auth username |
OCTRI_API_PASSWORD | None | Basic auth password |
OCTRI_API_URL reads your docs from Octri. OCTRI_API_BASE_URL is your own API, the thing operation tools call. Mixing them up produces a server that lists tools and fails every call.
Transport
| Variable | Default | Purpose |
|---|---|---|
MCP_TRANSPORT | stdio | stdio or sse |
PORT | 3000 | Listening port for sse |
See Transports.
Credentials live in a config file
.cursor/mcp.json in a repo root is the natural place to put this, and it's also a file people commit without thinking. A token there is a token in your history.
Use a scoped, revocable key rather than a long-lived admin token, and keep the file out of version control if it carries one.
Safer patterns:
Auth scheme
The credential you set should match your API's scheme, which is also what your SDK's auth uses. An API generating bearer SDKs pairs with OCTRI_API_TOKEN.