
dotnet-mcp
io.github.jongalloway/dotnet-mcp
AI assistant access to .NET SDK for projects, packages, building, testing, and development tools.
Documentation
.NET MCP Server
Give your AI assistant superpowers for .NET development! This MCP server connects GitHub Copilot, Claude, and other AI assistants directly to the .NET SDK, enabling them to create projects, manage packages, run builds, and moreβall through natural language.
Quick Install
Click to install in your preferred environment:
Note: Quick install requires .NET 10 SDK. See manual installation for .NET 9 support.
What is This?
The .NET MCP Server is a bridge that connects AI assistants to the .NET SDK using the Model Context Protocol. Think of it as giving your AI assistant a direct line to dotnet commands, but with intelligence and context.
graph LR
A[AI Assistant<br/>Copilot/Claude] -->|Natural Language| B[.NET MCP Server]
B -->|dotnet commands| C[.NET SDK]
C -->|Results| B
B -->|Structured Response| A
style A fill:#e1f5ff
style B fill:#fff4e6
style C fill:#e8f5e9
Why Use It?
π Faster Development
Instead of remembering exact dotnet commands and syntax, just ask:
- "Create a new web API project with Entity Framework"
- "Add the Serilog package and configure structured logging"
- "Update all my NuGet packages to the latest versions"
π§ Smarter AI Assistance
Your AI assistant gets direct access to:
- All installed .NET templates and their parameters
- NuGet package search and metadata
- Framework version information (including LTS status)
- Your solution and project structure
π― Why Not Just Let the AI Call dotnet Directly?
The .NET MCP Server provides context and intelligence that raw CLI execution cannot:
1. Template Discovery & Validation
- With MCP: AI knows exactly which templates are installed (
console,webapi,blazor, etc.) and their parameters - Without MCP: AI guesses template names and parameters, often getting them wrong
2. Framework Intelligence
- With MCP: AI knows which .NET versions are installed, which are LTS, and can recommend appropriately
- Without MCP: AI suggests
net8.0when you only havenet9.0installed, leading to errors
3. Rich Tool Descriptions
- With MCP: Each tool has detailed parameter descriptions and constraints (e.g., "configuration must be Debug or Release")
- Without MCP: AI constructs commands from general knowledge, missing version-specific changes
4. Parameter Information
- With MCP: AI sees template parameters like
--use-controllers,--auth, framework options - Without MCP: AI doesn't know what optional parameters exist for each template
5. Package Search Integration
- With MCP: AI can search NuGet.org to find exact package names and versions
- Without MCP: AI guesses package names, often suggesting outdated or incorrect ones
6. Structured Error Handling
- With MCP: Errors are parsed and returned in structured format the AI can understand
- Without MCP: AI gets raw stderr output and may misinterpret errors
7. MCP Resources
MCP Resources provide read-only access to structured metadata about your .NET environment:
- dotnet://sdk-info - Information about installed .NET SDKs (versions and paths)
- dotnet://runtime-info - Information about installed .NET runtimes (versions and types)
- dotnet://templates - Complete catalog of installed .NET templates with metadata
- dotnet://frameworks - Information about supported .NET frameworks (TFMs) including LTS status
This enables AI assistants to:
- Answer questions without executing commands ("What .NET versions do I have installed?")
- Provide context-aware suggestions based on your actual environment
- Access structured JSON data more efficiently than parsing CLI output
- Reference official .NET metadata for accurate recommendations
Example: Using resources for context-aware assistance
β Without Resources:
User: "What .NET versions do I have?"
AI: Executes dotnet --list-sdks and parses output
User: "Which is LTS?"
AI: Executes dotnet --info and tries to parse support info
β
With Resources:
User: "What .NET versions do I have?"
AI: Reads dotnet://sdk/list resource (no execution needed)
Returns: .NET 8.0 (LTS), .NET 9.0 (STS), .NET 10.0 (LTS)
User: "Which is LTS?"
AI: Already knows from resource metadata - .NET 8.0, .NET 10.0
Example: Creating a Blazor project with authentication
β Without MCP:
AI: "I'll run: dotnet new blazor --auth Individual"
Result: Error - template 'blazor' doesn't support --auth parameter
β
With MCP:
AI: Queries dotnet_template_info for 'blazor'
Sees available parameters: --interactivity, --use-program-main, --empty
Uses dotnet_template_search to find authentication templates
AI: "I'll create a Blazor Web App with authentication using the correct template..."
Result: Success - uses 'blazor' template with proper authentication configuration
β¨ Consistent Results
The MCP server uses official .NET SDK APIs and CLI commands, ensuring:
- Accurate template information from the Template Engine
- Reliable command execution
- Proper error handling and validation
π Secure by Design
- Runs locally on your machine
- No data sent to external servers
- You control what commands execute
- Standard .NET security model applies
- Automatic secret redaction to protect sensitive information in CLI output
- Connection strings, passwords, and API keys are automatically redacted
- Implemented using optimized regular expressions with <1% performance overhead
- References Microsoft.Extensions.Compliance.Redaction for future integration
- Opt-out available with
unsafeOutput=truefor advanced debugging - Patterns include: database credentials, cloud provider keys, tokens, certificates, and more
- Performance impact is minimal and tested to complete within 500ms for 10,000 lines
How It Works
sequenceDiagram
participant User
participant AI as AI Assistant
participant MCP as .NET MCP Server
participant SDK as .NET SDK
User->>AI: "Create a console app called MyApp"
AI->>MCP: dotnet_project_new(template: "console", name: "MyApp")
MCP->>SDK: dotnet new console -n MyApp
SDK-->>MCP: Project created successfully
MCP-->>AI: Structured result with output
AI-->>User: "I've created a new console app called MyApp"
The .NET MCP Server acts as an intelligent middleware that:
- Translates natural language requests into structured .NET SDK operations
- Validates parameters using official SDK metadata (templates, frameworks, packages)
- Executes commands safely with proper error handling
- Returns structured results that AI assistants can understand and explain
Installation
Requirements
- For Quick Install: .NET 10 SDK (launching November 2025)
- For Manual Install: .NET 9.0 SDK or later
- Visual Studio Code, Visual Studio 2022 (v17.13+), or Claude Desktop
Option 1: Quick Install (Recommended)
Use the install badges at the top of this page to automatically configure the MCP server in your environment. The server will be downloaded from NuGet.org on first use.
Option 2: Manual Configuration
Follow the instructions below for your specific development environment:
Visual Studio Code
Using Quick Install (recommended - .NET 10 required):
- Click the VS Code Install badge at the top of this page
- Or manually add via Command Palette:
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Run "GitHub Copilot: Add MCP Server"
- Enter:
- Name:
dotnet - Type:
stdio - Command:
dnx - Arguments:
Community.Mcp.DotNet@0.1.0-* --yes
- Name:
- Press
Manual Configuration (for .NET 9 or source builds):
Edit your VS Code settings (Ctrl+, or Cmd+,, search for "mcp"):
{
"github.copilot.chat.mcp.servers": {
"dotnet": {
"type": "stdio",
"command": "dotnet",
"args": ["run", "--project", "/path/to/dotnet-mcp/DotNetMcp/DotNetMcp.csproj"]
}
}
}
π Full VS Code MCP documentation
Visual Studio 2022
Requirements: Visual Studio 2022 version 17.13 or later
Using Quick Install (recommended - .NET 10 required):
- Click the Visual Studio Install badge at the top of this page
- Or manually add via Options:
- Go to Tools > Options > GitHub Copilot > MCP Servers
- Click Add
- Enter:
- Name:
dotnet - Type:
stdio - Command:
dnx - Arguments:
Community.Mcp.DotNet@0.1.0-* --yes
- Name:
Manual Configuration (for .NET 9 or source builds):
- Go to Tools > Options > GitHub Copilot > MCP Servers
- Click Add
- Enter:
- Name:
dotnet - Type:
stdio - Command:
dotnet - Arguments:
run --project C:\path\to\dotnet-mcp\DotNetMcp\DotNetMcp.csproj
- Name:
π Full Visual Studio MCP documentation
Claude Desktop
Using DNX (recommended - .NET 10 required):
macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"dotnet": {
"command": "dnx",
"args": ["Community.Mcp.DotNet@1.0.0", "--yes"]
}
}
}
Windows: Edit %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"dotnet": {
"command": "dnx",
"args": ["Community.Mcp.DotNet@1.0.0", "--yes"]
}
}
}
Manual Configuration (for .NET 9 or source builds):
macOS:
{
"mcpServers": {
"dotnet": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/dotnet-mcp/DotNetMcp/DotNetMcp.csproj"]
}
}
}
Windows:
{
"mcpServers": {
"dotnet": {
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\dotnet-mcp\\DotNetMcp\\DotNetMcp.csproj"]
}
}
}
Usage Examples
Once configured, you can use natural language with your AI assistant:
Quick Start - Single Project
User: "Create a new web API project called WeatherService"
AI: I'll create a new web API project for you...
dotnet new webapi -n WeatherService
The project has been created successfully in the WeatherService directory.
Complex Application - Microservices with Aspire
User: "Create a server-side web app and minimal API, orchestrated by .NET Aspire, with unit tests for the API using xunit. Use slnx format for the solution."
AI: I'll create a complete microservices solution with .NET Aspire orchestration...
# Create solution with new XML format
dotnet new sln -n MyMicroservices --use-slnx
# Create .NET Aspire AppHost for orchestration
dotnet new aspire-apphost -n MyMicroservices.AppHost
# Create web app
dotnet new webapp -n MyMicroservices.Web
# Create minimal API
dotnet new webapi -n MyMicroservices.Api --use-minimal-apis
# Create test project
dotnet new xunit -n MyMicroservices.Api.Tests
# Add projects to solution
dotnet sln add MyMicroservices.AppHost/MyMicroservices.AppHost.csproj
dotnet sln add MyMicroservices.Web/MyMicroservices.Web.csproj
dotnet sln add MyMicroservices.Api/MyMicroservices.Api.csproj
dotnet sln add MyMicroservices.Api.Tests/MyMicroservices.Api.Tests.csproj
# Add project references for tests
dotnet add MyMicroservices.Api.Tests/MyMicroservices.Api.Tests.csproj reference MyMicroservices.Api/MyMicroservices.Api.csproj
Solution created with 4 projects: AppHost for orchestration, Web app, API, and unit tests. Ready to run with dotnet run --project MyMicroservices.AppHost.
Database-Driven Application with Entity Framework
User: "Set up Entity Framework Core with SQL Server for my API and create the initial database migration"
AI: I'll add EF Core packages, install the dotnet-ef tool, and create your initial migration...
# Add Entity Framework packages
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Design
# Install dotnet-ef tool globally
dotnet tool install dotnet-ef --global
# Create initial migration
dotnet ef migrations add InitialCreate
# Apply migration to create database
dotnet ef database update
Entity Framework Core with SQL Server provider added. Initial migration created and applied. Database is ready for use.
User: "I added a Product entity to my DbContext. Update the database schema"
AI: I'll create a migration for your Product entity and apply it...
# Create migration for new entity
dotnet ef migrations add AddProductEntity
# List migrations to see what's pending
dotnet ef migrations list
# Apply the migration
dotnet ef database update
Migration created for Product entity (new table with Id, Name, Price, CreatedDate columns). Database updated successfully.
User: "Generate SQL script for the last migration so I can review it before production deployment"
AI: I'll generate an idempotent SQL script from your migration...
# Generate idempotent SQL script (can be run multiple times safely)
dotnet ef migrations script --idempotent --output deploy.sql
SQL script generated to deploy.sql. This script can be safely run multiple times and will only apply changes if needed.
Database-First Development
User: "I have an existing SQL Server database. Reverse engineer it to Entity Framework classes"
AI: I'll scaffold your database into Entity Framework Core entities...
# Reverse engineer (scaffold) database to EF Core entities
dotnet ef dbcontext scaffold "Server=localhost;Database=MyExistingDb;Trusted_Connection=true;" Microsoft.EntityFrameworkCore.SqlServer --output-dir Models
# List the generated DbContext classes
dotnet ef dbcontext list
# Get detailed info about the DbContext
dotnet ef dbcontext info
Database scaffolded successfully. Generated MyExistingDbContext.cs and 15 entity classes (Customer, Order, Product, etc.) in the Models folder.
Multi-Target Testing Strategy
User: "Add integration tests using NUnit that target both .NET 8 and .NET 9, and configure them to run with code coverage"
AI: I'll set up multi-targeted integration tests with coverage...
# Create NUnit test project
dotnet new nunit -n MyMicroservices.IntegrationTests
# Update project to multi-target (edit .csproj)
# <TargetFrameworks>net8.0;net9.0</TargetFrameworks>
# Add integration test packages
dotnet add MyMicroservices.IntegrationTests package Microsoft.AspNetCore.Mvc.Testing
dotnet add MyMicroservices.IntegrationTests package coverlet.collector
# Run tests with coverage for both frameworks
dotnet test --collect:"XPlat Code Coverage"
Integration test project created with multi-targeting. Tests will run on both .NET 8 and .NET 9 with code coverage enabled.
Exploring and Discovering
User: "What templates are available for creating cloud-native applications?"
AI: Let me search for cloud-native related templates...
dotnet new search aspire
dotnet new search dapr
dotnet new search azure
Found templates:
aspire- .NET Aspire Applicationaspire-apphost- .NET Aspire App Hostaspire-servicedefaults- .NET Aspire Service Defaultsdapr- Dapr application templates- Various Azure Functions and Container Apps templates
Each template is designed for cloud-native microservices and distributed applications.
Modernization Workflow
User: "Update all packages to latest versions, format all code to match our editorconfig rules, then build and run tests"
AI: I'll update packages, format code, build, and test...
# Update all packages to latest compatible versions
dotnet package update
# Format all code according to .editorconfig
dotnet format
# Clean and rebuild
dotnet clean
dotnet build -c Release
# Run all tests
dotnet test --logger "console;verbosity=detailed"
All packages updated to latest versions. Code formatted consistently across solution. Build succeeded with 0 warnings. All 156 tests passed.
HTTPS Development Setup
User: "I'm getting HTTPS certificate errors when running my web app"
AI: Let me check your HTTPS development certificate...
# Check certificate status
dotnet dev-certs https --check --trust
Your certificate isn't trusted. Let me fix that...
# Trust the certificate (may require elevation)
dotnet dev-certs https --trust
Certificate is now trusted. Try running your app again. If you're using Docker, you can export the certificate:
# Export for Docker containers
dotnet dev-certs https --export-path ./certs/aspnetapp.pfx --password "SecurePassword123!"
Certificate exported to ./certs/aspnetapp.pfx. You can now mount it in your Docker container.
Secure Configuration with User Secrets
User: "Set up user secrets for my API project with a database connection string"
AI: I'll initialize user secrets for your project...
# Initialize user secrets (adds UserSecretsId to project file)
dotnet user-secrets init --project MyApi/MyApi.csproj
Now I'll add your database connection string securely...
# Store connection string (not committed to Git)
dotnet user-secrets set "ConnectionStrings:DefaultConnection" "Server=localhost;Database=MyDb;User=dev;Password=secret123"
Secret stored! You can also add API keys:
# Add Azure OpenAI API key
dotnet user-secrets set "Azure:OpenAI:ApiKey" "sk-..."
# Add SendGrid API key
dotnet user-secrets set "SendGrid:ApiKey" "SG...."
Let me show you what's configured:
# List all secrets
dotnet user-secrets list
Output:
ConnectionStrings:DefaultConnection = Server=localhost;Database=MyDb;User=dev;Password=secret123
Azure:OpenAI:ApiKey = sk-...
SendGrid:ApiKey = SG....
These secrets are stored in your user profile (not in the project) and won't be committed to Git. In your code, access them like:
var connectionString = builder.Configuration["ConnectionStrings:DefaultConnection"];
var apiKey = builder.Configuration["Azure:OpenAI:ApiKey"];
Note: User secrets are for development only. Use Azure Key Vault or environment variables for production.
Available Tools
The server provides comprehensive .NET development capabilities through MCP tools and resources:
MCP Resources (Read-Only Context)
The server exposes read-only resources that provide efficient access to .NET environment metadata:
- dotnet://sdk-info - Information about installed .NET SDKs (versions and paths)
- dotnet://runtime-info - Information about installed .NET runtimes (versions and types)
- dotnet://templates - Complete catalog of installed .NET templates with metadata
- dotnet://frameworks - Information about supported .NET frameworks (TFMs) including LTS status
Resources provide structured JSON data and are more efficient than tool calls for frequently accessed read-only information.
Tools - Templates & Frameworks
- dotnet_template_list - List all installed .NET templates with metadata
- dotnet_template_search - Search for templates by name or description
- dotnet_template_info - Get detailed template information and parameters
- dotnet_template_clear_cache - Clear template cache to force reload from disk
- dotnet_framework_info - Get .NET framework version information and LTS status
Tools - Project Management
- dotnet_project_new - Create new .NET projects from templates
- dotnet_project_restore - Restore project dependencies
- dotnet_project_build - Build .NET projects
- dotnet_project_run - Build and run .NET projects
- dotnet_project_test - Run unit tests
- dotnet_project_publish - Publish projects for deployment
- dotnet_project_clean - Clean build outputs
- dotnet_pack_create - Create NuGet packages from projects
- dotnet_watch_run - Run with file watching and hot reload
- dotnet_watch_test - Run tests with auto-restart on file changes
- dotnet_watch_build - Build with auto-rebuild on file changes
Tools - Package Management
- dotnet_package_add - Add NuGet package references
- dotnet_package_remove - Remove NuGet package references
- dotnet_package_search - Search for NuGet packages on nuget.org
- dotnet_package_update - Update NuGet packages to newer versions
- dotnet_package_list - List package references (including outdated/deprecated)
- dotnet_reference_add - Add project-to-project references
- dotnet_reference_remove - Remove project-to-project references
- dotnet_reference_list - List project references
Tools - Tool Management
- dotnet_tool_install - Install a .NET tool globally or locally to a tool manifest
- dotnet_tool_list - List installed .NET tools (global or local from manifest)
- dotnet_tool_update - Update a .NET tool to a newer version
- dotnet_tool_uninstall - Uninstall a .NET tool
- dotnet_tool_restore - Restore tools from the tool manifest (.config/dotnet-tools.json)
- dotnet_tool_manifest_create - Create a .NET tool manifest file (.config/dotnet-tools.json)
- dotnet_tool_search - Search for .NET tools on NuGet.org
- dotnet_tool_run - Run a .NET tool by its command name
Tools - Entity Framework Core
Entity Framework Core tools require the dotnet-ef tool to be installed (dotnet tool install dotnet-ef --global) and the Microsoft.EntityFrameworkCore.Design package in your project.
Migration Management:
- dotnet_ef_migrations_add - Create a new migration for database schema changes
- dotnet_ef_migrations_list - List all migrations (applied and pending)
- dotnet_ef_migrations_remove - Remove the last unapplied migration
- dotnet_ef_migrations_script - Generate SQL script from migrations for deployment
Database Management:
- dotnet_ef_database_update - Apply migrations to update database schema
- dotnet_ef_database_drop - Drop the database (development only, requires force flag)
DbContext Tools:
- dotnet_ef_dbcontext_list - List all DbContext classes in the project
- dotnet_ef_dbcontext_info - Get DbContext information (connection string, provider)
- dotnet_ef_dbcontext_scaffold - Reverse engineer database to entity classes (database-first)
Tools - Solution Management
- dotnet_solution_create - Create new solution files (.sln or .slnx format)
- dotnet_solution_add - Add projects to a solution
- dotnet_solution_list - List projects in a solution
- dotnet_solution_remove - Remove projects from a solution
Tools - Code Quality
- dotnet_format - Format code according to .editorconfig and style rules
Tools - Security & Certificates
- dotnet_certificate_trust - Trust the HTTPS development certificate (may require elevation)
- dotnet_certificate_check - Check if HTTPS certificate exists and is trusted
- dotnet_certificate_clean - Remove all HTTPS development certificates
- dotnet_certificate_export - Export HTTPS certificate to a file (supports PFX and PEM formats)
- dotnet_secrets_init - Initialize user secrets for a project (creates UserSecretsId)
- dotnet_secrets_set - Set a user secret value (stores sensitive config outside project)
- dotnet_secrets_list - List all user secrets for a project
- dotnet_secrets_remove - Remove a specific user secret by key
- dotnet_secrets_clear - Clear all user secrets for a project
Tools - Utilities
- dotnet_nuget_locals - Manage NuGet local caches (list, clear)
Tools - SDK Information
- dotnet_sdk_version - Get .NET SDK version
- dotnet_sdk_info - Get detailed SDK and runtime information
- dotnet_sdk_list - List installed SDKs
- dotnet_runtime_list - List installed runtimes
Tools - Help
- dotnet_help - Get help for any dotnet command
- dotnet_server_capabilities - Get MCP server capabilities and concurrency guidance
Building from Source
For development or contributing:
git clone https://github.com/jongalloway/dotnet-mcp.git
cd dotnet-mcp/DotNetMcp
dotnet build
Run the server:
dotnet run
The server communicates via stdio transport and is designed to be invoked by MCP clients.
Project Structure
dotnet-mcp/
βββ DotNetMcp/ # Main MCP server project
β βββ DotNetMcp.csproj # Project file with NuGet dependencies
β βββ Program.cs # MCP server setup and hosting
β βββ DotNetCliTools.cs # MCP tool implementations (44 tools)
β βββ DotNetResources.cs # MCP resource implementations (SDK, runtime, templates, frameworks)
β βββ DotNetCommandExecutor.cs # Command execution helper with logging
β βββ DotNetSdkConstants.cs # Strongly-typed SDK constants (TFMs, configurations, runtimes)
β βββ TemplateEngineHelper.cs # Template Engine integration with caching
β βββ FrameworkHelper.cs # Framework validation and metadata helpers
βββ DotNetMcp.Tests/ # Unit test project
β βββ DotNetMcp.Tests.csproj # Test project file (xUnit, FluentAssertions, Moq)
β βββ FrameworkHelperTests.cs # Tests for framework validation and metadata
β βββ DotNetSdkConstantsTests.cs # Tests for SDK constants validation
βββ doc/
β βββ sdk-integration.md # SDK integration architecture documentation
βββ .github/
β βββ copilot-instructions.md # Development guidelines for GitHub Copilot
β βββ dependabot.yml # Automated dependency updates
β βββ workflows/
β βββ build.yml # CI/CD build and test workflow
βββ DotNetMcp.slnx # Solution file (XML-based .slnx format)
βββ LICENSE # MIT License
βββ README.md # This file
Technology Stack
- Protocol: Model Context Protocol (MCP)
- SDK: MCP SDK for .NET v0.4.0-preview.2
- Runtime: .NET 9.0 (target framework)
- Transport: stdio (standard input/output)
- NuGet Packages:
Microsoft.TemplateEngine.Abstractions&Edge- Template metadataMicrosoft.Build.Utilities.Core&Microsoft.Build- Project validation
Documentation
- π SDK Integration Details - Technical architecture and SDK usage
- π Advanced Topics - Performance, logging, and security details
- π Concurrency Safety - Parallel execution guidance for AI orchestrators
- π Model Context Protocol - Official MCP specification
- π MCP C# SDK Docs - SDK documentation
Interoperability
The .NET MCP Server follows the Model Context Protocol specification and provides rich metadata for tool discovery and AI orchestration:
Server Metadata
The server includes a comprehensive server.json configuration file (.mcp/server.json) that provides:
-
Environment Variables: Optimized .NET CLI settings for MCP usage
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1- Skips first-time setupDOTNET_NOLOGO=1- Suppresses startup messages
-
Package Information: NuGet package details for easy installation via
dnx(requires .NET 10)- Package:
Community.Mcp.DotNet - Registry: NuGet.org
- Transport: stdio
- Package:
-
Tool Descriptors: Comprehensive tool metadata including:
- Tool IDs using
dotnet_prefix to avoid namespace collisions - Category tags (template, project, package, solution, etc.)
- Discovery tags for semantic search (e.g., "build", "compile", "test")
commonlyUsedflag marking the top 10 most frequently used tools
- Tool IDs using
-
Resource Descriptors: Read-only resources for efficient metadata access
dotnet://sdk-info- SDK version and path informationdotnet://runtime-info- Runtime installation detailsdotnet://templates- Template catalog with parametersdotnet://frameworks- Framework versions with LTS status
Tool Namespacing
All tools use the dotnet_ prefix in their external IDs to prevent naming collisions with other MCP servers. This follows best practices for MCP server interoperability:
Examples:
dotnet_project_new- Create new projectsdotnet_project_build- Build projectsdotnet_package_add- Add NuGet packagesdotnet_solution_create- Create solution files
Discovery Tags
The top 10 commonly used tools include semantic tags to improve discoverability:
- dotnet_template_list -
["template", "list", "discovery", "project-creation"] - dotnet_project_new -
["project", "create", "new", "template", "initialization"] - dotnet_project_restore -
["project", "restore", "dependencies", "packages", "setup"] - dotnet_project_build -
["project", "build", "compile", "compilation"] - dotnet_project_run -
["project", "run", "execute", "launch", "development"] - dotnet_project_test -
["project", "test", "testing", "unit-test", "validation"] - dotnet_package_add -
["package", "add", "nuget", "dependency", "install"] - dotnet_package_search -
["package", "search", "nuget", "discovery", "find"] - dotnet_solution_create -
["solution", "create", "new", "organization", "multi-project"] - dotnet_tool_install -
["tool", "install", "global", "local", "cli"]
These tags enable AI assistants to:
- Find relevant tools based on semantic intent
- Group related operations for workflow suggestions
- Prioritize commonly used tools in recommendations
Metadata Access
AI orchestrators can access server metadata through:
- MCP Protocol: Standard tool/resource listing via MCP SDK
- server.json: Static metadata file for registration and discovery
- Tool Attributes: Runtime metadata via
McpMetaattributes in code
For detailed integration examples, see the MCP specification and our SDK integration documentation.
Contributing
Contributions are welcome! This is a community-maintained project.
Ways to contribute:
- π Report bugs or request features via GitHub Issues
- π‘ Submit pull requests for new tools or improvements
- π Improve documentation
- β Star the repo to show support
Development setup:
- Fork the repository
- Clone your fork
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
See .github/copilot-instructions.md for development guidelines.
Troubleshooting
"dnx not found"
- Cause: .NET 10 SDK not installed
- Solution: Install .NET 10 SDK or use manual configuration with
dotnet run
"No templates found"
- Cause: .NET SDK templates not installed
- Solution: Run
dotnet new --installto install default templates
"Server not responding"
- Cause: Server crashed or failed to start
- Solution: Check logs in your MCP client, ensure .NET SDK is in PATH
Need Help?
- π Check the documentation
- π¬ Open a GitHub Issue
- π Search existing issues
Related Microsoft MCPs
This .NET MCP server focuses on .NET SDK operations (build, run, test, templates, SDK management). For specialized scenarios, consider these complementary official Microsoft MCP servers:
- NuGet MCP Server - Advanced NuGet package search, metadata, and automation scenarios beyond basic package management
- Aspire MCP Server - Runtime monitoring, telemetry, distributed tracing, and resource management for .NET Aspire applications
These MCPs work alongside the .NET MCP to provide comprehensive coverage of the .NET development lifecycle:
| Feature | .NET MCP | NuGet MCP | Aspire MCP |
|---|---|---|---|
| Primary Focus | .NET SDK operations | Package metadata/discovery | Runtime monitoring |
| Scope | CLI commands (build, run, test) | NuGet search & automation | Aspire app telemetry |
| Stage | Development time | Development/discovery time | Runtime/production |
| Example Operations | dotnet build, dotnet new | Package search, READMEs | Log viewing, tracing |
License
MIT License - see LICENSE file for details.
Community.Mcp.DotNet# nuget: Community.Mcp.DotNet