mcp-csharp-publish

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Publishing a C# MCP server involves choosing between NuGet tool packaging for stdio servers and Docker containerization for HTTP servers, then deploying to Azure or listing in the MCP Registry, with strict version consistency requirements across .csproj and server.json files. ## Core Features & Use Cases - NuGet Tool Packaging: Configure .csproj with PackAsTool, build and pack the server, test locally with dotnet tool install, and push to NuGet.org for dnx-based distribution. - Docker and Azure Deployment: Create multi-stage Dockerfiles with non-root users and health checks, push to Azure Container Registry, 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 the server at registry.modelcontextprotocol.io with enforced version consistency. - Use Case: You have a working stdio MCP server and want users to run it with dnx. The skill walks you through .csproj packaging properties, local testing, NuGet push, and optional MCP Registry listing. ## Quick Start Publish my C# MCP server project as a NuGet tool package and list it in the MCP Registry.

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 using the --add-source flag pointing to bin/Release.

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

Build a multi-stage Dockerfile targeting the ASP.NET runtime, push the image to Azure Container Registry, then run az containerapp create with your image, target port 8080, external ingress, and secrets passed via secretref environment variables.

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

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

Why does the MCP Registry reject my server.json publish?

Common causes are an invalid name format, which must follow io.github.<username>/<name> for GitHub auth, or version mismatches between your .csproj Version, the server.json root version, and packages[].version. All three must match exactly.

Why does my Docker MCP container exit immediately after starting?

The entrypoint DLL name likely does not match your project's output assembly name. Run docker logs on the container to see the error, and verify the ENTRYPOINT in the Dockerfile references the correct DLL.

When should I not use this publishing workflow?

Do not use it for general NuGet libraries that are not MCP servers, for creating a new server project, or for debugging a server that does not run locally yet. Use mcp-csharp-create, mcp-csharp-debug, or mcp-csharp-test for those stages first.