MCP server
The MCP server is a subcommand of the single oxcode binary: oxcode mcp. It is
a stdio server that exposes oxcode's read-only queries to coding agents (Claude,
Cursor, and others). It is the recommended way to give an agent code context. The
same bounded, PageRank-curated context arrives in one tool call instead of a CLI
the agent has to compose.
Setup
Index a project first, then point an MCP-capable agent at the server. The config shape is the same across clients:
{
"mcpServers": {
"oxcode": {
"command": "oxcode",
"args": ["mcp"]
}
}
}The server reads the .oxcode/ index from its working directory.
Tools
| Tool | Purpose |
|---|---|
oxcode_explore | One-call, PageRank-curated context for a task. The headline tool. |
oxcode_search | Keyword discovery over symbols. |
oxcode_callers / oxcode_callees | Walk the call graph in or out from a symbol. |
oxcode_symbol | Resolve a selector to its definition and source. |
oxcode_files | Find files relevant to a query. |
oxcode_status | Report index state. |
Why MCP is the headline
On the Tokio agent-task benchmark, the one-call oxcode_explore MCP tool cuts
tool calls 84%, tokens 74%, cost 57%, and wall time 60% versus the no-tool
baseline — exceeding codegraph's published reductions. The CLI arm, by contrast,
is statistically tied with the baseline: an agent treats a shell binary as a
supplement to its own grep/read, not a replacement. The gap was always tool
delivery, not index quality.
See Benchmarks for the full table.