Show HN: Slnmap – Roslyn-based code graph MCP server for .NET codebases Slnmap, an open-source Roslyn-based code graph MCP server for .NET codebases, is now available under the MIT license, enabling AI coding agents to perform compiler-accurate impact analysis across entire solutions. The tool, which requires .NET SDK 9.0+, exposes thirteen read-only tools including impact_analysis, find_usages, and list_endpoints, and supports ASP.NET Core Minimal APIs (v0.7.0) and attribute-routed controllers (v0.8.0). It runs locally and serves the map to agents or editors over MCP, helping agents answer questions like 'what breaks if I change this interface?' with every caller and implementation across projects. Slnmap sln-map — a semantic map of your .sln for AI coding agents. Open source under the MIT license. Your AI agent can't refactor .NET code it can't see. Ask an agent "what breaks if I change this interface?" and it guesses from the files in its context — missing callers in other projects and files it never opened. Slnmap gives the agent a precise, compiler-accurate map of your whole solution, so it answers correctly: every caller, every implementation, across every project. Fewer broken changes, no hallucinated dependencies. It runs locally and serves the map to your agent or editor over MCP https://modelcontextprotocol.io . 1. Install the global tool requires the .NET SDK https://dotnet.microsoft.com/download 9.0+ : dotnet tool install --global Slnmap If this is the first .NET global tool ever installed on the machine, the tools directory ~/.dotnet/tools may not be on your PATH yet — open a new terminal before running slnmap . 2. Analyze your solution or a single .csproj — this builds slnmap.db in the current folder: slnmap analyze path/to/YourSolution.sln 3. Connect your MCP client. For Claude Code, add this to .mcp.json in your project. Use an absolute path to the slnmap.db you just built — an MCP client's working directory is usually not your project folder, so a relative path can silently resolve to the wrong or a missing file: { "mcpServers": { "slnmap": { "command": "slnmap", "args": "serve", "--db", "C:/path/to/your/project/slnmap.db" } } } On macOS/Linux, use a POSIX absolute path instead, e.g. /home/you/project/slnmap.db . Or register it from the command line: claude mcp add slnmap -- slnmap serve --db C:/path/to/your/project/slnmap.db Restart your MCP client after registering.Fully quit and relaunch it — starting a new conversation or reconnecting mid-session is not enough; a running session will not see the new tools until the client process restarts. That's it. Ask your agent an architecture question and it will call Slnmap. Run slnmap doctor first if anything looks off — see Troubleshooting troubleshooting . The server exposes thirteen read-only tools. Give them fully qualified names; results are capped and counts-first. A note the tools also carry: an FQN does not reveal whether a member is an explicit interface implementation. | Tool | Example question | |---|---| find symbol | "Find the IBasketService interface." | get dependencies | "What does CartController.Index depend on?" | impact analysis | "What breaks if I change IBasketService ?" | get architecture overview | "Show me the projects and how they depend on each other." | find usages | "Where is BasketService.GetBasket used?" | find implementations | "Who implements IBasketService / overrides this virtual member?" | get type hierarchy | "Show the base and derived type tree for BaseEntity ." | find tests for symbol | "Which tests exercise BasketService.AddItemToBasket ?" | get project dependencies | "How do the projects reference each other, and where is the coupling worst?" | find circular dependencies | "Are there dependency cycles between projects or namespaces?" | get symbol source | "Show me the actual source of IBasketService ." | list endpoints | "List every HTTP endpoint, or just the POST s under /api/basket ." | find endpoint | "Which endpoint serves /api/basket/42/items , and which method handles it?" | For an interface or interface member , impact analysis follows both the interface's callers and its concrete implementations/overrides — so the answer includes code that only touches the interface, across projects, in files nobody has open. HTTP endpoints are first-class graph nodes — from ASP.NET Core Minimal APIs v0.7.0 and attribute-routed controllers v0.8.0 : each MapGet / MapPost /… registration and each Route / HttpGet "…" action appears as VERB /route/template linked to its handler method, so impact analysis and find usages on a handler surface the actual routes that break. Route templates are resolved statically — MapGroup prefixes, const patterns, the common CleanArchitecture registration conventions, class-level Route including inherited ones and controller / action tokens , and controller base classes reached through packages Ardalis.ApiEndpoints works out of the box . Anything that can't be resolved statically is counted and reported, never guessed — and controllers routed conventionally MapControllerRoute , no route attributes are detected and disclosed rather than silently absent. The exact parameter names, for clients that call the tools directly. Most tools take fqn — the symbol's fully qualified name — not symbol , name , or type ; a wrong parameter name fails the call. | Tool | Parameters | Description | |---|---|---| find symbol | query required , kind optional | Search symbols by name or FQN, case-insensitive substring; returns kind, FQN, and file for up to 20 matches. | get architecture overview | none | Projects, project-to-project dependencies, node/edge counts by kind, and top-level namespaces. | get symbol source | fqn required , context lines optional, 0–20, default 5 | Print a symbol's source, read from its file at the declaration span. | find usages | fqn required | Where a symbol is called or referenced — containing member, file, and line, up to 50. | get dependencies | fqn required , direction optional: , outgoing / incoming , default outgoing depth optional, 1–3, default 1 | A symbol's dependencies grouped by relationship kind Calls, Implements, Inherits, References . | find implementations | fqn required | Concrete types implementing an interface / deriving from a base, or members overriding a virtual/interface member. | get type hierarchy | fqn required , direction optional: , up / down / both , default both depth optional, 1–10, default 5 | Base and/or derived type tree as an indented text tree. | get project dependencies | project optional, default all | Project-to-project reference map with cross-project reference counts and a hotspot line. | impact analysis | fqn required | Every symbol that transitively depends on the given one depth 5 — counts first, then nearest-first. | find tests for symbol | fqn required | Test members that transitively exercise a symbol, grouped by project with file:line. | find circular dependencies | scope optional: project / namespace , default project | Dependency cycles reported as path chains, worst offenders first. | list endpoints | verb optional: , GET / POST / PUT / DELETE / PATCH prefix optional route prefix, e.g. /api/vendors | HTTP endpoints Minimal APIs + attribute-routed controllers grouped by project: VERB /route → handler — file:line ; unresolved registrations and conventionally-routed controllers disclosed in trailing notes. | find endpoint | route required: a template or a concrete path , verb optional | Endpoints matching a route — case-insensitive, {param} holes bind concrete segments; a miss suggests near matches. | slnmap analyze