# CodeMap MCP server

> Lets AI agents navigate C#, VB.NET and F# codebases by symbol, call graph and architectural facts without reading source files.

- Repository: https://github.com/bbajt/csharp-code-map
- Page: https://hostedmcp.org/servers/bbajt/csharp-code-map
- Transport: stdio
- Stars: 24
- Latest version: 1.4.0

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CODEMAP_CACHE_DIR` | no | no |  |
| `CODEMAP_CACHE_DIR` | no | no | Path to a shared baseline cache directory. When set, index.ensure_baseline checks the cache before running a full Roslyn build — useful on CI or shared machines. |

## Tools (28)

- `symbols_search`
- `code_search_text`
- `symbols_get_card`
- `symbols_get_context`
- `symbols_get_definition_span`
- `code_get_span`
- `refs_find`
- `graph_callers`
- `graph_callees`
- `graph_trace_feature`
- `types_hierarchy`
- `codemap_summarize`
- `codemap_export`
- `codemap_guide`
- `index_diff`
- `surfaces_list_endpoints`
- `surfaces_list_config_keys`
- `surfaces_list_db_tables`
- `workspace_create`
- `workspace_reset`
- `workspace_list`
- `workspace_delete`
- `index_refresh_overlay`
- `index_ensure_baseline`
- `index_list_baselines`
- `index_cleanup`
- `index_remove_repo`
- `repo_status`

## FAQ

### What languages does CodeMap index?

CodeMap indexes C#, VB.NET and F# solutions, including mixed-language .sln and .slnx files, in a single pass.

### How much context does CodeMap save compared to reading files?

CodeMap reports average token savings of over 90% versus reading source files directly, with some tasks near 95%.

### How do I install CodeMap?

Install it as a global .NET tool with `dotnet tool install --global codemap-mcp`, then register it with your MCP client. It requires the .NET 10 SDK.

### Does CodeMap need authentication or an API key?

No credentials appear in the setup; it runs locally as a .NET tool registered as an MCP server.

### What architectural facts can CodeMap extract?

It extracts HTTP endpoints, config keys, DB tables, DI registrations, middleware pipeline, retry policies, exception throw points and structured log templates.
