MCP Catalogs
Home

SharpToolsMCP

by kooshi·197·Score 50

A comprehensive MCP server for C# development with Roslyn-powered code analysis and modification capabilities.

developer-toolsai-llmfile-system
31
Forks
8
Open issues
2 mo ago
Last commit
2d ago
Indexed

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:

you:AI-powered C# code analysis and refactoring
you:Automated code modification and generation
you:C# solution navigation and documentation generation

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 README
  • SharpTool_LoadSolution

    Initializes the workspace with a given .sln file.

  • SharpTool_LoadProject

    Provides a detailed structural overview of a specific project within the loaded solution.

  • SharpTool_GetMembers

    Lists members (methods, properties, etc.) of a type with signatures and XML documentation.

  • SharpTool_ViewDefinition

    Displays the source code of a symbol with contextual information.

  • SharpTool_FindReferences

    Locates all usages of a symbol across the solution with code snippets.

  • SharpTool_AddMember

    Adds a new member (method, property, field, nested type, etc.) to a specified type.

  • SharpTool_OverwriteMember

    Replaces the definition of an existing member or type with new code, or deletes it.

  • SharpTool_RenameSymbol

    Renames a symbol and updates all its references throughout the solution.

  • SharpTool_FindAndReplace

    Performs regex-based find and replace operations within a specified symbol or files matching a pattern.

  • SharpTool_Undo

    Reverts the last applied change using Git integration.

  • SharpTool_ReadRawFromRoslynDocument

    Reads the raw content of a file without indentation.

  • SharpTool_CreateRoslynDocument

    Creates a new file with specified content.

Comparable tools

roslyn-mcpcsharp-ls-mcpide-mcp

Installation

Installation

Prerequisites

  • .NET 8+ SDK
  • .NET SDK of the target solution

Building

dotnet build SharpTools.sln

SSE Server (HTTP)

cd SharpTools.SseServer
dotnet run -- --port 3001 --log-file ./logs/mcp-sse-server.log --log-level Debug

Stdio 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.