Octocode — Claude Code MCP server: what it does, how to install
Indexes codebases using AST parsing and semantic search to map file dependencies, symbol calls, and project structure for AI agents.
claude mcp add octocode -- npx -y @muvon/octocodeWhat Octocode does
Octocode is written in Rust. It parses project files via tree-sitter AST syntax trees. Instead of treating code as flat text chunks, it maps relationships directly. It extracts imports, function calls, and interface implementations. The server exposes semantic_search, graphrag, structural_search, and view_signatures over MCP.
AST graph navigation runs on the fly without an external LLM or precomputed embeddings. The graph builds directly from source. Hybrid search combines dense vectors with BM25 keyword matching. Exact identifier searches stay intact. An optional persistent GraphRAG index adds high-level module descriptions.
What it helps with
- find all call sites of a function across files
- trace imports and downstream dependencies for a module
- inspect code signatures without reading whole files
- locate functions by intent using hybrid vector and keyword search
Example prompts for the agent
- Locate every caller of
process_paymentin the repository - Which files import the authentication middleware and what functions do they run?
- Run a semantic search for JWT token verification logic
How to install Octocode
Platform CLI
claude mcp add octocode -- npx -y @muvon/octocodePlatform CLI
codex mcp add octocode -- npx -y @muvon/octocodeConfig file
{
"mcpServers": {
"octocode": {
"command": "npx",
"args": [
"-y",
"@muvon/octocode"
]
}
}
}Config file
{
"servers": {
"octocode": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@muvon/octocode"
]
}
}
}Platform CLI
gemini mcp add octocode npx -y @muvon/octocodeStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Octocode
How do I install Octocode in Claude Code?
Run claude mcp add octocode -- npx -y @muvon/octocode in your terminal. Claude Code registers the MCP server immediately.
What does Octocode do?
It creates a code knowledge graph using tree-sitter syntax trees and indexes code for semantic search. AI assistants can query function calls, dependencies, and signatures without reading entire files.
Does Octocode require an API key to build the code graph?
No, the default graphrag tool builds symbol and dependency maps dynamically without an LLM or vector embeddings. External models are only needed if you turn on the optional persistent file enrichment.