Chibi can use tools from any MCP-compatible server — code intelligence, databases, APIs, or anything else with an MCP interface. MCP tools appear alongside built-in tools and plugins; the LLM uses them the same way.
A standalone daemon (chibi-mcp-bridge) manages MCP server lifecycles and proxies tool calls over TCP. Chibi starts the daemon automatically when MCP servers are configured.
chibi-core ──TCP──▶ chibi-mcp-bridge ──stdio──▶ local MCP server(s)
──HTTP──▶ remote MCP server(s)
The bridge:
- spawns local MCP servers as child processes (stdio transport)
- connects to remote MCP servers over HTTP (streamable HTTP transport)
- discovers their tools via the MCP protocol
- proxies tool calls from chibi to the correct server
- shuts down automatically after 5 minutes of inactivity
The bridge is built alongside chibi:
cargo install --path crates/chibi-mcp-bridgeOr if you installed chibi from the workspace root, it's already built.
Create ~/.chibi/mcp-bridge.toml:
[servers.serena]
command = "uvx"
args = ["serena"]
[servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"]Each server entry is either a local stdio server or a remote HTTP server — determined by which field is present.
Local server (spawns a child process):
| Field | Type | Description |
|---|---|---|
command |
string | Executable to run |
args |
string[] | Command-line arguments (optional) |
Remote server (connects via HTTP):
| Field | Type | Description |
|---|---|---|
url |
string | Full URL of the MCP endpoint |
headers |
table | HTTP headers to send with every request (optional) |
command and url are mutually exclusive — a server entry must have one or the other.
To connect to a remote MCP server, specify a url instead of a command:
[servers.remote-tools]
url = "https://mcp.example.com/mcp"For servers that require authentication, add a [servers.<name>.headers] table:
[servers.remote-tools]
url = "https://mcp.example.com/mcp"
[servers.remote-tools.headers]
Authorization = "Bearer sk-..."You can mix local and remote servers freely. A working example config covering
both transports is at examples/mcp-bridge.example.toml
— copy it to ~/.chibi/mcp-bridge.toml and fill in your tokens.
GitHub's official MCP server uses the remote HTTP transport and gives the LLM access to GitHub issues, pull requests, code search, and more:
[servers.github]
url = "https://api.githubcopilot.com/mcp/"
[servers.github.headers]
Authorization = "Bearer YOUR_GITHUB_PAT"Generate a PAT at https://github.com/settings/tokens with repo, issues,
and pull_requests scopes.
That's it. On the next chibi invocation, MCP tools are loaded automatically:
chibi -v "Find the parse function in my codebase"
# [MCP: 42 tools loaded]Tools are named <server>_<tool> (e.g. serena_find_symbol) and the LLM can call them directly.
The full mcp-bridge.toml format:
# How long the bridge stays alive without requests (default: 5)
idle_timeout_minutes = 5
# LLM-powered tool summary generation (optional)
[summary]
enabled = true # set to false to disable
model = "ratatoskr:free/summariser" # default
# Local MCP server (stdio transport)
[servers.local-name]
command = "path/to/server"
args = ["--flag", "value"]
# Remote MCP server (streamable HTTP transport)
[servers.remote-name]
url = "https://mcp.example.com/mcp"
[servers.remote-name.headers]
Authorization = "Bearer sk-..."The bridge can generate concise one-sentence summaries of MCP tool descriptions using an LLM. This runs in the background on first startup and caches results in ~/.chibi/mcp-bridge/cache.jsonl. Summaries are regenerated automatically when a tool's schema changes.
To disable summary generation entirely, set enabled = false in the [summary] section. When disabled, no summaries are generated and existing cached summaries are ignored. Re-enabling picks up where it left off — the cache remains intact on disk.
MCP tools use virtual mcp://server/tool paths internally. From the LLM's perspective, they're indistinguishable from regular tools.
- chibi checks for
~/.chibi/mcp-bridge.toml— if absent, MCP is skipped entirely - chibi reads
~/.chibi/mcp-bridge.lockto find a running bridge - if no bridge is running, chibi spawns one as a detached process
- the bridge binds to a random localhost port, writes its address to the lockfile
- chibi sends
list_toolsover TCP, receives tool definitions - tool calls are proxied via
call_toolrequests - the bridge shuts down after
idle_timeout_minutesof inactivity
| Path | Purpose |
|---|---|
~/.chibi/mcp-bridge.toml |
server definitions and bridge config |
~/.chibi/mcp-bridge.lock |
daemon lockfile (pid, address, timestamp) |
~/.chibi/mcp-bridge/cache.jsonl |
cached tool summaries |
The bridge speaks JSON-over-TCP (one JSON object per connection, newline-delimited):
{"op": "list_tools"}
{"op": "call_tool", "server": "serena", "tool": "find_symbol", "args": {...}}
{"op": "get_schema", "server": "serena", "tool": "find_symbol"}- Using the MCP bridge with Serena — complete walkthrough using a semantic code intelligence server
"MCP: bridge unavailable" — the bridge binary isn't in PATH or next to the chibi binary. Run cargo install --path crates/chibi-mcp-bridge.
Tools not appearing — check that mcp-bridge.toml exists and is valid TOML. Run chibi -v to see diagnostic output.
Stale lockfile — if the bridge crashes, its lockfile may persist. Chibi detects stale lockfiles (via PID liveness check) and cleans them up automatically, but you can also delete ~/.chibi/mcp-bridge.lock manually.