
mcp-code-indexer
Turns a TypeScript or React repo into a queryable code graph for AI agents and developers
The repository was last updated 63 days ago and is published under MIT.
mcp-code-indexer is an open-source MCP server for developer tools. It is available on CLI, API, Self-hosted and Web.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- GitHub stars
- 2
- Last commit
- Language
- TypeScript
- License
- MIT
Similar MCP servers
About mcp-code-indexer
Code Graph Indexer reads a TypeScript, React or Next.js codebase with the TypeScript compiler and builds a graph of files, functions, components and the edges between them. Edges are only drawn when the compiler resolves them to a real indexed node, so impact questions get exact answers rather than text-search guesses.
The same engine is reachable in several ways: a command-line tool, an MCP server that Claude Code or Cursor can call over stdio, an HTTP and WebSocket API, and a 3D browser explorer with a chat panel that answers from the graph. A local semantic search option uses a small embedding model that runs on the machine, and falls back to lexical search when that model is not installed.
It suits developers who want an AI assistant to answer questions like what breaks if this function changes, without loading large parts of the repo into context. The HTTP API binds to localhost only and has no authentication, so it is meant for local use.
Tools this server provides (14)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 8 of 14 tools read data; 6 names don't say.
From the server's own tool labels and tool names; not verified by us.
- index_repo
- Index a repository into the code graph.
- get_graphName suggests: reads
- Return the code graph.
- get_nodeName suggests: reads
- Return a single graph node.
- who_renders
- Find components that render a given node.
- who_calls
- Find callers of a function.
- find_referencesName suggests: reads
- Find references to a node.
- blast_radius
- Show nodes affected by a change.
- find_cyclesName suggests: reads
- Find circular dependencies.
- find_orphansName suggests: reads
- Find nodes with no incoming connections.
- search_nodesName suggests: reads
- Search nodes by name.
- get_context_packName suggests: reads
- Build a context pack for a node.
- build_embeddings
- Build local semantic embeddings.
- semantic_searchName suggests: reads
- Search nodes by meaning.
- open_explorer
- Start the 3D UI and return its URL.
What it does
- Compiler-resolved dependency edges
- Imports, calls, renders and references are resolved through ts-morph, so edges reflect the TypeScript resolver rather than pattern matching.
- Blast radius queries
- Shows which nodes would be affected by changing a given function or file.
- 3D code explorer
- A browser view with folder drill-down, health coloring, hover tracing and a 2D fallback, updated live as files change.
- MCP server with 14 tools
- Exposes graph queries such as who calls, who renders, find cycles and find orphans to MCP-compatible AI clients over stdio.
- Monorepo-aware discovery
- Detects pnpm, turbo and lerna workspaces as well as standalone packages without target-specific configuration.
- Local semantic search
- Optional on-device embeddings for searching nodes by meaning, with no API key and no data leaving the machine.
Good for
- Asking an AI agent what would break before changing a shared utility
- Finding unused files, orphaned modules and circular imports in a React or Next.js codebase
- Giving Claude Code or Cursor a structured map of a monorepo instead of raw file reads
- Exploring an unfamiliar TypeScript project visually in the browser
- Generating a grounded chat answer about a codebase's component structure
Pricing
Open source
Free and MIT licensed; self-hosted on your machine.
Prices change. Check npmjs.com before you buy.
mcp-code-indexer FAQ
How do I run mcp-code-indexer without cloning the repository?
Running npx code-graph-indexer ui --root . starts the full explorer against the current directory.
What does semantic search need?
It uses a local all-MiniLM-L6-v2 model through Transformers.js. It is an optional dependency, and if it is missing the semantic_search tool falls back to lexical search.
Is the HTTP API safe to expose on a network?
No. The server binds to 127.0.0.1 only and its endpoints are unauthenticated and can trigger reindexing, so it should not be exposed off the host.
Which languages does mcp-code-indexer index?
It is built for TypeScript, React and Next.js projects.
Is mcp-code-indexer free?
Yes. mcp-code-indexer is open source, so you can use and self-host it for free.
What are the best alternatives to mcp-code-indexer?
The closest alternatives to mcp-code-indexer are Codegraph, CodeGraphContext, synapse-mcp, Graphlens MCP and MCP Codebase Index.
Where this comes from
- Description: written from the project's README.

