Dotnetdevmcp logo

Dotnetdevmcp

Roslyn-based .NET code navigation, refactoring, builds, tests, analysis, and concurrent workflows over MCP.

Install Dotnetdevmcp

Run the project’s own setup commands, in order.

Setup steps from the project

dotnetdevmcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to Claude Code
    claude mcp add dotnetdevmcp -- dnx DotNetDevMCP --yes
    
  2. 2. Install
    docker build -t dotnetdevmcp https://github.com/csa7mdm/DotNetDevMCP.git#v0.3.4
    
  3. 3. Run
    docker run --rm -v "${PWD}:/src" -v dotnetdevmcp-nuget:/home/mcp/.nuget/packages --memory 8g --memory-swap 8g --pids-limit 512 --cap-drop ALL --security-opt no-new-privileges --entrypoint dotnet dotnetdevmcp restore /src/YourSolution.sln
    
  4. 4. Add to Claude Code
    claude mcp add dotnetdevmcp -- docker run -i --rm --network none -v "${PWD}:/src" -v dotnetdevmcp-nuget:/home/mcp/.nuget/packages:ro --memory 8g --memory-swap 8g --pids-limit 512 --cap-drop ALL --security-opt no-new-privileges dotnetdevmcp --load-solution /src/YourSolution.sln
    

Overview

Roslyn-based .NET development is exposed through the dotnetdevmcp MCP server, which combines compiler-aware code tools with the dotnet CLI. It can load a solution, inspect symbols, apply syntax-aware edits, build projects, run tests, select affected tests, and analyze project dependencies. Its orchestration tools execute server operations concurrently or as dependency graphs with resource limits. Reach for it when an AI coding agent needs structured .NET tooling instead of text search and sequential shell commands.

Use cases

  • Navigate symbols and implementations across a .NET solution
  • Apply Roslyn-aware refactorings across projects
  • Run only tests affected by changed files
  • Execute builds and tests concurrently
  • Detect circular project dependencies

Key features

  • Roslyn code navigation and syntax-aware editing
  • Structured .NET build and test operations
  • Affected-test discovery and execution
  • Project dependency and quality analysis
  • Concurrent and dependency-graph orchestration
  • Optional Git and process monitoring tools

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 68d

How Dotnetdevmcp works

What dotnetdevmcp MCP server does

The dotnetdevmcp MCP server gives AI coding agents access to .NET development operations through MCP. It uses Roslyn to work with the compiler's view of a loaded solution, including symbol definitions, references, implementations, syntax-aware replacements, and refactoring operations. It also invokes the .NET CLI for restore, build, clean, and test tasks.

The default installation registers 37 tools. Optional Git and monitoring groups increase the total to 53 tools. Git tools are disabled by default, as are monitoring tools, so sessions do not automatically receive those additional tool definitions.

This fits the 💻 Developer Tools category and is intended for repository-level work such as navigating a solution, changing members across projects, checking dependency structure, and validating edits.

How it works

The server communicates with an MCP client over stdio by default. It can also provide Streamable HTTP on localhost when started with --http and a port. Roslyn loads a solution either at startup through --load-solution or later through SharpTool_LoadSolution.

Code edits operate on files and return compile-check output. They do not create Git branches or commits unless --git-commit-edits is supplied. The undo operation requires that opt-in Git behavior.

Affected-test selection starts with changed files, follows Roslyn references to test methods, and can run only the tests reached by that analysis. The change set defaults to the Git working tree, with a branch comparison available through gitBase. A dry-run mode lists selected tests without executing them.

Orchestration can dispatch any server tool concurrently with orchestrate_parallel, or arrange tools as a dependency graph with execute_workflow. Resource limits throttle execution, and a failed dependency prevents dependent steps from running.

Setup and configuration

The dotnetdevmcp MCP server requires the .NET 10 SDK. A first-run setup can use dnx DotNetDevMCP --yes, which downloads the package from NuGet.org. A permanent installation is also available through dotnet tool install -g DotNetDevMCP, after which the dotnetdevmcp command can be used.

Configure the server in an MCP client using its stdio command and arguments. Add --load-solution <path> to load a solution on startup. Use --enable git and --enable monitoring to register the optional groups. --clean-env starts dotnet and git with a minimal environment so environment-based tokens and cloud credentials are not passed to those processes.

HTTP mode is restricted to localhost and has no authentication. The server rejects foreign Origin and non-localhost Host headers. Additional permitted origins can be supplied with repeatable --allowed-origin arguments; this does not add browser CORS support.

Tools and capabilities

  • Search definitions, references, implementations, and symbols with Roslyn.
  • Rename, add, overwrite, or move members; manage usings and attributes; and perform syntax-aware find-and-replace operations.
  • Run dotnet restore, build, clean, and test operations with structured diagnostics.
  • Discover tests and select tests affected by changed code, including messages and stack traces from parsed TRX results.
  • Inspect project dependency graphs, circular dependencies, quality metrics, and outdated packages.
  • Run builds, tests, analysis, and other server tools in parallel or through dependency-aware workflows.
  • Optionally manage Git operations and monitor process performance, garbage collection, resources, health, and profiling sessions.

Limitations and notes

The server is tied to the .NET 10 SDK according to its installation requirements. HTTP mode is localhost-only and unauthenticated. Git and monitoring capabilities are not available unless explicitly enabled.

The affected-test algorithm follows references to recognized test attributes and limits traversal with maxDepth, which defaults to eight hops. Orchestration benchmarks measure scheduling-engine overhead using delayed stand-ins rather than actual dotnet execution, so they should not be treated as build or test performance measurements.

The dotnetdevmcp MCP server can be used without enabling Git, but SharpTool_Undo then returns an explanatory error because its revert behavior depends on Git commits created with --git-commit-edits.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Dotnetdevmcp

dotnetdevmcp is an MCP server that connects AI coding agents to .NET solutions through Roslyn and the dotnet CLI. Its main tools support code navigation, syntax-aware refactoring, builds, test discovery and execution, affected-test selection, dependency analysis, and concurrent workflow orchestration.

Install the required .NET 10 SDK, then run `dnx DotNetDevMCP --yes` through your MCP client's stdio configuration. For a permanent installation, use `dotnet tool install -g DotNetDevMCP` and configure the `dotnetdevmcp` command.

Yes, dotnetdevmcp works with Cursor through its stdio MCP configuration. Set the command to `dnx` and pass `DotNetDevMCP`, `--yes`, and optional arguments such as `--load-solution`.

Pass `--load-solution <path>` when starting dotnetdevmcp, or let the agent call `SharpTool_LoadSolution` after startup. The loaded solution provides the basis for Roslyn navigation, refactoring, analysis, and affected-test selection.

dotnetdevmcp starts with changed files, follows Roslyn references to recognized test methods, and runs the tests it reaches. Changes default to the Git working tree; `gitBase` can compare against a branch, and `dryRun` lists tests without running them.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDotnetdevmcp AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dotnetdevmcp?style=directory)](https://allmcps.com/mcp/dotnetdevmcp)
HTML Embed
<a href="https://allmcps.com/mcp/dotnetdevmcp"><img src="https://allmcps.com/api/badge/dotnetdevmcp?style=directory" alt="Dotnetdevmcp on AllMCPs" /></a>