Octri API Docs
概览
作者提供的说明(英文原文)
Search an Octri project's API docs and call its endpoints as tools, shaped by its SDK Studio config.
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i起步阶段↓ 744/周 · ★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 搜索与 AI 记忆
- 你需要填写:OCTRI_PROJECT_ID, OCTRI_API_TOKEN, OCTRI_API_KEY, OCTRI_API_PASSWORD
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
OCTRI_PROJECT_ID,OCTRI_API_BASE_URL,OCTRI_API_TOKEN,OCTRI_API_KEY,OCTRI_API_KEY_HEADER,OCTRI_API_USERNAME,OCTRI_API_PASSWORD
标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
- npm已安装 Node.js(用于 npx 命令)
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
链接指向作者自己的文件;我们不托管也不重新打包它。打开文件后,Claude Desktop 会进行安装。
在终端中运行这条命令
claude mcp add octri --env OCTRI_PROJECT_ID=your-value --env OCTRI_API_BASE_URL=your-value --env OCTRI_API_TOKEN=your-value --env OCTRI_API_KEY=your-value --env OCTRI_API_KEY_HEADER=your-value --env OCTRI_API_USERNAME=your-value --env OCTRI_API_PASSWORD=your-value -- npx -y @octri/mcp运行前请先填写空着的值。
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"octri": {
"command": "npx",
"args": [
"-y",
"@octri/mcp"
],
"env": {
"OCTRI_PROJECT_ID": "your-value",
"OCTRI_API_BASE_URL": "your-value",
"OCTRI_API_TOKEN": "your-value",
"OCTRI_API_KEY": "your-value",
"OCTRI_API_KEY_HEADER": "your-value",
"OCTRI_API_USERNAME": "your-value",
"OCTRI_API_PASSWORD": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"octri": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@octri/mcp"
],
"env": {
"OCTRI_PROJECT_ID": "your-value",
"OCTRI_API_BASE_URL": "your-value",
"OCTRI_API_TOKEN": "your-value",
"OCTRI_API_KEY": "your-value",
"OCTRI_API_KEY_HEADER": "your-value",
"OCTRI_API_USERNAME": "your-value",
"OCTRI_API_PASSWORD": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
- The Octri project whose docs and endpoints this server exposes.
OCTRI_API_BASE_URLenvBase URL for endpoint calls. Defaults to the Base URL set in the project's SDK Studio.- Bearer or OAuth2 token for the documented API, not for Octri.
- API key for the documented API, not for Octri. Sent in the OCTRI_API_KEY_HEADER header.
OCTRI_API_KEY_HEADERenvHeader that carries OCTRI_API_KEY.OCTRI_API_USERNAMEenvBasic-auth username for the documented API.- Basic-auth password for the documented API.
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过域名 octri.dev 验证(注册中心会核实域名所有权)
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“搜索与 AI 记忆”中的其他服务器比较i
- 星标数多于此分类中其他 5716 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5716 个服务器的 90% 更新
- 基础检查结果等于或优于此分类中其他 5716 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Octri API Docs 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:OCTRI_PROJECT_ID, OCTRI_API_TOKEN, OCTRI_API_KEY, OCTRI_API_PASSWORD
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(1.4.2)于4天前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js, MCPB。
有什么可以替代它?
同一分类中有:Context7, Codebase Memory, Exa
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Codebase Memory
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Exa
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
@octri/mcp
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.
Install
npx -y @octri/mcp
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.
Listed in the official MCP Registry as dev.octri/mcp.
Tools
| Tool | Description |
|---|---|
search_docs | Search the API documentation for an endpoint or concept |
get_endpoint | Get full documentation for a specific API endpoint |
list_endpoints | List all available API endpoints, optionally filtered by section |
get_changelog | Get recent API changes and breaking changes |
list_sdks | List the available SDK client libraries (languages, versions, download links) |
get_guide | Get the full content of a written guide by its slug |
get_sdk_methods | Get ready-to-use SDK code snippets for each endpoint in every supported language |
Installation
Claude Desktop
One click: download octri-mcp- .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):
{
"mcpServers": { "my-api-docs": { "command": "npx", "args": ["@octri/mcp", "--project-id", "YOUR_PROJECT_ID"] } } }
Cursor
Add to .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):
{
"mcpServers": { "my-api-docs": { "command": "npx", "args": ["@octri/mcp"], "env": { "OCTRI_PROJECT_ID": "YOUR_PROJECT_ID" } } } }
VS Code (Copilot / MCP extension)
Add to .vscode/mcp.json:
{
"servers": { "my-api-docs": { "type": "stdio", "command": "npx", "args": ["@octri/mcp", "--project-id", "YOUR_PROJECT_ID"] } } }
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
OCTRI_PROJECT_ID | Yes* | None | The project to connect to. Can also be set via --project-id CLI flag. |
OCTRI_GROUP | No | None | Serve only one tool group the project owner published (for example billing). Can also be set via --group. A group the project does not have serves no tools. |
OCTRI_SKIP_PROMPTS | No | None | Prompts to leave out, by name, comma-separated. Can also be set via --skip-prompts. The project's Claude Code plugin sets it for the prompts it already ships as slash commands, so each shows once. |
OCTRI_API_URL | No | https://api.octri.dev/api/v1 | Override the API base URL for local development or an authorized private test endpoint. Hosted Octri self-hosting is not available. |
MCP_TRANSPORT | No | stdio | http for remote hosting (Streamable HTTP), or sse for the legacy transport. |
PORT | No | 3000 | HTTP port for the http and sse transports. |
MCP_HOST | No | 127.0.0.1 | Interface to bind. Widening it requires MCP_AUTH_TOKEN. |
MCP_ALLOWED_ORIGINS | No | None | Comma-separated browser origins allowed to reach an HTTP transport. |
MCP_AUTH_TOKEN | When MCP_HOST is not loopback | None | Bearer token every HTTP request must send as Authorization: Bearer . |
\* Required unless every tool call passes projectId explicitly.
Credentials for the API being called
Operation tools call your real API, and these supply its credentials:
| Variable | Description |
|---|---|
OCTRI_API_BASE_URL | Target API base for operation calls (falls back to the studio's Base URL). |
OCTRI_API_TOKEN | Bearer / OAuth2 token. |
OCTRI_API_KEY (+ OCTRI_API_KEY_HEADER) | API-key value, and the header it goes in (default X-API-Key). |
OCTRI_API_USERNAME / OCTRI_API_PASSWORD | Basic-auth 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.
Permissions
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:
| Variable | Flag | Effect |
|---|---|---|
OCTRI_READ_ONLY=1 | --read-only | List and run only tools that read. |
OCTRI_DENY_TOOLS=a,b | --deny-tools a,b | Never list or run these tools. Matches a tool's name, its endpoint slug, or the name it had before the project owner renamed it. |
OCTRI_ALLOW_TOOLS=a,b | --allow-tools a,b | Run these "ask first" tools without asking (* for all). Matches a tool's current name or its endpoint slug; after a rename, an old name asks again. |
OCTRI_ALLOW_WRITES=1 | --allow-writes | Same as OCTRI_ALLOW_TOOLS=*. |
OCTRI_DRY_RUN=1 | --dry-run | Build each call and return it to the agent unsent. |
OCTRI_PRACTICE=1 | --practice | Practice mode: answer every call with fake data built from the API's documentation, keeping records the agent creates for the session. Nothing is sent and no credential is needed. The project's owner must turn practice mode on. |
Tool groups
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 (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/ /g/ /mcp.
Usage reporting
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.
Remote hosting
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:
docker build -t octri-mcp .
docker run -p 3000:3000 \ -e MCP_AUTH_TOKEN= \ -e OCTRI_PROJECT_ID=YOUR_PROJECT_ID \ octri-mcp
The image binds all interfaces, so it refuses to start without MCP_AUTH_TOKEN; clients send it as Authorization: Bearer . 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.
Legacy HTTP+SSE transport
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= to relay client messages. Prefer http for anything new.
Binding and origins
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 . Configure the same header in your MCP client, and list browser origins explicitly.
Check your setup
npx -y @octri/mcp doctor --project-id YOUR_PROJECT_ID
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.
Keep the credential out of the config
npx -y @octri/mcp login --project-id YOUR_PROJECT_ID
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.
Local development
# Build
pnpm build
Run in stdio mode
OCTRI_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 mode
MCP_TRANSPORT=sse OCTRI_PROJECT_ID=my-project node dist/index.js
As a library
The octri-mcp command is one host for the server core. createServer takes the tool source and everything else a host decides:
只显示了开头部分;其余内容请在仓库中阅读