DotNetDevMCP

Architecture

A map for contributors. The code is in csa7mdm/DotNetDevMCP.

Projects

flowchart TB
    Server["DotNetDevMCP.Server<br/>CLI options, tool registration, stdio / HTTP"]
    CI["CodeIntelligence<br/>Roslyn workspace, SharpTool_* (fork of SharpTools)"]
    Testing["Testing<br/>dotnet test runner, TRX parsing, affected-test selection"]
    Build["Build<br/>dotnet build, restore, clean"]
    Analysis["Analysis<br/>dependencies, quality"]
    Orch["Orchestration<br/>ConcurrentExecutor, WorkflowEngine, ResourceManager"]
    SC["SourceControl<br/>git tools (opt-in)"]
    Mon["Monitoring<br/>process metrics (opt-in)"]
    Core["Core<br/>shared interfaces and models"]

    Server --> CI & Testing & Build & Analysis & Orch
    Server -. "--enable git" .-> SC
    Server -. "--enable monitoring" .-> Mon
    Testing --> CI
    CI & Testing & Orch --> Core
Project Start reading at
Server Program.cs: options and AddServices, the one place every tool is registered
CodeIntelligence Services/SolutionManager.cs (loading), Mcp/Tools/AnalysisTools.cs (find references), Services/CodeModificationService.cs (edits)
Testing TestRunner.cs (VSTest and Microsoft.Testing.Platform), AffectedTestFinder.cs (the reference walk), Mcp/Tools/TestingTools.cs
Orchestration WorkflowEngine.cs, ConcurrentExecutor.cs, Mcp/Tools/OrchestrationTools.cs

A tool call, end to end

sequenceDiagram
    participant Client as MCP client
    participant Server as DotNetDevMCP (stdio)
    participant Tool as tool method
    participant Ext as Roslyn / dotnet / git
    Client->>Server: tools/call {name, arguments} (JSON-RPC on stdin)
    Server->>Tool: bind arguments, inject services
    Tool->>Ext: in-process Roslyn call, or a child process
    Ext-->>Tool: result
    Tool-->>Server: object (serialized to JSON)
    Server-->>Client: result (stdout)

Two consequences of stdio that every contributor should know:

Design decisions

Architecture decision records are in docs/architecture/adr, starting with why the Roslyn tools are a fork of SharpTools rather than a package reference.

How affected tests are chosen: Affected Tests. Next: Contributing.