
CodeMap 是一个由 Roslyn 驱动的 MCP 服务器,允许 AI 代理通过符号、调用图和架构事实导航 C# 代码库——而无需暴力破解数千行源代码。
概览
停止给你的AI代理提供原始源文件。改为给它一个语义索引。 CodeMap 让 AI 代理通过代码库导航——而不是暴力破解数千行源代码。一个工具调用。准确的答案。没有上下文洪流。 最快的安装方法是将下面的提示粘贴到一个 shell 中。Claude 会检查你的环境,安装工具,并注册为 MCP 服务器——无需手动操作。 通过运行dotnet --version检查.NET 10 SDK是否已安装。如果报告的版本低于10.0,安装:在Windows上运行winget install Microsoft.DotNet.SDK.10,在macOS/Linux上从[[T0]下载后用dotnet --version验证。.NET 10确认后,安装CodeMap:如果codemap-mcp尚未安装,运行dotnet tool install --global codemap-mcp,否则运行dotnet tool update --global codemap-mcp获取最新版本。验证codemap-mcp --version是否可访问二进制文件。
概述(AI 翻译)
停止给你的AI代理提供原始源文件。改为给它一个语义索引。
CodeMap 是一个由 Roslyn 驱动的 MCP 服务器,允许 AI 代理通过 symbol、调用图和架构事实 来导航 C#、VB.NET 和 F# 代码库——而无需暴力破解成千上万行源代码。一个工具调用。准确的答案。没有上下文泛滥。
平均代币节省:90%+,相较直接读取文件。
通过 Claude Code 或手动安装
最快的安装方法是将以下提示贴入Claude代码 shell。Claude 会检查您的环境,安装工具,并将其注册为 MCP 服务器——无需手动操作。
通过运行
dotnet --version检查 .NET 10 SDK 是否已安装。如果报告的版本低于 10.0,安装:在 Windows 上运行winget install Microsoft.DotNet.SDK.10,在 macOS/Linux 上从 https://dotnet.microsoft.com/download/dotnet/10.0. 下载完成后用dotnet --version验证。确认 .NET 10 后,安装 CodeMap:如果尚未安装codemap-mcp,运行dotnet tool install --global codemap-mcp,否则运行dotnet tool update --global codemap-mcp以获取最新版本。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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
安装
docker run -i \配置
{
"mcpServers": {
"codemap": {
"command": "codemap-mcp"
}
}
}