SharpToolsMCP
by kooshi·★ 197·Score 50
A comprehensive MCP server for C# development with Roslyn-powered code analysis and modification capabilities.
Overview
SharpTools is a robust MCP server that leverages the .NET Compiler Platform (Roslyn) to provide AI agents with advanced capabilities for understanding, analyzing, and modifying C# codebases. It goes beyond simple text-based operations to offer deep static analysis and precise code manipulation, effectively acting as a simple IDE designed specifically for AI users. The server exposes numerous tools via MCP through both Server-Sent Events (SSE) for remote clients and Standard I/O for local process communication.
Try asking AI
After installing, here are 3 things you can ask your AI assistant:
When to choose this
Choose SharpTools when working with C# codebases and need AI to perform deep analysis, refactoring, or code modifications beyond simple text operations.
When NOT to choose this
Avoid if you're not working with C# code, or if you need a more general-purpose code analysis tool that supports multiple programming languages.
Tools this server exposes
12 tools extracted from the READMESharpTool_LoadSolutionInitializes the workspace with a given .sln file.
SharpTool_LoadProjectProvides a detailed structural overview of a specific project within the loaded solution.
SharpTool_GetMembersLists members (methods, properties, etc.) of a type with signatures and XML documentation.
SharpTool_ViewDefinitionDisplays the source code of a symbol with contextual information.
SharpTool_FindReferencesLocates all usages of a symbol across the solution with code snippets.
SharpTool_AddMemberAdds a new member (method, property, field, nested type, etc.) to a specified type.
SharpTool_OverwriteMemberReplaces the definition of an existing member or type with new code, or deletes it.
SharpTool_RenameSymbolRenames a symbol and updates all its references throughout the solution.
SharpTool_FindAndReplacePerforms regex-based find and replace operations within a specified symbol or files matching a pattern.
SharpTool_UndoReverts the last applied change using Git integration.
SharpTool_ReadRawFromRoslynDocumentReads the raw content of a file without indentation.
SharpTool_CreateRoslynDocumentCreates a new file with specified content.
Comparable tools
Installation
Installation
Prerequisites
- .NET 8+ SDK
- .NET SDK of the target solution
Building
dotnet build SharpTools.slnSSE Server (HTTP)
cd SharpTools.SseServer
dotnet run -- --port 3001 --log-file ./logs/mcp-sse-server.log --log-level DebugStdio Server Configuration (VSCode Copilot)
"mcp": {
"servers": {
"SharpTools": {
"type": "stdio",
"command": "/path/to/repo/SharpToolsMCP/SharpTools.StdioServer/bin/Debug/net8.0/SharpTools.StdioServer",
"args": [
"--log-directory",
"/var/log/sharptools/",
"--log-level",
"Debug"
]
}
}
}Compare SharpToolsMCP with
Last updated · Auto-generated from public README + GitHub signals.