[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M756DFQJ9FTRXG7CD47S5D10":3,"skill-same:01M756DFQJ9FTRXG7CD47S5D10":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M756DFQJ9FTRXG7CD47S5D10","mcp-csharp-publish",null,"Publish and deploy C# MCP servers. Covers NuGet packaging for stdio servers, Docker containerization for HTTP servers, Azure Container Apps and App Service deployment, and publishing to the official MCP Registry. USE FOR: packaging stdio MCP servers as NuGet tools, creating Dockerfiles for HTTP MCP servers, deploying to Azure Container Apps or App Service, publishing to the MCP Registry at registry.modelcontextprotocol.io, configuring server.json for MCP package metadata, setting up CI\u002FCD for MCP server publishing. DO NOT USE FOR: publishing general NuGet libraries (not MCP-specific), general Docker guidance unrelated to MCP, creating new servers (use mcp-csharp-create), debugging (use mcp-csharp-debug), writing tests (use mcp-csharp-test).","weiflycc-cmd\u002Fskills","weiflycc-cmd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F250846518?v=4","01M756C4PFGZJWKK04WFB9S5XF","威飛工作室","01M756C4QJJ66QDXN2RN6SXY87",0,"MIT","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-ai\u002Fskills\u002Fmcp-csharp-publish\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: mcp-csharp-publish\ndescription: >\n  Publish and deploy C# MCP servers. Covers NuGet packaging for stdio servers, Docker\n  containerization for HTTP servers, Azure Container Apps and App Service deployment,\n  and publishing to the official MCP Registry.\n  USE FOR: packaging stdio MCP servers as NuGet tools, creating Dockerfiles for HTTP MCP\n  servers, deploying to Azure Container Apps or App Service, publishing to the MCP Registry\n  at registry.modelcontextprotocol.io, configuring server.json for MCP package metadata,\n  setting up CI\u002FCD for MCP server publishing.\n  DO NOT USE FOR: publishing general NuGet libraries (not MCP-specific), general Docker\n  guidance unrelated to MCP, creating new servers (use mcp-csharp-create), debugging\n  (use mcp-csharp-debug), writing tests (use mcp-csharp-test).\nlicense: MIT\n---\n\n# C# MCP Server Publishing\n\nPublish and deploy MCP servers to their target platforms. stdio servers are distributed as NuGet tool packages. HTTP servers are containerized and deployed to Azure or other container hosts. Both can optionally be listed in the official MCP Registry.\n\n## When to Use\n\n- Packaging a stdio MCP server for NuGet distribution\n- Creating a Docker container for an HTTP MCP server\n- Deploying to Azure Container Apps or App Service\n- Publishing to the official MCP Registry for discoverability\n- Setting up `server.json` metadata for the MCP Registry\n\n## Stop Signals\n\n- **Server not tested yet?** → Use `mcp-csharp-test` first\n- **Server not working locally?** → Use `mcp-csharp-debug`\n- **No server project yet?** → Use `mcp-csharp-create`\n- **Publishing a non-MCP NuGet package?** → Use `nuget-trusted-publishing` instead\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Transport type | Yes | `stdio` → NuGet path, `http` → Docker\u002FAzure path |\n| Target destination | Yes | NuGet.org, Docker registry, Azure Container Apps, Azure App Service, MCP Registry |\n| Project path | Yes | Path to the `.csproj` file |\n| Package ID \u002F server name | Required for publishing | NuGet `PackageId` or MCP Registry name |\n\n## Workflow\n\n### Step 1: Choose the publishing path\n\n| Transport | Primary Destination | Users Run With |\n|-----------|-------------------|----------------|\n| **stdio** | NuGet.org | `dnx YourPackage@version` |\n| **HTTP** | Docker → Azure | Container URL |\n\nBoth paths can optionally publish to the MCP Registry for discoverability.\n\n### Step 2a: NuGet publishing (stdio servers)\n\n1. **Configure `.csproj`** with package properties:\n```xml\n\u003CPropertyGroup>\n  \u003CPackAsTool>true\u003C\u002FPackAsTool>\n  \u003CToolCommandName>mymcpserver\u003C\u002FToolCommandName>\n  \u003CPackageId>YourUsername.MyMcpServer\u003C\u002FPackageId>\n  \u003CVersion>1.0.0\u003C\u002FVersion>\n  \u003CAuthors>Your Name\u003C\u002FAuthors>\n  \u003CDescription>MCP server for interacting with MyService\u003C\u002FDescription>\n  \u003CPackageLicenseExpression>MIT\u003C\u002FPackageLicenseExpression>\n  \u003CPackageTags>mcp;modelcontextprotocol;ai;llm\u003C\u002FPackageTags>\n  \u003CPackageReadmeFile>README.md\u003C\u002FPackageReadmeFile>\n\u003C\u002FPropertyGroup>\n\n\u003CItemGroup>\n  \u003CNone Include=\"README.md\" Pack=\"true\" PackagePath=\"\\\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n2. **Build and pack:**\n```bash\ndotnet build -c Release\ndotnet pack -c Release\n```\n\n3. **Test locally before publishing:**\n```bash\ndotnet tool install --global --add-source bin\u002FRelease\u002F YourUsername.MyMcpServer\nmymcpserver --help          # verify it runs\ndotnet tool uninstall --global YourUsername.MyMcpServer\n```\n\n4. **Push to NuGet.org:**\n```bash\ndotnet nuget push bin\u002FRelease\u002F*.nupkg \\\n  --api-key YOUR_NUGET_API_KEY \\\n  --source https:\u002F\u002Fapi.nuget.org\u002Fv3\u002Findex.json\n```\n\n5. **Verify** — users configure in `mcp.json`:\n```json\n{\n  \"servers\": {\n    \"MyMcpServer\": {\n      \"type\": \"stdio\",\n      \"command\": \"dnx\",\n      \"args\": [\"YourUsername.MyMcpServer@1.0.0\", \"--yes\"]\n    }\n  }\n}\n```\n\n**For detailed NuGet packaging and trusted publishing setup**, see [references\u002Fnuget-packaging.md](references\u002Fnuget-packaging.md).\n\n### Step 2b: Docker containerization (HTTP servers)\n\n1. **Create Dockerfile:**\n```dockerfile\nFROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:10.0 AS build\nWORKDIR \u002Fsrc\nCOPY *.csproj .\u002F\nRUN dotnet restore\nCOPY . .\u002F\nRUN dotnet publish -c Release -o \u002Fapp\n\nFROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:10.0\nWORKDIR \u002Fapp\nCOPY --from=build \u002Fapp .\n\n# Non-root user for security\nRUN adduser --disabled-password --gecos '' appuser\nUSER appuser\n\nENV ASPNETCORE_URLS=http:\u002F\u002F+:8080\nEXPOSE 8080\nHEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \\\n  CMD curl -f http:\u002F\u002Flocalhost:8080\u002Fhealth || exit 1\nENTRYPOINT [\"dotnet\", \"MyMcpServer.dll\"]\n```\n\n2. **Build and test locally:**\n```bash\ndocker build -t mymcpserver:latest .\ndocker run -d -p 3001:8080 -e API_KEY=test-key --name mymcpserver mymcpserver:latest\ncurl http:\u002F\u002Flocalhost:3001\u002Fhealth\n```\n\n3. **Push to container registry:**\n```bash\n# Docker Hub\ndocker tag mymcpserver:latest \u003Cyourusername>\u002F\u003Cmymcpserver>:1.0.0\ndocker push \u003Cyourusername>\u002F\u003Cmymcpserver>:1.0.0\n\n# Azure Container Registry\naz acr login --name yourregistry\ndocker tag mymcpserver:latest \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0\ndocker push \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0\n```\n\n### Step 3: Deploy to Azure (HTTP servers)\n\n**Azure Container Apps** (recommended — serverless with auto-scaling):\n```bash\naz containerapp create \\\n  --name mymcpserver \\\n  --resource-group mygroup \\\n  --environment myenvironment \\\n  --image \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0 \\\n  --target-port 8080 \\\n  --ingress external \\\n  --min-replicas 0 \\\n  --max-replicas 10 \\\n  --secrets api-key=my-actual-api-key \\\n  --env-vars API_KEY=secretref:api-key\n```\n\n**Azure App Service** (traditional web hosting):\n```bash\naz webapp create \\\n  --name mymcpserver \\\n  --resource-group mygroup \\\n  --plan myplan \\\n  --deployment-container-image-name \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0\n```\n\n**For detailed Azure deployment**, see [references\u002Fdocker-azure.md](references\u002Fdocker-azure.md).\n\n### Step 4: Publish to MCP Registry (optional)\n\nList your server in the official MCP Registry for discoverability.\n\n1. **Install `mcp-publisher`:**\n```bash\n# macOS\u002FLinux\nbrew install mcp-publisher\n\n# Or download from https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fregistry\u002Freleases\n```\n\n2. **Create `.mcp\u002Fserver.json`** (or run `mcp-publisher init` to generate interactively):\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fstatic.modelcontextprotocol.io\u002Fschemas\u002F2025-12-11\u002Fserver.schema.json\",\n  \"name\": \"io.github.username\u002Fservername\",\n  \"description\": \"Your server description\",\n  \"version\": \"1.0.0\",\n  \"packages\": [{\n    \"registryType\": \"nuget\",\n    \"registryBaseUrl\": \"https:\u002F\u002Fapi.nuget.org\",\n    \"identifier\": \"YourUsername.MyMcpServer\",\n    \"version\": \"1.0.0\",\n    \"transport\": { \"type\": \"stdio\" }\n  }],\n  \"repository\": {\n    \"url\": \"https:\u002F\u002Fgithub.com\u002Fusername\u002Frepo\",\n    \"source\": \"github\"\n  }\n}\n```\n\n> **Version consistency (critical):** The root `version`, `packages[].version`, and `\u003CVersion>` in `.csproj` **must all match**. A mismatch causes registry validation failures or users downloading the wrong version.\n\n3. **Authenticate and publish:**\n```bash\nmcp-publisher login github      # name must be io.github.\u003Cusername>\u002F... for GitHub auth\nmcp-publisher publish\n```\n\n4. **Verify:**\n```bash\ncurl \"https:\u002F\u002Fregistry.modelcontextprotocol.io\u002Fv0.1\u002Fservers?search=io.github.\u003Cusername>\u002F\u003Cservername>\"\n```\n\n**For Registry details** (namespace conventions, environment variables, CI\u002FCD automation), see [references\u002Fmcp-registry.md](references\u002Fmcp-registry.md).\n\n### Step 5: Security checklist\n\n- [ ] No hardcoded secrets — use environment variables or Key Vault\n- [ ] HTTPS enabled for HTTP transport in production\n- [ ] Health check endpoint implemented\n- [ ] Input validation on all tool parameters\n- [ ] Rate limiting considered for HTTP servers\n\n## Validation\n\n- [ ] **NuGet:** Package installs and runs via `dnx PackageId@version`\n- [ ] **Docker:** Container starts and health check passes\n- [ ] **Azure:** Server is reachable and tools respond\n- [ ] **MCP Registry:** Server appears at `registry.modelcontextprotocol.io`\n- [ ] MCP client can connect and call tools on the deployed server\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| NuGet package doesn't run as a tool | Missing `\u003CPackAsTool>true\u003C\u002FPackAsTool>` in `.csproj` |\n| Version mismatch between `.csproj` and `server.json` | Keep `\u003CVersion>`, `server.json` root `version`, and `packages[].version` in sync |\n| Docker container exits immediately | Check entrypoint DLL name matches project output. Run `docker logs mymcpserver` for errors |\n| Azure Container App returns 502 | Target port mismatch. Ensure `--target-port` matches `ASPNETCORE_URLS` port in the container |\n| MCP Registry rejects publish | Name must follow namespace convention: `io.github.\u003Cusername>\u002F\u003Cname>` for GitHub auth |\n| API keys leaked in Docker image | Use multi-stage builds. Never `COPY` `.env` files. Pass secrets via `--env-vars` at runtime |\n\n## Related Skills\n\n- `mcp-csharp-create` — Create a new MCP server project\n- `mcp-csharp-debug` — Running and interactive debugging\n- `mcp-csharp-test` — Automated tests and evaluations\n\n## Reference Files\n\n- [references\u002Fnuget-packaging.md](references\u002Fnuget-packaging.md) — Complete NuGet `.csproj` configuration, `server.json` for MCP, NuGet.org push, testing with `dnx`, version management. **Load when:** publishing a stdio server to NuGet.\n- [references\u002Fdocker-azure.md](references\u002Fdocker-azure.md) — Production Dockerfile patterns, ACR setup, Azure Container Apps full configuration, App Service with Key Vault, secrets management. **Load when:** deploying an HTTP server to Docker or Azure.\n- [references\u002Fmcp-registry.md](references\u002Fmcp-registry.md) — `mcp-publisher` CLI installation, `server.json` schema, namespace conventions (GitHub vs DNS auth), CI\u002FCD automation. **Load when:** publishing to the official MCP Registry.\n\n## More Info\n\n- [NuGet publishing](https:\u002F\u002Flearn.microsoft.com\u002Fnuget\u002Fnuget-org\u002Fpublish-a-package) — NuGet.org publishing guide\n- [Azure Container Apps](https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fcontainer-apps\u002F) — Serverless container hosting\n- [MCP Registry](https:\u002F\u002Fregistry.modelcontextprotocol.io) — Official MCP server registry\n","# C# MCP Server Publishing\n\nPublish and deploy MCP servers to their target platforms. stdio servers are distributed as NuGet tool packages. HTTP servers are containerized and deployed to Azure or other container hosts. Both can optionally be listed in the official MCP Registry.\n\n## When to Use\n\n- Packaging a stdio MCP server for NuGet distribution\n- Creating a Docker container for an HTTP MCP server\n- Deploying to Azure Container Apps or App Service\n- Publishing to the official MCP Registry for discoverability\n- Setting up `server.json` metadata for the MCP Registry\n\n## Stop Signals\n\n- **Server not tested yet?** → Use `mcp-csharp-test` first\n- **Server not working locally?** → Use `mcp-csharp-debug`\n- **No server project yet?** → Use `mcp-csharp-create`\n- **Publishing a non-MCP NuGet package?** → Use `nuget-trusted-publishing` instead\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Transport type | Yes | `stdio` → NuGet path, `http` → Docker\u002FAzure path |\n| Target destination | Yes | NuGet.org, Docker registry, Azure Container Apps, Azure App Service, MCP Registry |\n| Project path | Yes | Path to the `.csproj` file |\n| Package ID \u002F server name | Required for publishing | NuGet `PackageId` or MCP Registry name |\n\n## Workflow\n\n### Step 1: Choose the publishing path\n\n| Transport | Primary Destination | Users Run With |\n|-----------|-------------------|----------------|\n| **stdio** | NuGet.org | `dnx YourPackage@version` |\n| **HTTP** | Docker → Azure | Container URL |\n\nBoth paths can optionally publish to the MCP Registry for discoverability.\n\n### Step 2a: NuGet publishing (stdio servers)\n\n1. **Configure `.csproj`** with package properties:\n```xml\n\u003CPropertyGroup>\n  \u003CPackAsTool>true\u003C\u002FPackAsTool>\n  \u003CToolCommandName>mymcpserver\u003C\u002FToolCommandName>\n  \u003CPackageId>YourUsername.MyMcpServer\u003C\u002FPackageId>\n  \u003CVersion>1.0.0\u003C\u002FVersion>\n  \u003CAuthors>Your Name\u003C\u002FAuthors>\n  \u003CDescription>MCP server for interacting with MyService\u003C\u002FDescription>\n  \u003CPackageLicenseExpression>MIT\u003C\u002FPackageLicenseExpression>\n  \u003CPackageTags>mcp;modelcontextprotocol;ai;llm\u003C\u002FPackageTags>\n  \u003CPackageReadmeFile>README.md\u003C\u002FPackageReadmeFile>\n\u003C\u002FPropertyGroup>\n\n\u003CItemGroup>\n  \u003CNone Include=\"README.md\" Pack=\"true\" PackagePath=\"\\\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n2. **Build and pack:**\n```bash\ndotnet build -c Release\ndotnet pack -c Release\n```\n\n3. **Test locally before publishing:**\n```bash\ndotnet tool install --global --add-source bin\u002FRelease\u002F YourUsername.MyMcpServer\nmymcpserver --help          # verify it runs\ndotnet tool uninstall --global YourUsername.MyMcpServer\n```\n\n4. **Push to NuGet.org:**\n```bash\ndotnet nuget push bin\u002FRelease\u002F*.nupkg \\\n  --api-key YOUR_NUGET_API_KEY \\\n  --source https:\u002F\u002Fapi.nuget.org\u002Fv3\u002Findex.json\n```\n\n5. **Verify** — users configure in `mcp.json`:\n```json\n{\n  \"servers\": {\n    \"MyMcpServer\": {\n      \"type\": \"stdio\",\n      \"command\": \"dnx\",\n      \"args\": [\"YourUsername.MyMcpServer@1.0.0\", \"--yes\"]\n    }\n  }\n}\n```\n\n**For detailed NuGet packaging and trusted publishing setup**, see [references\u002Fnuget-packaging.md](references\u002Fnuget-packaging.md).\n\n### Step 2b: Docker containerization (HTTP servers)\n\n1. **Create Dockerfile:**\n```dockerfile\nFROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:10.0 AS build\nWORKDIR \u002Fsrc\nCOPY *.csproj .\u002F\nRUN dotnet restore\nCOPY . .\u002F\nRUN dotnet publish -c Release -o \u002Fapp\n\nFROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:10.0\nWORKDIR \u002Fapp\nCOPY --from=build \u002Fapp .\n\n# Non-root user for security\nRUN adduser --disabled-password --gecos '' appuser\nUSER appuser\n\nENV ASPNETCORE_URLS=http:\u002F\u002F+:8080\nEXPOSE 8080\nHEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \\\n  CMD curl -f http:\u002F\u002Flocalhost:8080\u002Fhealth || exit 1\nENTRYPOINT [\"dotnet\", \"MyMcpServer.dll\"]\n```\n\n2. **Build and test locally:**\n```bash\ndocker build -t mymcpserver:latest .\ndocker run -d -p 3001:8080 -e API_KEY=test-key --name mymcpserver mymcpserver:latest\ncurl http:\u002F\u002Flocalhost:3001\u002Fhealth\n```\n\n3. **Push to container registry:**\n```bash\n# Docker Hub\ndocker tag mymcpserver:latest \u003Cyourusername>\u002F\u003Cmymcpserver>:1.0.0\ndocker push \u003Cyourusername>\u002F\u003Cmymcpserver>:1.0.0\n\n# Azure Container Registry\naz acr login --name yourregistry\ndocker tag mymcpserver:latest \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0\ndocker push \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0\n```\n\n### Step 3: Deploy to Azure (HTTP servers)\n\n**Azure Container Apps** (recommended — serverless with auto-scaling):\n```bash\naz containerapp create \\\n  --name mymcpserver \\\n  --resource-group mygroup \\\n  --environment myenvironment \\\n  --image \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0 \\\n  --target-port 8080 \\\n  --ingress external \\\n  --min-replicas 0 \\\n  --max-replicas 10 \\\n  --secrets api-key=my-actual-api-key \\\n  --env-vars API_KEY=secretref:api-key\n```\n\n**Azure App Service** (traditional web hosting):\n```bash\naz webapp create \\\n  --name mymcpserver \\\n  --resource-group mygroup \\\n  --plan myplan \\\n  --deployment-container-image-name \u003Cyourregistry>.azurecr.io\u002F\u003Cmymcpserver>:1.0.0\n```\n\n**For detailed Azure deployment**, see [references\u002Fdocker-azure.md](references\u002Fdocker-azure.md).\n\n### Step 4: Publish to MCP Registry (optional)\n\nList your server in the official MCP Registry for discoverability.\n\n1. **Install `mcp-publisher`:**\n```bash\n# macOS\u002FLinux\nbrew install mcp-publisher\n\n# Or download from https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fregistry\u002Freleases\n```\n\n2. **Create `.mcp\u002Fserver.json`** (or run `mcp-publisher init` to generate interactively):\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fstatic.modelcontextprotocol.io\u002Fschemas\u002F2025-12-11\u002Fserver.schema.json\",\n  \"name\": \"io.github.username\u002Fservername\",\n  \"description\": \"Your server description\",\n  \"version\": \"1.0.0\",\n  \"packages\": [{\n    \"registryType\": \"nuget\",\n    \"registryBaseUrl\": \"https:\u002F\u002Fapi.nuget.org\",\n    \"identifier\": \"YourUsername.MyMcpServer\",\n    \"version\": \"1.0.0\",\n    \"transport\": { \"type\": \"stdio\" }\n  }],\n  \"repository\": {\n    \"url\": \"https:\u002F\u002Fgithub.com\u002Fusername\u002Frepo\",\n    \"source\": \"github\"\n  }\n}\n```\n\n> **Version consistency (critical):** The root `version`, `packages[].version`, and `\u003CVersion>` in `.csproj` **must all match**. A mismatch causes registry validation failures or users downloading the wrong version.\n\n3. **Authenticate and publish:**\n```bash\nmcp-publisher login github      # name must be io.github.\u003Cusername>\u002F... for GitHub auth\nmcp-publisher publish\n```\n\n4. **Verify:**\n```bash\ncurl \"https:\u002F\u002Fregistry.modelcontextprotocol.io\u002Fv0.1\u002Fservers?search=io.github.\u003Cusername>\u002F\u003Cservername>\"\n```\n\n**For Registry details** (namespace conventions, environment variables, CI\u002FCD automation), see [references\u002Fmcp-registry.md](references\u002Fmcp-registry.md).\n\n### Step 5: Security checklist\n\n- [ ] No hardcoded secrets — use environment variables or Key Vault\n- [ ] HTTPS enabled for HTTP transport in production\n- [ ] Health check endpoint implemented\n- [ ] Input validation on all tool parameters\n- [ ] Rate limiting considered for HTTP servers\n\n## Validation\n\n- [ ] **NuGet:** Package installs and runs via `dnx PackageId@version`\n- [ ] **Docker:** Container starts and health check passes\n- [ ] **Azure:** Server is reachable and tools respond\n- [ ] **MCP Registry:** Server appears at `registry.modelcontextprotocol.io`\n- [ ] MCP client can connect and call tools on the deployed server\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| NuGet package doesn't run as a tool | Missing `\u003CPackAsTool>true\u003C\u002FPackAsTool>` in `.csproj` |\n| Version mismatch between `.csproj` and `server.json` | Keep `\u003CVersion>`, `server.json` root `version`, and `packages[].version` in sync |\n| Docker container exits immediately | Check entrypoint DLL name matches project output. Run `docker logs mymcpserver` for errors |\n| Azure Container App returns 502 | Target port mismatch. Ensure `--target-port` matches `ASPNETCORE_URLS` port in the container |\n| MCP Registry rejects publish | Name must follow namespace convention: `io.github.\u003Cusername>\u002F\u003Cname>` for GitHub auth |\n| API keys leaked in Docker image | Use multi-stage builds. Never `COPY` `.env` files. Pass secrets via `--env-vars` at runtime |\n\n## Related Skills\n\n- `mcp-csharp-create` — Create a new MCP server project\n- `mcp-csharp-debug` — Running and interactive debugging\n- `mcp-csharp-test` — Automated tests and evaluations\n\n## Reference Files\n\n- [references\u002Fnuget-packaging.md](references\u002Fnuget-packaging.md) — Complete NuGet `.csproj` configuration, `server.json` for MCP, NuGet.org push, testing with `dnx`, version management. **Load when:** publishing a stdio server to NuGet.\n- [references\u002Fdocker-azure.md](references\u002Fdocker-azure.md) — Production Dockerfile patterns, ACR setup, Azure Container Apps full configuration, App Service with Key Vault, secrets management. **Load when:** deploying an HTTP server to Docker or Azure.\n- [references\u002Fmcp-registry.md](references\u002Fmcp-registry.md) — `mcp-publisher` CLI installation, `server.json` schema, namespace conventions (GitHub vs DNS auth), CI\u002FCD automation. **Load when:** publishing to the official MCP Registry.\n\n## More Info\n\n- [NuGet publishing](https:\u002F\u002Flearn.microsoft.com\u002Fnuget\u002Fnuget-org\u002Fpublish-a-package) — NuGet.org publishing guide\n- [Azure Container Apps](https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fcontainer-apps\u002F) — Serverless container hosting\n- [MCP Registry](https:\u002F\u002Fregistry.modelcontextprotocol.io) — Official MCP server registry\n",{"name":5,"license":15,"description":24},"Publish and deploy C# MCP servers. Covers NuGet packaging for stdio servers, Docker containerization for HTTP servers, Azure Container Apps and App Service deployment, and publishing to the official MCP Registry. USE FOR: packaging stdio MCP servers as NuGet tools, creating Dockerfiles for HTTP MCP servers, deploying to Azure Container Apps or App Service, publishing to the MCP Registry at registry.modelcontextprotocol.io, configuring server.json for MCP package metadata, setting up CI\u002FCD for MCP server publishing. DO NOT USE FOR: publishing general NuGet libraries (not MCP-specific), general Docker guidance unrelated to MCP, creating new servers (use mcp-csharp-create), debugging (use mcp-csharp-debug), writing tests (use mcp-csharp-test).\n","main","5810d492c9b301d8227f932bf87b5c954c4fa4d6","plugins\u002Fdotnet-ai\u002Fskills\u002Fmcp-csharp-publish","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd","weiflycc.com","2026-11-10 03:26:55",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add weiflycc-cmd\u002Fskills --skill mcp-csharp-publish",{"tool":38,"command":39},"bunx","bunx skills add weiflycc-cmd\u002Fskills --skill mcp-csharp-publish",{"tool":41,"command":42},"pnpm","pnpm dlx skills add weiflycc-cmd\u002Fskills --skill mcp-csharp-publish","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-ai\u002Fskills\u002Fmcp-csharp-publish\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fdocker-azure.md","REFERENCE","参考文档",4760,"https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-ai\u002Fskills\u002Fmcp-csharp-publish\u002Freferences\u002Fdocker-azure.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fmcp-registry.md",3780,"https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-ai\u002Fskills\u002Fmcp-csharp-publish\u002Freferences\u002Fmcp-registry.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fnuget-packaging.md",4215,"https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-ai\u002Fskills\u002Fmcp-csharp-publish\u002Freferences\u002Fnuget-packaging.md",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M76SGT4WG5682JQJ0V3NSK6X","system-text-json-net11","Provides guidance on new System.Text.Json APIs introduced in .NET 11. It covers typed JsonTypeInfo access via GetTypeInfo\u003CT> and TryGetTypeInfo\u003CT> on JsonSerializerOptions, and the new JsonNamingPolicy.PascalCase static property. Use when serializing or deserializing JSON in .NET 11 applications and needing typed metadata access or PascalCase property naming.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M76SGPNZYYV9BCZJW7BF7J8A","nuget-trusted-publishing","Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC, keyless NuGet publish, migrate from NuGet API key, NuGet\u002Flogin, secure NuGet publishing. DO NOT USE FOR: publishing to private feeds or Azure Artifacts (OIDC is nuget.org only). INVOKES: shell (powershell or bash), edit, create, ask_user for guided repo setup.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fnuget-trusted-publishing\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M76SGHVNBNVM1DMVDYTMAE5G","dotnet-pinvoke","Correctly call native (C\u002FC++) libraries from .NET using P\u002FInvoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P\u002FInvoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed\u002Fnative boundary. DO NOT USE FOR: COM interop, C++\u002FCLI mixed-mode assemblies, or pure managed code with no native dependencies.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fdotnet-pinvoke\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M76SGDB9Z3GSB1CFW314NC84","csharp-scripts","Run file-based C# apps with the .NET CLI when the user explicitly wants C#\u002F.NET code without creating a project. Use for C# language\u002FAPI experiments, one-file C# apps, small multi-file C# apps composed with `#:include`\u002F`#:exclude`, or C# file-based apps linked with `#:ref`. Do not use for language-agnostic throwaway scripts, generic computations, Python\u002FPowerShell-style automation, full projects, or existing app integration.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-scripts\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M76SG805T8W764WAKB1NP3CJ","thread-abort-migration","Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET. USE FOR: modernizing code that calls Thread.Abort, catching ThreadAbortException, replacing Thread.ResetAbort, replacing Thread.Interrupt for thread termination, resolving PlatformNotSupportedException or SYSLIB0006 after retargeting to .NET 6+, migrating ASP.NET Response.End or Response.Redirect(url, true) which internally call Thread.Abort. DO NOT USE FOR: code that only uses Thread.Join, Thread.Sleep, or Thread.Start without any abort, interrupt, or ThreadAbortException usage — these APIs work identically in modern .NET and need no migration. Also not for projects staying on .NET Framework, or Thread.Abort usage inside third-party libraries you do not control.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-upgrade\u002Fskills\u002Fthread-abort-migration\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M76SG2588ZJBE5C51HYJJSKV","migrate-nullable-references","Enable nullable reference types in a C# project and systematically resolve all warnings. USE FOR: adopting NRTs in existing codebases, file-by-file or project-wide migration, fixing CS8602\u002FCS8618\u002FCS86xx warnings, annotating APIs for nullability, cleaning up null-forgiving operators, upgrading dependencies with new nullable annotations. DO NOT USE FOR: projects already fully migrated with zero warnings (unless auditing suppressions), fixing a handful of nullable warnings in code that already has NRTs enabled, suppressing warnings without fixing them, C# 7.3 or earlier projects. INVOKES: Get-NullableReadiness.ps1 scanner script.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-upgrade\u002Fskills\u002Fmigrate-nullable-references\u002FSKILL.md",[],[]]