# dotnetdevmcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/csa7mdm/DotNetDevMCP  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/dotnetdevmcp

## Description
MCP server for .NET: Roslyn code navigation and refactoring, build, and affected-test selection.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/csa7mdm/DotNetDevMCP), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to Claude Code:

```sh
claude mcp add dotnetdevmcp -- dnx DotNetDevMCP --yes
```

2. Install:

```sh
docker build -t dotnetdevmcp https://github.com/csa7mdm/DotNetDevMCP.git#v0.3.4
```

3. Run:

```sh
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. Add to Claude Code:

```sh
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
```

## Documentation

## 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`.

_Full upstream README: https://allmcps.com/mcp/dotnetdevmcp/readme_

