CodeMap MCP server
2026년 10월 2일 커밋AI 에이전트가 소스 파일을 직접 읽지 않고도 심볼, 호출 그래프, 아키텍처 정보를 통해 C#, VB.NET, F# 코드베이스를 탐색할 수 있도록 지원합니다.
다른 이름 bbajt/csharp-code-map, csharp-code-map
- 스타
- 24
- Tools
- 28
- 다운로드, 30일
- —
- 최신 버전
- 1.4.0
- 마지막 커밋
- 2026년 10월 2일
- 라이선스
- —
CodeMap MCP란?
CodeMap은(는) MCP server입니다. AI 에이전트가 소스 파일을 직접 읽지 않고도 심볼, 호출 그래프, 아키텍처 정보를 통해 C#, VB.NET, F# 코드베이스를 탐색할 수 있도록 지원합니다. 28개 도구를 제공합니다. 예: symbols_search, code_search_text, symbols_get_card.
프로젝트 README에서 생성된 요약
CodeMap MCP server 정보
CodeMap은 AI 에이전트가 가공되지 않은 소스 파일을 읽는 대신 시맨틱 인덱스를 사용하여 복잡한 .NET 코드베이스를 탐색할 수 있게 해줍니다. 개발자는 이 기능을 통해 AI 클라이언트가 심볼, 호출 그래프, 아키텍처 정보를 바탕으로 C#, VB.NET, F# 프로젝트를 이해하도록 만들 수 있습니다. 이 서버는 Roslyn을 사용하여 솔루션 파일로부터 영구적인 인덱스를 구축하므로, 에이전트가 수천 줄의 코드를 무차별적으로 읽을 때 발생하는 막대한 토큰 비용 없이 특정 정보를 쿼리할 수 있습니다.
사용자는 Claude Code를 통해 서버를 설치하거나 .NET 10 SDK를 사용하여 수동으로 설치할 수 있습니다. 이 시스템은 .sln 및 .slnx 형식을 모두 지원하며, NuGet 및 SDK 심볼을 해석하여 DLL 경계를 넘나드는 탐색도 가능합니다. 또한 타입 계층 구조와 인터페이스 구현부터 HTTP 엔드포인트, 데이터베이스 테이블, 의존성 주입(DI) 등록과 같은 구체적인 아키텍처 세부 사항에 이르기까지 28개의 특화된 도구를 제공합니다. 이러한 접근 방식은 기존의 파일 읽기 방식과 비교했을 때 토큰 사용량을 90% 이상 줄일 수 있습니다.
활용 사례
- 1기능 실행 흐름 추적AI에게 특정 메서드의 설정 및 데이터베이스 상호작용을 포함한 전체 실행 경로를 매핑하도록 요청합니다.
- 2모든 메서드 호출자 찾기코드베이스 내에서 특정 서비스 메서드를 호출하는 모든 위치의 목록을 요청합니다.
- 3아키텍처 영역 식별에이전트가 프로젝트 내에서 구성된 모든 HTTP 엔드포인트나 사용 중인 데이터베이스 테이블을 나열하도록 합니다.
- 4타입 계층 구조 분석기본 클래스, 인터페이스 및 파생 구현체 간의 관계를 쿼리합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
CodeMap MCP 도구 28
README에서 감지됨symbols_searchcode_search_textsymbols_get_cardsymbols_get_contextsymbols_get_definition_spancode_get_spanrefs_findgraph_callersgraph_calleesgraph_trace_featuretypes_hierarchycodemap_summarize
| 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 | — |
도구 28개 모두 보기도구 수 줄이기
codemap_exportcodemap_guideindex_diffsurfaces_list_endpointssurfaces_list_config_keyssurfaces_list_db_tablesworkspace_createworkspace_resetworkspace_listworkspace_deleteindex_refresh_overlayindex_ensure_baselineindex_list_baselinesindex_cleanupindex_remove_reporepo_status
| 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 | — |
구성
CODEMAP_CACHE_DIRCODEMAP_CACHE_DIRPath 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.
| 이름 | 설명 | 유형 |
|---|---|---|
| CODEMAP_CACHE_DIR | — | |
| CODEMAP_CACHE_DIR | 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. |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능bbajt/csharp-code-map is public and reachablegithub.com/bbajt/csharp-code-map ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)No license결함 발견
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-02github.com/bbajt/csharp-code-map ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음28 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기CodeMap — Turn Your AI Agent Into a Semantic Dragon
Stop feeding your AI agent raw source files. Give it a semantic index instead.
CodeMap is a Roslyn-powered MCP server that lets AI agents navigate C#, VB.NET, and F# codebases by symbol, call graph, and architectural fact — instead of brute-reading thousands of lines of source code. One tool call. Precise answer. No context flood.
Average token savings: 90%+ versus reading files directly.
Install via Claude Code or manually
The fastest way to install is to paste the prompt below into a Claude Code shell. Claude will check your environment, install the tool, and register it as an MCP server — no manual steps needed.
Check whether .NET 10 SDK is installed by running
dotnet --version. If the reported version is below 10.0, install it: on Windows runwinget install Microsoft.DotNet.SDK.10, on macOS/Linux download from https://dotnet.microsoft.com/download/dotnet/10.0. Verify withdotnet --versiononce done. Once .NET 10 is confirmed, install CodeMap: ifcodemap-mcpis not yet installed rundotnet tool install --global codemap-mcp, otherwise rundotnet tool update --global codemap-mcpto get the latest version. Verify the binary is reachable withcodemap-mcp --version. Finally, register it as a global MCP server in Claude Code by runningclaude mcp add codemap-mcp codemap-mcp --scope userand confirm it appears in the output ofclaude mcp list.
Or install manually:
# Install .NET 10 SDK if needed (Windows)
winget install Microsoft.DotNet.SDK.10
dotnet tool install --global codemap-mcp
codemap-mcp --version
claude mcp add codemap-mcp codemap-mcp --scope user
Requires .NET 10 (LTS). If you're working on a C# or VB.NET codebase you almost certainly have it already — check with dotnet --version.
Upgrading to v2.10.0
No re-index and no index format change. What you may notice:
index_cleanupandindex_remove_reponeedrepo_path. They delete data, so they no longer fall back to the only registered repo. Cleanup now protects the baseline of every workspace in every CodeMap process, and a baseline that is in use is never half-deleted (it's reported inskipped_in_use).- References from Blazor components, MVC views and Razor Pages are back (missing since v2.5.2).
graph_callers/refs_findon a service or model now include uses written in.razor/.cshtmlfiles. They appear when a baseline is next built (any new commit). - Idle memory is returned. After indexing, an idle server gives most of the build's memory back (nopCommerce: 2.9 GB → 1.1 GB after 2.5 minutes, 0.2 GB after 13 minutes).
config.jsonhas two keys,log_levelandshared_cache_dir.shared_cache_dirnow works (it was never read);budget_overridesis gone (it never had an effect). Unknown keys give one warning in the log. A relativeshared_cache_dirstops startup, as a relativeCODEMAP_CACHE_DIRdoes.- Boolean parameters sent as strings (
"include_code": "false") work instead of returningINTERNAL_ERROR.
Details: CHANGELOG [2.10.0].
Upgrading to v2.9.0: new tool names
Tool names use underscores now (symbols_search instead of the dotted form), because LLM APIs don't allow dots in tool names. Claude Code users see no change: Claude Code already showed mcp__codemap__symbols_search. The old dotted names keep working until v2.11.0 at the earliest, for clients and scripts that still send them. Each such call adds a note naming the new tool. If your project's CLAUDE.md contains the CodeMap block, refresh it from docs/CLAUDE-INSERT.MD.
Upgrading from v1.x
v2.0.0 uses a new binary storage engine (memory-mapped segments instead of SQLite). Your old .db baselines are not migrated — run index_ensure_baseline once per repo to rebuild. The old ~/.codemap/baselines/ folder is unused and can be deleted. The SQLite engine was removed in v2.1.0.
The Problem
An AI agent working on a C# codebase without CodeMap does this:
Agent: I need to find who calls OrderService.SubmitAsync.
→ Read OrderService.cs (3,600 tokens)
→ Read Controllers/... (3,600 tokens)
→ Grep across src/ (another 3,600 tokens)
→ Maybe find it. Maybe not.
With CodeMap:
refs_find { symbol_id: "M:MyApp.Services.OrderService.SubmitAsync", kind: "Call" }
→ 220 tokens. Exact file, line, and excerpt for every call site. Done.
That's 93.9% fewer tokens for a task agents do dozens of times per session. On a real production codebase (100k+ lines), savings are 95–99%+.
What It Does
CodeMap builds a persistent semantic index from your solution file using Roslyn — the same compiler that powers Visual Studio. Supports both .sln (all Visual Studio versions) and .slnx (VS 2022 17.12+ / .NET SDK 9+) solution formats — auto-discovered when solution_path is omitted (prefers .slnx). Short commit SHAs are auto-expanded. The index captures:
- Every symbol (classes, methods, properties, interfaces, records)
- Every call relationship and reference (who calls what, where)
- Type hierarchy (inheritance chains, interface implementations)
- Architectural facts extracted from code: HTTP endpoints, config keys, DB tables, DI registrations, middleware pipeline, retry policies, exception throw points, structured log templates
All of this is exposed via 28 MCP tools that any MCP-compatible AI agent can call. Starting from v1.3, CodeMap also navigates DLL boundaries — lazily resolving NuGet and SDK symbols on first access, with optional ICSharpCode.Decompiler source reconstruction and cross-DLL call graphs.
Supported languages: C#, VB.NET, and F#. Mixed-language solutions (.sln / .slnx containing C#, VB.NET, and F# projects) are indexed in a single pass. All 28 MCP tools work identically for symbols from any language. C# and VB.NET use Roslyn's MSBuildWorkspace; F# uses FSharp.Compiler.Service (MSBuildWorkspace doesn't support .fsproj). F# architectural fact extractors (endpoints, DI, config) are not yet implemented — symbol search, call graphs, references, and type hierarchy all work.
Blazor / Razor (v2.5.0+): .razor components are indexed via the Razor source generator. ComponentBase-derived classes appear in symbols_search. @page routes surface in surfaces_list_endpoints with a PAGE HTTP method. [Inject] and [Parameter] properties emit dedicated RazorInject / RazorParameter facts. Since v2.10.0, code written in components, MVC views and Razor Pages is part of the reference graph: graph_callers on a service method shows the component or view that calls it. The generator's own scaffolding (tag-helper plumbing) is left out.
Multi-target projects (v2.5.1+): <TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks> previously produced one extraction per TFM (3× duplication). CodeMap now collapses to a single extraction on the highest-ranked TFM, with ProjectDiagnostic.TargetFrameworks listing every TFM in the group. Symbol counts on heavily multi-targeted Blazor libraries drop 60–80%.
Interface-aware graph_callers (v2.6.0+): in DI-dispatched codebases (most production .NET) graph_callers on a concrete method silently under-reported because real call sites resolve through the registered interface. CodeMap now detects interface implementation at query time and surfaces an interface_implementation_hint listing the interface members and an estimated count of additional callers routed through them. Pass follow_interface: true to union those into the result (deduped by from_symbol). No baseline-format change, no re-index required. Handles both implicit and explicit interface implementations.
Indexing perf + correctness (v2.5.2): large reduction in indexing wall-clock by skipping auto-generated trees (*.g.cs, *.Designer.cs, files with <auto-generated>, paths under obj/), short-circuiting type-position identifier classification (typeof / generic args / base lists / attributes), and parallelizing Pass-2 reference & fact extraction across projects. Validated on a 9-repo Blazor corpus: Blazorise drops from 408 s → 95 s (−77 %), ant-design-blazor from 47 s → 25 s (−47 %), OrchardCore (single-target sentinel) from 131 s → 96 s (−27 %), and a 78-csproj distributed-database project (ByTech.Bedrock) indexes in 27 s with an 11.2× Pass-2 parallel speedup. Five query-correctness bugs also fixed: symbols_search browse-by-kinds now honours namespace / file_path / project_name filters; workspace-mode namespace filter is case-insensitive (matches committed mode); refs_find cache key includes resolution_state; workspace browse-by-kinds now includes overlay-new symbols; codemap_guide's decision table no longer advertises surfaces_list_di_registrations (which was never a registered tool).
The Transformation
Here's what changes when you give an agent CodeMap:
| Without CodeMap | With CodeMap |
|---|---|
grep -rn "OrderService" src/ |
symbols_search { query: "OrderService" } |
| Read 5 files to understand a method | symbols_get_context — card + source + all callees in one call |
| Manually trace call chains across files | graph_trace_feature — full annotated tree, one call |
| Hope grep finds the right interface impl | types_hierarchy — base, interfaces, derived types, instant |
| Read the whole file to find config usage | surfaces_list_config_keys — every IConfiguration access, indexed |
| Diff two commits by reading changed files | index_diff — semantic diff, rename-aware, architectural changes only |
The agent stops reading your codebase and starts understanding it.
Showpiece: graph_trace_feature
The most powerful tool. Replaces 5–10 manual calls with one:
graph_trace_feature {
"repo_path": "/path/to/repo",
"entry_point": "M:MyApp.Controllers.OrdersController.Create",
"depth": 3
}
Returns an annotated call tree with architectural facts at every node:
OrdersController.Create [POST /api/orders]
→ OrderService.SubmitAsync
→ [Config: App:MaxRetries]
→ [DI: IOrderService → OrderService | Scoped]
→ Repository<Order>.SaveAsync
→ [DB: orders | DbSet<Order>]
→ [Retry: WaitAndRetryAsync(3) | Polly]
One query. Full feature flow. Every config key touched, every table written, every retry policy applied — surfaced automatically from the index.
Token Savings Benchmark
Measured across 24 canonical agent tasks on a real .NET solution:
| Task | Raw Tokens | CodeMap | Savings |
|---|---|---|---|
| Find a class by name | 3,609 | 248 | 93% |
| Get method source + facts | 3,609 | 336 | 91% |
| Find all callers (refs_find) | 3,609 | 220 | 94% |
| Caller chain depth=2 | 3,609 | 287 | 92% |
| Type hierarchy | 3,609 | 200 | 94% |
| List all HTTP endpoints | 3,609 | 360 | 90% |
| List all DB tables | 3,609 | 169 | 95% |
| Workspace staleness check | 3,609 | 62 | 98% |
| Baseline build (cache hit) | ~30s Roslyn | ~2ms pull | ∞ |
| Average | 90.4% |
Raw tokens = reading all source files. On production codebases (100k+ lines), savings reach 95–99%+.
Run it yourself:
dotnet test --filter "Category=Benchmark" -v normal
28 Tools Across Six Categories
Discover
| Tool | What it does |
|---|---|
symbols_search |
Search by name (prefix match, OR), kind, namespace, or file path |
code_search_text |
Regex/substring search across source files — returns file:line:excerpt |
symbols_get_card |
Full symbol metadata + architectural facts + source code |
symbols_get_context |
Card + source + all callees with source — deep understanding in one call |
symbols_get_definition_span |
Raw source only, no overhead |
code_get_span |
Read any source excerpt by line range |
Navigate
| Tool | What it does |
|---|---|
refs_find |
All references to a symbol, classified (Call, Read, Write, Implementation…) |
graph_callers |
Depth-limited caller graph — who triggers this? |
graph_callees |
Depth-limited callee graph — what does this orchestrate? |
graph_trace_feature |
Full annotated feature flow with facts at every node |
types_hierarchy |
Base type, interfaces implemented, and all derived types |
Architecture
| Tool | What it does |
|---|---|
codemap_summarize |
Full codebase overview: endpoints, DI, config, DB, middleware, logging |
codemap_export |
Portable context dump (markdown/JSON, 3 detail levels) for any LLM |
codemap_guide |
Quick-start guide: session setup, decision table, and usage rules for agents |
index_diff |
Semantic diff between commits: symbols added/removed/renamed, API changes |
surfaces_list_endpoints |
Every HTTP route (controller + minimal API) with handler and file:line |
surfaces_list_config_keys |
Every IConfiguration access with usage pattern |
surfaces_list_db_tables |
EF Core entities + [Table] attributes + raw SQL table references |
Workspace
| Tool | What it does |
|---|---|
workspace_create |
Isolated overlay for in-progress edits |
workspace_reset |
Clear overlay, back to baseline |
workspace_list |
All active workspaces with staleness, SemanticLevel, and fact count |
workspace_delete |
Remove a workspace |
index_refresh_overlay |
Re-index changed files incrementally (~63ms) |
Index Management
| Tool | What it does |
|---|---|
index_ensure_baseline |
Build the semantic index (idempotent, cache-aware, auto-discovers solution) |
index_list_baselines |
All cached baselines with size, age, and commit |
index_cleanup |
Remove stale baselines (dry-run default; repo_path required; never HEAD or any workspace's baseline) |
index_remove_repo |
Remove ALL baselines and workspaces of a repo (dry-run default; repo_path required; refuses while another process has a workspace open) |
Repo
| Tool | What it does |
|---|---|
repo_status |
Git state + whether a baseline exists for current HEAD |
Workspace Mode — See Your Own Edits
CodeMap tracks uncommitted changes via an overlay index. Every agent session gets its own isolated workspace:
1. index_ensure_baseline → index HEAD once
2. workspace_create → agent gets isolated overlay
3. Edit files on disk
4. index_refresh_overlay → re-indexes only changed files (~63ms)
5. Query with workspace_id → results include your in-progress code
Three consistency modes:
- Committed — baseline index only (default, no workspace needed)
- Workspace — baseline + your uncommitted edits merged
- Ephemeral — workspace + virtual file contents (unsaved buffer content)
Multi-Agent Supervisor Support
Running multiple agents in parallel? What works today:
- Each workspace is isolated: agents that use different
workspace_ids never see each other's edits workspace_listshows every workspace:IsStale,SemanticLevel, fact count- Stale detection fires when a workspace's base commit diverges from HEAD
- Supervisor can inspect, clean up, or re-provision any agent's workspace
What to know (measured in the multi-agent benchmark, docs/CODEMAP-MULTI-AGENT-SCALING-FINDINGS.md):
- One CodeMap process per agent. Each MCP client or sub-agent starts its own server, so memory grows with the number of agents: roughly 0.3–0.5 GB per process on small and medium solutions, 2.5–4 GB on large ones. Every process builds the same baseline itself the first time, and concurrent builds slow each other down. A shared host is the planned fix (ADR-048).
- A workspace can't be shared across processes. If another CodeMap process holds that
workspace_id, the call returnsWORKSPACE_IN_USE(retryable): retry, or give each agent its own ID. - Agents in fresh worktrees must restore first. A new clone or
git worktree addhas no restore output; rundotnet restorebeforeindex_ensure_baseline, or the index is incomplete (reported assemantic_level: partial, L-12). - Cleanup is safe across agents (v2.10.0).
index_cleanupnever removes a baseline that any agent's workspace uses, in any process, and never deletes a baseline another process has open.index_remove_reporefuses (WORKSPACE_IN_USE) while another process has a workspace open in the repo. - An idle process gives memory back (v2.10.0). Two minutes after indexing, the server compacts its heap; after 10 minutes without an overlay refresh it also drops the cached Roslyn solution (the next refresh reopens it). This lowers each process's idle cost; the per-process multiplication stays until the shared host.
Self-Healing Under Broken Builds
When a file doesn't compile, CodeMap doesn't drop references. It stores unresolved edges with syntactic hints. When compilation succeeds again (after a fix), a resolution worker automatically upgrades them to fully-resolved semantic edges.
refs_find returns both. Filter with resolution_state: "resolved" if you need certainty.
DLL Boundary Navigation
CodeMap resolves DLL symbols lazily on first agent access — NOT_FOUND at a DLL
boundary triggers automatic extraction rather than a dead end.
Two levels, both permanent (cached in baseline DB):
| Level | Trigger | What you get | Cost |
|---|---|---|---|
| 1 — Metadata stub | Any NOT_FOUND query |
Method signatures, XML docs, type hierarchy | ~1–5ms (once) |
| 2 — Decompiled source | symbols_get_card with include_code: true |
Full reconstructed C# source via ICSharpCode.Decompiler | ~10–200ms (once) |
After Level 2, cross-DLL call graph edges are extracted so graph_callees and
graph_trace_feature traverse INTO and THROUGH DLL code seamlessly.
source discriminator in symbols_get_card response:
"source_code"— symbol is from your own source"metadata_stub"— Level 1 only (decompilation unavailable)"decompiled"— Level 2 source reconstructed and ready
graph_trace_feature applies a max_lazy_resolutions_per_query budget (default 20)
when encountering previously-unseen DLL types to bound decompilation latency.
Shared Baseline Cache
Index once, reuse everywhere — across machines, CI, Docker containers:
export CODEMAP_CACHE_DIR=/shared/codemap-cache
or, in config.json (see Observability): { "shared_cache_dir": "/shared/codemap-cache" }.
index_ensure_baselinepulls from cache first (~2ms vs ~30s Roslyn build)- Auto-push after every new baseline build, except baselines this machine degraded (an unrestored checkout or a source generator that failed to load), since another machine would get an incomplete index
- Self-healing: corrupt cache entries are detected and overwritten
- Precedence:
CODEMAP_CACHE_DIR(whenever set; blank = disabled) >config.jsonshared_cache_dir> disabled. With neither, all cache ops are no-ops - Must be an absolute path or start with
~/; a relative value stops the server at startup (exit code 2), since it would resolve against the client's working directory
v2 Storage Engine — 10x Faster Queries
v2.0.0 replaces SQLite with a custom binary storage engine using memory-mapped segment files. The Roslyn extraction pipeline is unchanged — only the on-disk format is new.
Query speedup (measured across 15 query types on real repos):
| Query | v1 (SQLite) | v2 (mmap) | Speedup |
|---|---|---|---|
graph_trace_feature |
13.2ms | 0.5ms | 26x |
codemap_summarize |
18.9ms | 0.9ms | 21x |
surfaces_list_db_tables |
5.7ms | 0.2ms | 28x |
surfaces_list_config_keys |
3.6ms | 0.2ms | 18x |
types_hierarchy |
8.7ms | 1.0ms | 9x |
symbols_get_context |
28.7ms | 5.3ms | 5x |
symbols_get_card |
7.8ms | 2.7ms | 3x |
Indexing speedup (Roslyn compilation dominates, but I/O is faster):
| Repo | v1 | v2 | Speedup |
|---|---|---|---|
| eShopOnWeb (278 files) | 16.2s | 5.8s | 2.8x |
| Bitwarden (4,466 files) | ~170s | ~110s | 1.5x |
| dotnet/roslyn (18,799 files) | 138.2s | 96.8s | 1.4x |
What changed:
- Baselines stored as contiguous packed binary segments (symbols, edges, files, facts) with mmap reads — no SQL parsing overhead
- Custom search index with tokenized FTS (CamelCase splitting, signature/documentation indexing)
- WAL-backed overlay for workspace mutations (same isolation model)
- Zero native DLL dependencies (no
e_sqlite3.dll)
Validated on 9+ repos including dotnet/roslyn (174K symbols, 768K references), dotnet/fsharp (157K symbols via FCS), and Bitwarden. Zero functional bugs. See docs/ENGINE-COMPARISON-RESULTS.MD for full data.
Self-Hosting Validated
CodeMap indexes its own 18-project solution (5,576 symbols, 20,960 references). All 28 tools verified against real-world architectural complexity. Self-hosting exposed and fixed cross-project reference bugs, CamelCase FTS edge cases, overlay StringId resolution issues, and multi-line SQL extraction gaps. Every tool in this README was tested against the codebase that implements it.
Installation
.NET Global Tool — NuGet (recommended)
See the Install via Claude Code or manually section at the top for the one-paste Claude Code prompt and manual steps.
NuGet package: nuget.org/packages/codemap-mcp
Docker
docker build -t codemap-mcp .
docker run -i \
-v /path/to/your/repo:/repo:ro \
-v /path/to/cache:/cache \
codemap-mcp
-iis required — MCP uses stdio transport. Without it the container gets immediate EOF.
Uses the .NET SDK base image (~800MB) because MSBuildWorkspace needs MSBuild at runtime for index_ensure_baseline. Mount a cache volume (-v /path/to/cache:/cache) to avoid rebuilding the index on every container start.
Connect to Your AI Agent
Claude Code (Claude Desktop / claude.ai)
Add to claude_desktop_config.json:
{
"mcpServers": {
"codemap": {
"command": "codemap-mcp"
}
}
}
Any MCP-Compatible Client
CodeMap speaks standard MCP over stdin/stdout (JSON-RPC 2.0). Any MCP client works.
CLAUDE.md Integration
Drop the instruction block from docs/CLAUDE-INSERT.MD into your project's CLAUDE.md to wire up automatic CodeMap usage for any Claude agent working on that project. The block includes the session startup sequence, a tool substitution decision table, and the "refresh before grep" rule that keeps agents in semantic mode.
CodeMap MCP 질문
CodeMap MCP는 어떤 도구를 제공하나요?
28개 도구를 제공합니다. 예: symbols_search, code_search_text, symbols_get_card, symbols_get_context, symbols_get_definition_span.
CodeMap이 인덱싱하는 언어는 무엇인가요?
CodeMap은 혼합 언어로 구성된 .sln 및 .slnx 파일을 포함하여 C#, VB.NET, F# 솔루션을 단 한 번의 패스로 인덱싱합니다.
파일을 직접 읽는 방식과 비교했을 때 CodeMap은 어느 정도의 컨텍스트를 절약할 수 있나요?
CodeMap은 소스 파일을 직접 읽는 방식보다 평균 90% 이상의 토큰 절감 효과를 제공하며, 작업에 따라 95%에 육박하는 절감률을 보이기도 합니다.
CodeMap을 어떻게 설치하나요?
dotnet tool install --global codemap-mcp 명령어를 통해 글로벌 .NET 도구로 설치한 후, MCP 클라이언트에 등록하여 사용합니다. .NET 10 SDK가 필요합니다.
CodeMap 사용 시 인증이나 API 키가 필요한가요?
설정 과정에서 별도의 인증 정보는 필요하지 않습니다. MCP server로 등록되어 로컬에서 .NET 도구로 실행됩니다.
CodeMap이 추출할 수 있는 아키텍처 정보에는 어떤 것들이 있나요?
HTTP 엔드포인트, 설정 키, DB 테이블, DI 등록 정보, 미들웨어 파이프라인, 재시도 정책, 예외 발생 지점 및 구조화된 로그 템플릿 등을 추출할 수 있습니다.