BC

bbajt/csharp-code-map

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 7 forks 质量 68 趋势 18NOASSERTION

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 run winget install Microsoft.DotNet.SDK.10, on macOS/Linux download from https://dotnet.microsoft.com/download/dotnet/10.0. Verify with dotnet --version once done. Once .NET 10 is confirmed, install CodeMap: if codemap-mcp is not yet installed run dotnet tool install --global codemap-mcp, otherwise run dotnet tool update --global codemap-mcp to get the latest version. Verify the binary is reachable with codemap-mcp --version. Finally, register it as a global MCP server in Claude Code by running claude mcp add codemap-mcp codemap-mcp --scope user and confirm it appears in the output of claude 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_cleanup and index_remove_repo need repo_path. They delete data, so they no longer fall back to
在 GitHub 查看完整 README

安装

docker run -i \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "codemap": { "command": "codemap-mcp" } } }