local-indexer
Compares Git snapshots (e.g., main...HEAD) to perform impact analysis and identify affected code paths.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Local Codebase Indexer
Which C# code and pages reach this SQL Server table?
Trace tables and stored procedures to repositories, controller actions, and Razor pages in a local source tree. Use the CLI yourself or give your AI assistant the same evidence through MCP. Especially useful when maintaining C# / SQL Server applications with Dapper, ADO.NET, or Entity Framework.

Case study and raw results · CLI reference · PyPI · MIT license
Try it in three steps
Python 3.10+. Run these in a virtual environment; no SQL Server, .NET runtime, model download, or API key is needed for the demo.
1. Install
python -m pip install --upgrade local-codebase-indexerIf Python reports an externally managed environment, create and activate a virtual environment first. See the reference for isolated installation alternatives.
2. Run the bundled example
local-codebase-indexer demoThis creates a temporary synthetic source tree, indexes it, and checks four expected relationships. It does not index your current directory. The animation uses this command's actual output, with reading pauses added. An excerpt:
table Sales_OrderHeader
WRITTEN BY (2)
[confirmed] procedure dbo.usp_ApproveOrder
[confirmed] method Shop.Data.OrderRepository.Approve ... via usp_ApproveOrder
READ BY (1)
[confirmed] method Shop.Data.OrderRepository.Get
USED BY PROGRAMS (1)
[probable] Orders ... (Approve, Details)
pages: Views/Orders/Details.cshtml
Verified 4/4 expected relationships: PASSUse local-codebase-indexer demo --output demo-orders to keep a copy in a new or empty folder, or demo --json for the complete report.
3. Point it at your source tree
local-codebase-indexer --root "/path/to/project" data-access YourTableReplace the path and table name. The first query builds the index; subsequent queries refresh it incrementally. SQL definitions must be present in source files for procedure bodies to be analyzed. There is no connection to a live database.
Related MCP server: Kivgraph
Give the same evidence to your assistant
For Claude Code, after installing the package:
claude mcp add local-indexer -- local-codebase-indexer --root "/absolute/path/to/project" serveAsk: “Which code writes YourTable, and which controller actions and pages reach it? Show paths and confidence levels.” Restart/reconnect the MCP client if needed. For other stdio MCP clients, use command local-codebase-indexer and arguments --root, your absolute project path, serve.
Codex / Copilot can use the CLI. AGENTS.md contains assistant instructions. The reference also covers the Claude Code plugin, seven MCP tools, ONNX models, aliases, and configuration.
More maintenance questions
local-codebase-indexer --root "/path/to/project" relations OrderRepository.Approve --direction upstream
local-codebase-indexer --root "/path/to/project" impact main...HEAD
local-codebase-indexer --root "/path/to/project" search "order approval" --explain --limit 5
local-codebase-indexer --root "/path/to/project" doctorRelations show callers; impact compares Git snapshots; search combines identifiers, text, and local embeddings. C#, Python, JavaScript, and TypeScript have symbol parsing; T-SQL and C# have additional data-access analysis. Add --json for structured output.
What to verify
This is static analysis, with confidence labels. Interface dispatch can be
probable; name-only candidates and dynamic SQL require source verification. There is no Roslyn overload resolution or runtime execution proof.The default hashing embedder is best at identifiers and related terms. Natural-language paraphrases can miss results. Benchmarks and the case study explain what was measured; four demo checks do not establish general accuracy or time savings.
The index is local at
<project>/.ai_context/indexer.db. Indexing needs no remote service after dependencies are installed. Your MCP client's model provider controls where returned context is sent.Start with a table or procedure that you know. If files are missing, run
doctor --path path/to/file.cs; check.gitignoreand.ai_context/ignore. See known limitations and planned work.
Found a wrong edge or missing result? Open a reproducible issue. Contributions are welcome. Licensed under MIT.
This server cannot be deployed
Maintenance
Related MCP Connectors
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Change-impact intelligence for tracing dependencies, stale references and required updates.
Ask who calls a route, what a change breaks or who reads a field, across a system's repos.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to explore SQL Server schemas, relationships, and execute safe SQL queries with read-only mode by default and optional write control.1MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to query a semantic cross-repository code graph for symbols, references, callers, dependencies, and change impact across registered repositories.1223Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI assistants to analyze a local codebase and answer impact questions like 'what breaks if I change Y?' through local indexing, search, and reverse dependency analysis, with no code leaving the machine.416 npm1MIT
- AlicenseAqualityBmaintenanceEnables AI coding assistants to query a read-only, locally indexed code graph for who-calls a function, what a function calls, call chains, and where configuration keys are defined or read, returning path:line citations with calibrated confidence and stale-index flags.9MIT