Slnmap 0.1.7
See the version list below for details.
dotnet tool install --global Slnmap --version 0.1.7
dotnet new tool-manifest
dotnet tool install --local Slnmap --version 0.1.7
#tool dotnet:?package=Slnmap&version=0.1.7
nuke :add-package Slnmap --version 0.1.7
Slnmap
Slnmap (sln-map) — a semantic map of your .sln for AI coding agents.
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.
Quickstart (3 steps)
1. Install the global tool (requires the .NET SDK 9.0+):
dotnet tool install --global 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.
That's it. Ask your agent an architecture question and it will call Slnmap.
(Run slnmap doctor first if anything looks off — see Troubleshooting.)
What you can ask
The server exposes five 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?" |
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.
CLI
slnmap analyze <solution> # build or update the code graph (incremental on re-run)
slnmap serve # serve the graph to MCP clients over stdio
slnmap status # show node/edge counts and when it was last analyzed
slnmap doctor # check the environment can run Slnmap
--db <path> selects the database file (default slnmap.db).
Compatibility
Analyzes .NET 8 and .NET 9 solutions; runs on Windows, macOS, and Linux; works with any MCP client (tested with Claude Code).
Privacy
100% local. Your code never leaves your machine. Slnmap runs on your machine, reads your source with Roslyn, and writes a single local SQLite file. The MCP server reads only that local file. There is no telemetry, no network calls, and no cloud service — analysis works fully offline.
Performance
Measured on eShopOnContainers (dev
branch, 30 projects), .NET 9 SDK, 4-core Windows box.
| Metric | Result |
|---|---|
| Cold analyze (30 projects) | 43 s (target < 60 s) |
| Peak memory during analysis | 177 MB |
| Graph size | 2,672 nodes / 4,776 edges → 2.5 MB SQLite file |
| Save (bulk insert) | 0.4 s |
impact_analysis on a high-fan-in symbol |
11 ms |
| Re-analyze after a one-file change | ~20 s (see below) |
Incremental re-analysis. Re-analysis re-walks only the changed file and its dependents, but each
run currently pays a full workspace load of the solution — about ~20 s on a 30-project solution —
because the CLI is run-and-exit and does not keep a warm workspace. A resident watch mode that
keeps the workspace warm (targeting sub-second re-analysis) is the top item on the roadmap.
Troubleshooting
Run slnmap doctor first — it checks the three things that actually block analysis and prints a
fix for each:
$ slnmap doctor
[ok] .NET SDK: 1 SDK(s) installed; newest: 9.0.314 …
[ok] MSBuild workspace: Roslyn MSBuild workspace initialized …
[ok] Graph directory: Writable: /path/to/cwd
- "No .NET SDKs are installed" / MSBuild fails to load projects. Slnmap analyzes via
MSBuildWorkspace, which runs design-time builds using your installed .NET SDK. Install the SDK (not just the runtime) from https://dotnet.microsoft.com/download. On Windows, if projects still fail to load, install the Visual Studio Build Tools (or Visual Studio) so MSBuild and the targeting packs resolve. - Analysis reports warnings but finishes. That is expected and safe: a project that can't be loaded
(e.g. a missing SDK or targeting pack) is reported as a warning and skipped — Slnmap indexes everything
that did load rather than failing the whole run (a partial load). By default these are condensed
into a single
Warnings: N (M unique)summary line; runslnmap analyze --verbosefor the full, grouped detail. - The first analysis of a large solution takes a while. Cold analysis compiles every project once
(tens of seconds on a 30-project solution). Re-runs are faster on graph work but still reload the
workspace — see the performance note above. This is normal; the graph is cached in
slnmap.dbbetween runs. slnmap: command not foundafter install. Ensure the .NET global tools directory (~/.dotnet/tools) is on yourPATH, then open a new shell.
How it works
Slnmap uses the Roslyn compiler platform to build a precise semantic graph of your solution — every type and member, and the relationships between them (calls, implementations, inheritance, references). The graph is stored locally and served to your AI agent or editor over MCP. Updates are incremental and crash-safe: an interrupted run never corrupts your existing graph.
License & support
Slnmap is proprietary software, currently in beta and free to use during the beta period. For questions, licensing, or to report an issue, contact beta@slnmap.dev.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.