mcp-csharp-publish

Publish C# MCP servers to NuGet, Docker, Azure, and the MCP Registry.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Publishing a C# MCP server involves several distinct paths—NuGet tool packaging for stdio servers, Docker containerization for HTTP servers, Azure deployment, and MCP Registry listing—and getting any step wrong (like version mismatches or missing PackAsTool settings) causes failures that are hard to diagnose. ## Core Features & Use Cases - NuGet Tool Packaging: Configure .csproj with PackAsTool, build, pack, test locally, and push stdio MCP servers to NuGet.org for dnx-based distribution. - Docker & Azure Deployment: Create production Dockerfiles for HTTP MCP servers and deploy to Azure Container Apps or App Service with secrets management. - MCP Registry Publishing: Generate server.json metadata, authenticate with mcp-publisher, and list servers on registry.modelcontextprotocol.io. - Use Case: You have finished building a stdio MCP server in C# and want users to run it via dnx YourPackage@1.0.0—this Skill walks you through packaging, testing, pushing to NuGet, and optionally listing it in the official MCP Registry. ## Quick Start Use the mcp-csharp-publish skill to package my stdio MCP server project as a NuGet tool and publish it to NuGet.org.

Frequently Asked Questions about mcp-csharp-publish

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

FAQPage Schema
How do I publish a C# MCP server to NuGet?▼

Configure your .csproj with PackAsTool set to true, a ToolCommandName, PackageId, and Version, then run dotnet pack and dotnet nuget push with your API key. Test locally first with dotnet tool install --add-source before pushing to NuGet.org.

How do I deploy an HTTP MCP server to Azure Container Apps?▼

Build a Docker image with a multi-stage Dockerfile, push it to Azure Container Registry, then run az containerapp create with your image, target port 8080, and external ingress. Pass secrets via --secrets and reference them with secretref in environment variables.

Should I use NuGet or Docker to distribute my MCP server?▼

Use NuGet tool packaging for stdio transport servers so users can run them with dnx PackageId@version. Use Docker containerization for HTTP transport servers, which are then deployed to Azure Container Apps, App Service, or another container host.

Why does MCP Registry publishing fail with a version mismatch?▼

The registry requires the Version in your .csproj, the root version in server.json, and packages[].version to all match exactly. A mismatch causes registry validation to fail or users to download the wrong package version.

Why does my NuGet MCP package not run as a dotnet tool?▼

The package is missing <PackAsTool>true</PackAsTool> in the .csproj, which is required to make it installable as a dotnet tool. Also verify ToolCommandName is set and the project builds as an executable with OutputType Exe.

What name format does the MCP Registry require?▼

For GitHub authentication, the server name must follow the io.github.<username>/<server-name> namespace convention. DNS-based authentication uses a reverse-domain format like com.mycompany/server-name instead.