ContextManager
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ContextManagerinspect src/Orders/OrderService.cs and show its impact in MyApp.sln"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ContextManager is an MCP server that saves an agent from reading whole C# files. It does two things:
Inspects files. It turns a
.csfile into a JSON contract with its types, public members, constructor dependencies, base types, interfaces, and events. Method bodies, private members, and XML docs are left out; each method carries its line range so the agent can read only the body it needs.Maps the solution. It builds a knowledge graph of a
.slnso the agent can find which files matter, and how risky a change is, before opening any of them.
Install
You need the .NET 10 SDK or later.
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/nushey/ContextManager/main/scripts/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/nushey/ContextManager/main/scripts/install.ps1 | iexThe installer installs or updates the ContextManager .NET global tool and runs
context-manager setup, a wizard that adds the server to the MCP clients you pick (Claude Code,
Claude Desktop, Codex, Antigravity, Kilo Code, Cursor, Devin, Opencode).
To install by hand instead:
dotnet tool install -g ContextManager
claude mcp add --scope user context-manager -- context-manager # Claude CodeFor other clients, flags, config-file paths, and troubleshooting, see INSTALL.md.
project_scanon.NET Framework 4.8solutions only works on Windows and needs Visual Studio Build Tools with the .NET desktop build tools workload. Everything else works on any platform.
Related MCP server: roz-mcp
Tools
Tool | What it returns |
| The structural contract of one |
| A compact view of up to 15 |
| Builds or refreshes the solution's graph and reports its coverage. |
| The neighbors of a node, rolled up to their declaring type, with edge counts per kind. |
| Every type that depends on a node, directly or transitively, with its file. |
| The shortest dependency path between two nodes. |
Graph tools take the path of the .sln and keep the graph up to date on their own: before
answering, they re-extract only what changed since the last scan. The graph is saved in
.context-manager/<solution name>.graph.json next to the .sln, so every session on that solution
shares it.
How to use it
Start from the file the user mentions:
inspect_file(path): read the type and build its node ID asNamespace.TypeName.graph_get_dependencies(solutionPath, nodeId): find the neighbors worth reading.inspect_fileon those neighbors only.graph_impact_analysis(solutionPath, nodeId): check the blast radius before changing anything.
A short impact list means the change is contained. A long one means the type's public contract is load-bearing and should be preserved; it does not mean the agent has to read every file in it.
Node IDs use Roslyn's fully qualified format, for example MyApp.Orders.OrderService or
MyApp.Orders.OrderService.GetOrderAsync(System.Guid). Pass the IDs that the graph tools return
as they are.
// graph_impact_analysis("/abs/path/MyApp.sln", "MyApp.Orders.IOrderRepository")
{
"affectedIds": ["MyApp.Orders.OrderService", "MyApp.Api.OrdersController"],
"affectedFiles": {
"MyApp.Orders.OrderService": "/abs/path/Orders/OrderService.cs",
"MyApp.Api.OrdersController": "/abs/path/Api/OrdersController.cs"
}
}To make your agent follow this workflow, copy docs/AGENTS-template.md
into the AGENTS.md of your project.
FAQ
Is it a background service? No. It is an MCP stdio server: the client starts it when a session opens and stops it when the session ends.
What state does it keep? Only the graph files written next to each .sln. The inspection tools
read the files you pass and keep nothing.
Does it read my whole solution? Only the graph tools do. inspect_file and inspect_context
read just the files you give them.
Build and test
dotnet build
dotnet testLicense
MIT © nushey
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Related MCP Servers
- AlicenseBqualityCmaintenanceTransforms codebases into structural knowledge graphs for AI agents and developers, providing precise architectural awareness and dependency mapping.1537MIT
- AlicenseNot gradedqualityAmaintenanceProvides C# coding agents with compiler-accurate symbol analysis, including references, renames, and impact analysis for .NET solutions.MIT
- FlicenseNot gradedqualityAmaintenanceProvides efficient code navigation and graph-based analysis for AI agents, enabling symbol resolution, callers, implementations, and type schemas with minimal token usage.-
- FlicenseAqualityAmaintenanceAIContextBuilder (AICB): Roslyn MCP server for C#/.NET code intelligence. Gives coding agents semantic code analysis and navigation instead of text search: callers, change impact, implementations, dependency injection, covering tests, side effects, dead code and token-budgeted context. Installs as a dotnet tool and analyzes any csharp solution locally.5411-