# CSharp.Refactor MCP server

> Provides offline Roslyn-based analyzers to find and fix performance, correctness, and idiomatic issues in C# code.

- Repository: https://github.com/Thorium/csharp-refactor
- Page: https://hostedmcp.org/servers/thorium/csharp-refactor
- Transport: stdio
- Stars: 3
- License: Unlicense
- Latest version: 0.1.20

## FAQ

### Does this tool use AI?

No, the tool is fully offline and does not use AI, although AI was used to help create it.

### Can I use this in an agentic workflow?

Yes, the dotnet tool supports MCP, allowing you to serve analyze and list_rules functions over stdio.

### Will the refactoring break my build?

The tool refuses a compilation that does not already build and recompiles in memory after every pass, putting fixes back if the final build fails.

### What kind of rules does it provide?

The rules focus on correctness, measured performance, and clear idiomatic C#, rather than naming or layout conventions.
