DanMarshall909/dotnet-mcp
3.2
If you are the rightful owner of dotnet-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A robust Model Context Protocol (MCP) server for .NET code analysis and refactoring with comprehensive auto-fix capabilities.
Tools
10
Resources
0
Prompts
0
.NET MCP Server
A robust Model Context Protocol (MCP) server for .NET code analysis and refactoring with comprehensive auto-fix capabilities.
🚀 Features
- 10 MCP Tools for comprehensive code analysis and refactoring
- Auto-fix system for common code issues (using statements, nullability, async methods)
- Batch refactoring with atomic operations and rollback support
- Fallback analysis strategies - tools never completely fail
- Solution-wide analysis with dependency graph detection
- Build validation before Roslyn analysis
- Structured error handling with actionable suggestions
🛠️ Available Tools
extract_method
- Extract code into new methodsrename_symbol
- Rename symbols throughout the codebaseextract_interface
- Extract interfaces from classesfind_symbol
- Find symbols with advanced filteringget_class_context
- Get comprehensive class contextanalyze_project_structure
- Analyze project architecturefind_symbol_usages
- Find symbol usages with impact analysisanalyze_solution
- Analyze solution structure and dependenciesauto_fix
- Apply automatic fixes to common code issuesbatch_refactor
- Apply multiple refactoring operations in sequence
📦 Quick Start
-
Build the server:
dotnet build src/DotNetMcp.Server/DotNetMcp.Server.csproj
-
Run the MCP server:
./release/DotNetMcp.Server
-
Configure your MCP client to use the server
🏗️ Architecture
- Clean architecture with MediatR and CQRS patterns
- Fallback analysis strategies: Semantic → Syntax → Text → Hybrid
- Comprehensive error handling with structured error types
- Token optimization for efficient LLM interactions
📖 Documentation
- - Latest features and improvements
- - Comprehensive implementation details
- - Development setup
🎯 Production Ready
The MCP server is robust enough for production use with complex enterprise codebases. The fallback strategy system ensures users always get valuable results, even when preferred semantic analysis isn't possible.