Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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

ToolPurpose
oxcode_exploreOne-call, PageRank-curated context for a task. The headline tool.
oxcode_searchKeyword discovery over symbols.
oxcode_callers / oxcode_calleesWalk the call graph in or out from a symbol.
oxcode_symbolResolve a selector to its definition and source.
oxcode_filesFind files relevant to a query.
oxcode_statusReport 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.