mcp-csharp-debug

Run, debug, and test C# MCP servers locally with IDE and Inspector integration.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill mcp-csharp-debug-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-csharp-debug
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/mcp-csharp-debug
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill mcp-csharp-debug-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Running and debugging C# MCP servers locally involves tricky setup: configuring mcp.json for VS Code or Visual Studio, avoiding stdout contamination that corrupts the JSON-RPC protocol, and diagnosing why tools fail to appear in GitHub Copilot Agent Mode. This Skill provides a structured workflow to get a server running, tested, and debuggable. ## Core Features & Use Cases - Local Execution & IDE Configuration: Run servers via dotnet run for stdio or HTTP transports and generate mcp.json or launch.json for VS Code and Visual Studio. - Interactive Testing: Test tools, prompts, and resources with MCP Inspector and verify tool discovery in GitHub Copilot Agent Mode. - Troubleshooting & Logging: Diagnose tool registration failures, breakpoint issues, and stdout contamination, and configure stderr-safe logging for stdio servers. - Use Case: You built an MCP server but its tools do not appear in Copilot Agent Mode. Follow the workflow to rebuild, verify [McpServerTool] attributes and WithTools registration, then confirm discovery via MCP Inspector. ## Quick Start Ask the agent to run and debug your C# MCP server project, generate the mcp.json configuration, and test its tools with MCP Inspector.

Frequently Asked Questions about mcp-csharp-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a C# MCP server in VS Code?

Create a .vscode/mcp.json registering your server and a launch.json with a coreclr configuration, then press F5 with breakpoints set in your tool methods. Build in Debug configuration, since breakpoints will not hit in Release builds.

How do I test MCP server tools with MCP Inspector?

Run npx @modelcontextprotocol/inspector dotnet run --project <path> for stdio servers, or start the HTTP server with dotnet run and connect Inspector to its URL. The Inspector UI lists tools, shows JSON schemas, and lets you call tools with custom parameters.

Why do my MCP tools not appear in GitHub Copilot Agent Mode?

Stale builds are the most common cause, so run dotnet build and restart the server first. Then verify [McpServerToolType] on the class, [McpServerTool] on each method, and WithTools<T>() or WithToolsFromAssembly() in Program.cs.

Why does my stdio MCP server produce garbled output?

Any Console.WriteLine or logging to stdout corrupts the JSON-RPC protocol used by stdio transport. Redirect all logging to stderr by setting LogToStandardErrorThreshold = LogLevel.Trace on the console logger.

When should I not use this debugging skill?

Use mcp-csharp-create if you have not created a server project yet, mcp-csharp-test for automated tests and evaluations, and mcp-csharp-publish for NuGet, Docker, or Azure production deployment issues.