-
Notifications
You must be signed in to change notification settings - Fork 1
MCP Integration EN
zhenhun edited this page Sep 4, 2026
·
1 revision
中文 | English
BIT can connect to external MCP (Model Context Protocol) servers to extend its tool set.
MCP server configuration is stored in mcp_servers.json in the data directory:
[
{
"id": "my-server",
"name": "my-server",
"url": "http://127.0.0.1:9801/mcp"
}
]- Transport protocol: Streamable HTTP
- On startup, BIT automatically performs the
initializehandshake with each server, negotiates the protocol version, and stores the returnedMcp-Session-Id(all subsequent requests must carry it) - Non-MCP servers are rejected (endpoints that fail the
initializecheck are not adopted) - Once connected, the tools reported by the server appear automatically on the Tools page, ready for the AI to call
App data directory (identifier: com.bit.hub):
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/com.bit.hub/ |
| Linux |
~/.local/share/com.bit.hub/ (or the XDG data dir) |
| Windows | %APPDATA%/com.bit.hub/ |
MCP integration triggers a tools-updated event; the frontend and the tool registry hot-reload without restarting the app.
BIT's remote HTTP service also exposes a standard MCP endpoint (POST /mcp, Streamable HTTP / JSON-RPC 2.0). Any standard MCP client (Claude Desktop, Cherry Studio, MCP Inspector, etc.) can connect to every enabled BIT tool:
-
Authentication: same as the OpenAI-compatible endpoints —
Authorization: Bearer <Client Key>or the?key=query parameter - Protocol version negotiation: supports 2024-11-05 / 2025-03-26 / 2025-06-18; if the client's requested version is in the supported list it is echoed back, otherwise the latest supported version is returned
-
Session management: the
initializeresponse returns anMcp-Session-Idheader that all subsequent requests must carry (missing → 400 / expired → 404; sessions idle out after 30 minutes) -
JSON-RPC batch: a POST with an array is processed entry by entry;
DELETE /mcpexplicitly terminates a session;GET /mcpreturns 405 (no server-push stream)
- Server unreachable: that server's tools won't appear in the tool list; check the URL and the network
- Version negotiation failure: check the
mcp.*records in the Audit Log - Session invalidated (server restarted): BIT re-runs
initializeafter the next call fails
中文
- 首页
- 使用:安装指南 · 芯片与操作系统支持 · 快速上手 · 对话功能 · TUI-终端模式 · FAQ
- 进阶:工具系统 · MCP-集成 · 记忆与技能 · 远程访问与-API · 自动更新 · 审计日志
- 参与:开发与构建
English
- Home
- Usage: Installation Guide · Chips & OS Support · Quick Start · Chat Features · TUI Terminal Mode · FAQ
- Advanced: Tool System · MCP Integration · Memory & Skills · Remote Access & API · Auto Update · Audit Log
- Development: Development & Build