mcp-csharp-debug

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

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/ecoDriverltd/FoundryAgentsExperiment --skill mcp-csharp-debug-ecodriverltd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp-csharp-debug
Source: https://github.com/ecoDriverltd/FoundryAgentsExperiment/tree/main/.agents/skills/mcp-csharp-debug
Command: npx skills add https://github.com/ecoDriverltd/FoundryAgentsExperiment --skill mcp-csharp-debug-ecodriverltd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Running and debugging C# MCP servers locally involves tricky setup: IDE configuration, protocol-level testing, tool discovery failures, and stdio logging pitfalls that corrupt JSON-RPC messages. This Skill provides a structured workflow to get a server running, tested, and debuggable. ## Core Features & Use Cases - Local Execution & IDE Setup: Run servers via dotnet run for stdio or HTTP transports and generate mcp.json configuration for VS Code or Visual Studio. - Protocol-Level Testing: Test tools interactively with MCP Inspector and verify tool registration in GitHub Copilot Agent Mode. - Diagnosis & Logging: Troubleshoot tool discovery failures, breakpoint issues, and stdout contamination, with correct stderr logging configuration for stdio servers. - Use Case: Your MCP tools stopped appearing in GitHub Copilot after a code change. Follow the workflow to rebuild, restart the server, verify attributes and registration, and confirm tools reappear in Agent Mode. ## Quick Start Help me run and debug my C# MCP server locally 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 locally?▼

Run the server with dotnet run, then test tools with MCP Inspector using npx @modelcontextprotocol/inspector. For breakpoints, build in Debug configuration and press F5 in VS Code or Visual Studio, then trigger the tool via Inspector or Copilot.

How do I test MCP server tools with MCP Inspector?▼

For stdio servers, run npx @modelcontextprotocol/inspector dotnet run --project <path>. For HTTP servers, start the server first, launch Inspector, and connect to the server URL such as http://localhost:3001.

Why are my MCP tools not showing up in GitHub Copilot?▼

Stale builds are the most common cause, so run dotnet build and restart the server first. Then verify [McpServerToolType] on the class, [McpServerTool] on methods, 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. Configure console logging with LogToStandardErrorThreshold = LogLevel.Trace so all output goes to stderr.

Does this skill cover creating or deploying MCP servers?▼

No, it only covers running and debugging existing servers locally. Use mcp-csharp-create for new projects, mcp-csharp-test for automated tests, and mcp-csharp-publish for NuGet, Docker, or Azure deployment.