Expand description
MCP (Model Context Protocol) server implementation for ctx.
This module exposes ctx’s code intelligence capabilities via the MCP protocol, allowing AI assistants like Claude to query codebases through standardized tools.
§Available Tools
search_symbols: Search for symbols by name patternget_definition: Get the source code for a symbolfind_references: Find all references to a symbolget_callers: Get functions that call a given functionget_callees: Get functions called by a given functionget_file: Read a file’s contentsget_file_tree: List files in the projectsmart_context: Intelligently select files for a task
§Usage
Start the MCP server with:
ctx serve --mcpConfigure Claude Desktop by adding to claude_desktop_config.json:
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": ["serve", "--mcp"],
"cwd": "/path/to/your/project"
}
}
}Re-exports§
pub use server::run_mcp_server;pub use server::CtxServer;