xrefcode.com / docs / cli / mcp
$ xref mcp
On this page
Serve a read-only MCP server over stdio for one binary. An agent (Claude Code, Codex, any MCP client) gets the xref_query tool with the same operations as query, against one immutable image identified by its SHA-256. With --allow-live-pid PID it also gets the opt-in xref_live tool, pinned to that verified process.
Usage
xref mcp [OPTIONS]
Arguments and options
Options
--allow-live-pid <PID>Explicitly enable the PID-bound
xref_live MCP tool for this single verified Linux process.Configure a client
JSON
{
"mcpServers": {
"xref": { "command": "xref", "args": ["-b", "/path/to/binary", "mcp"] }
}
}The server reads JSON-RPC from stdin and writes responses to stdout; it never writes anything else to stdout. For field it keeps the image, the whole-image scan and the writer index in memory, so later queries reuse them.
Request shapes, budgets, pagination and errors: Structured queries and local MCP.
Limits
- One binary per server process; start another server for another binary.
xref_liveexists only with--allow-live-pid, on Linux x86-64.
Source: docs/cli/mcp.md · generated for the site; edit the Markdown, not this page.