search_docs
Search the API documentation for an endpoint or concept
limitquery必填projectIddev.octri由 octri.dev 发布v1.4.2更新于 Nov 5, 2026
Search an Octri project's API docs and call its endpoints as tools, shaped by its SDK Studio config.
把 Octri 项目的 API 文档与端点变成工具,让助手能搜索文档、阅读指南并调用真实 API。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
An MCP server that turns your API documentation into tools an AI assistant can call. Claude, Cursor, VS Code Copilot, and any other MCP client can search your endpoints, open a guide, pull a ready-to-use SDK snippet in any supported language, and check the changelog for breaking changes, all from the same OpenAPI spec your docs are built from.
Octri turns an OpenAPI spec into a documentation site, client SDKs for ten languages, an MCP server your AI assistant can call, and monitoring for the API behind them. This package is the MCP server. See octri.dev/mcp.
Node 20 or newer. Runs over stdio for a local client, or Streamable HTTP when you host it.
Operation bodies use documented media type. For multipart or binary values,
pass files only as bounded inline descriptor:
{ "filename": "report.csv", "content": "base64...", "contentType": "text/csv" }.
Paths and URLs are intentionally unsupported.
Explicit URL-encoded deepObject fields with explode: true use bracketed
wire keys, including nested objects and arrays. This covers APIs such as Stripe
that mark fields like invoice_settings and tax_id_data as deepObject.
Most clients are configured with that command, so a global install is optional. The Installation section below has the exact config block for each one.
Or install it in one click. VS Code asks for your project ID; Cursor writes
YOUR_PROJECT_ID into its mcp.json for you to replace.
[Add to Cursor] [Install in VS Code]
Listed in the official MCP Registry as dev.octri/mcp.
One click: download octri-mcp-<version>.mcpb from the
latest release and open
it. Claude Desktop installs the server and asks for the project ID and the
API's credentials, keeping secrets in the system keychain. No Node install, no
config file.
Or by hand: add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Add to .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):
Add to .vscode/mcp.json:
* Required unless every tool call passes projectId explicitly.
Operation tools call your real API, and these supply its credentials:
All of these are sent as HTTP headers. An API that takes its credentials in
the request body instead (Plaid's client_id and secret, for example) is
not served by them: those are ordinary body fields, so they appear as tool
arguments and the agent passes them like any other field. Setting
OCTRI_API_KEY for such an API adds a header it ignores.
The project owner sets every operation tool to run on its own, ask first, or off, and publishes that from the MCP page. Reads run on their own by default and everything else asks first. An "ask first" call is shown to the user through MCP elicitation (Claude Code 2.1.76+, VS Code) with its method, URL and body, and is sent only on approval. A client that cannot ask is refused the call instead.
These narrow what the owner allowed. Only ALLOW widens anything, and nothing
brings back a tool the owner turned off:
A project owner can split the tools into groups, each served as its own MCP
server, so a team connects only the tools a job needs. Pass --group <slug> (or
set OCTRI_GROUP) to serve one. Inside a group every tool keeps the owner's
permissions and the limits above: a group only takes tools away. Each group can
also be reached hosted, at https://api.octri.dev/api/v1/public/mcp/<project id>/g/<group>/mcp.
Each tool call reports its tool name, outcome, duration, tool group (when one is
served) and the client's name to
Octri, so the project owner can see which tools agents use. Arguments and
responses are never sent. Set OCTRI_TELEMETRY=0 or pass --no-telemetry to
turn it off.
Use Streamable HTTP (MCP_TRANSPORT=http), the transport the MCP spec has
defined for remote servers since revision 2025-03-26 and the one a current
client tries first:
The image binds all interfaces, so it refuses to start without
MCP_AUTH_TOKEN; clients send it as Authorization: Bearer <token>. It runs as
a non-root user, and GET /health answers a container or load balancer probe
without the token.
It serves a single endpoint, /mcp. A client's first request opens a session
and gets its id back in the mcp-session-id header; every later request
carries it and reaches the same server. That is what lets a tool that asks
first work: the approval prompt goes out in the middle of a call and the
answer comes back on another request. Sessions idle for 30 minutes are closed.
Behind more than one replica, route by mcp-session-id (sticky sessions).
Point a remote MCP client at http://your-host:3000/mcp.
MCP_TRANSPORT=sse serves the older 2024-11-05 design, kept so existing
deployments keep working. It exposes GET /sse to open a connection and
POST /messages?sessionId=<id> to relay client messages. Prefer http for
anything new.
Both HTTP transports bind 127.0.0.1 by default and refuse any request whose
Origin is not listed in MCP_ALLOWED_ORIGINS, or whose Host is not
loopback. This server holds your API credentials, and any page the browser
visits can reach a loopback port.
Widening MCP_HOST puts those credentials on the network, so the server then
refuses to start without MCP_AUTH_TOKEN, and every request must send
Authorization: Bearer <token>. Configure the same header in your MCP client,
and list browser origins explicitly.
Confirms the project and its tools load, the base URL and credentials are set,
and makes one real read call, then says what to fix if anything fails.
--no-call skips the call. Exits non-zero on a failure.
Asks for the API credential the project's scheme needs and saves it in your
system keychain (macOS Keychain, Windows Credential Manager, or the Secret
Service on Linux). Your MCP client's config then needs no OCTRI_API_*
variable. A variable set in the config still wins. logout removes it.
The keychain store, @napi-rs/keyring, is an optional dependency. Where it
cannot install or the system has no secret store, login says so and env
variables work as before.
The octri-mcp command is one host for the server core. createServer takes
the tool source and everything else a host decides:
A static source serves Octri's documentation tools, and reports usage, only
when it is given an Octri project (octri: { apiUrl, projectId }).
Requires an npm account with access to the @octri scope. pack:mcpb writes
the MCP Bundle and points server.json at it on the GitHub release, so upload
that exact file before mcp-publisher publish.
Node · Python · Go · Ruby · Rust · PHP · Java · Kotlin · Swift · Dart
Documentation · Pricing · Changelog
MIT licensed.
来源:README.md,提交 5acb0d4
Search the API documentation for an endpoint or concept
limitquery必填projectIdGet full documentation for a specific API endpoint
slug必填projectIdList the API's endpoints and guides, grouped by section. A large API lists its sections with endpoint counts instead: pass `section` to list one of them.
sectionprojectIdGet recent API changes and breaking changes
projectIdbreakingOnlyList the available SDK client libraries for this API (languages, versions, and download links)
projectIdGet the full content of a written guide (tutorial / conceptual doc) by its slug
slug必填groupSlugprojectIdShow how to call this API through its generated SDKs. With `slug` (from list_endpoints or search_docs): ready-to-use code for that endpoint in every SDK language, or in one with `language` (e.g. typescript, python, go). Without `slug`: the index of SDK methods, one line per endpoint.
sluglanguageprojectId已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
npx -y @octri/mcp{ "mcpServers": { "my-api-docs": { "command": "npx", "args": ["@octri/mcp", "--project-id", "YOUR_PROJECT_ID"] } }}{ "mcpServers": { "my-api-docs": { "command": "npx", "args": ["@octri/mcp"], "env": { "OCTRI_PROJECT_ID": "YOUR_PROJECT_ID" } } }}{ "servers": { "my-api-docs": { "type": "stdio", "command": "npx", "args": ["@octri/mcp", "--project-id", "YOUR_PROJECT_ID"] } }}docker build -t octri-mcp .
docker run -p 3000:3000 \ -e MCP_AUTH_TOKEN=<a long random token> \ -e OCTRI_PROJECT_ID=YOUR_PROJECT_ID \ octri-mcpnpx -y @octri/mcp doctor --project-id YOUR_PROJECT_IDnpx -y @octri/mcp login --project-id YOUR_PROJECT_ID# Buildpnpm build
# Run in stdio modeOCTRI_PROJECT_ID=my-project node dist/index.js
# Run in Streamable HTTP mode (POST /mcp)MCP_TRANSPORT=http OCTRI_PROJECT_ID=my-project node dist/index.js
# Run in the legacy SSE modeMCP_TRANSPORT=sse OCTRI_PROJECT_ID=my-project node dist/index.jsimport { createServer, startStdio, processEnv, loadUserPermissions } from "@octri/mcp";
const env = processEnv("ACME"); // reads ACME_API_TOKEN, ACME_ALLOW_TOOLS, ...await startStdio(() => createServer({ // "live" fetches tools from the Octri API; "static" serves a fixed manifest. source: { kind: "static", manifest }, branding: { name: "acme-mcp", version: "2.4.0" }, env, permissions: loadUserPermissions(process.argv.slice(2), env), }),);pnpm buildpnpm pack:mcpbnpm publish --access publicgh release upload v<version> octri-mcp-<version>.mcpb --repo octridev/octri-mcpmcp-publisher publish