
carquiza/roslynmcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Microsoft Roslyn을 사용하여 C# 코드 분석 기능을 제공하는 모델 Context Protocol (MCP) 서버
개요
C# MCP (Model Context Protocol) 서버는 Microsoft의 Roslyn 컴파일러 플랫폼과 통합하여 C# codebases에 대한 코드 분석 및 탐색 기능을 제공합니다. - 패턴 매칭 (*Service, Get*User 등)을 사용하여 클래스, 방법 및 속성 찾기 - - 전체 솔루션의 모든 사용량을 파악 - - 유형, 방법, 특성 등에 대한 자세한 정보를 얻으십시오 - 분석 프로젝트 의존성 및 네임스페이스 사용 패턴 - - cyclomatic 복잡성 미터를 사용하여 높은 복잡성 방법을 식별 - - - 대용량 캐싱 및 대형 코덱을위한 증가 분석 - 입력 유효성 및 경로 위생 - .NET 8.0 SDK 이상 - Visual Studio 2022 또는 VS Code (개발 권장) - Claude 데스크톱 응용 프로그램 이 MCP 서버를 Claude Desktop에 연결하려면 Claude Desktop 구성 파일을 수정해야합니다. - : %APPDATA%\Claude\claude desktop config.json - : ~/Library/Application Support/Claude/claude desktop config.
개요(AI 번역)
C# MCP (Model Context Protocol) 서버는 Microsoft의 Roslyn 컴파일러 플랫폼과 통합하여 C# codebases에 대한 코드 분석 및 탐색 기능을 제공합니다.
특징
- Wildcard Symbol Search - 패턴 매칭(
*Service,Get*User등)을 사용하여 클래스, 방법 및 속성을 찾습니다. -Reference Tracking - 전체 솔루션의 모든 활용을 파악 - Symbol Information - 유형, 방법, 특성 등에 대한 자세한 정보를 얻으십시오.
- Dependency Analysis - 분석 프로젝트 의존성 및 네임스페이스 사용 패턴 -Code Complexity Analysis - cyclomatic Complexity metrics를 이용한 고소성 방법 식별 -Performance Optimized - 대형 코덱을 위한 다중 레벨 캐싱 및 증가 분석
- Security - 입력 유효성 및 경로 위생
필수품
- .NET 8.0 SDK 이상
- Visual Studio 2022 또는 VS Code (개발 권장)
- Claude 데스크탑 응용
설치
-
**Clone 또는 프로젝트를 다운로드 **
-
** NuGet 패키지를 복원 **
-
**프로젝트 구축 **
-
** 서버 테스트 ** (선택 사항)
빠른 설치
윈도우
PowerShell 설정 스크립트를 실행:
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Roslyn MCP Server
A C# MCP (Model Context Protocol) server that integrates with Microsoft’s Roslyn compiler platform to provide Claude Desktop with code analysis and navigation capabilities for C# codebases.
Features
- Wildcard Symbol Search - Find classes, methods, and properties using pattern matching (
*Service,Get*User, etc.) - Reference Tracking - Locate all usages of symbols across entire solutions
- Symbol Information - Get detailed information about types, methods, properties, and more
- Dependency Analysis - Analyze project dependencies and namespace usage patterns
- Code Complexity Analysis - Identify high-complexity methods using cyclomatic complexity metrics
- Performance Optimized - Multi-level caching and incremental analysis for large codebases
- Security - Input validation and path sanitization
Prerequisites
- .NET 8.0 SDK or later
- Visual Studio 2022 or VS Code (recommended for development)
- Claude Desktop application
Installation
-
Clone or download the project
git clone https://github.com/carquiza/RoslynMCP.git cd RoslynMCP/RoslynMcpServer -
Restore NuGet packages
dotnet restore -
Build the project
dotnet build -
Test the server (optional)
dotnet run
Quick Setup
Windows
Run the PowerShell setup script:
.\setup.ps1
Linux/macOS
Run the installation test:
./test-installation.sh
Claude Desktop Configuration
To connect this MCP server to Claude Desktop, you need to modify the Claude Desktop configuration file:
Configuration File Location
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Configuration Content
Add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"roslyn-code-navigator": {
"command": "dotnet",
"args": [
"run",
"--project",
"/path/to/RoslynMCP/RoslynMcpServer"
],
"env": {
"DOTNET_ENVIRONMENT": "Production",
"LOG_LEVEL": "Information"
}
}
}
}
Important: Replace /path/to/RoslynMCP/RoslynMcpServer with the actual absolute path to your project directory.
Usage
Once configured, restart Claude Desktop. You should see the Roslyn MCP Server appear in the available tools. Here are some example queries:
Search for Symbols
Search for all classes ending with 'Service' in my solution at C:\MyProject\MyProject.sln
Find References
Find all references to the UserRepository class in C:\MyProject\MyProject.sln
Get Symbol Information
Get information about the CalculateTotal method in C:\MyProject\MyProject.sln
Analyze Dependencies
Analyze dependencies for the solution at C:\MyProject\MyProject.sln
Code Complexity Analysis
설치
npx @modelcontextprotocol/inspector dotnet run --project ./RoslynMcpServer설정
{
"mcpServers": {
"roslyn-code-navigator": {
"command": "dotnet",
"args": [
"run",
"--project",
"/path/to/RoslynMCP/RoslynMcpServer"
],
"env": {
"DOTNET_ENVIRONMENT": "Production",
"LOG_LEVEL": "Information"
}
}
}
}