# dotnet-template-mcp

MCP server for dotnet new that searches, previews and creates .NET projects from templates. Handy when you don't want to remember every CLI flag.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 8
- Author: YuliiaKovalova
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/YuliiaKovalova/dotnet-template-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/dotnet-template-mcp

## What it does

The server wraps `dotnet new` in a set of tools an agent can call. It searches installed templates and NuGet.org, reads parameters and constraints, runs a dry run that writes nothing to disk, and creates the project. When a template isn't installed, `template_instantiate` pulls the package from NuGet and asks for any parameters you skipped. `template_from_intent` maps a plain request, say a web API with auth, to `webapi` plus `auth=Individual`, with no LLM involved.

Template authors get `template_validate`. It checks a local template directory and returns structured JSON with errors and hints on how to fix them. For CI, the official `dotnet template-authoring validate` stays the reference; this one exists so an agent editing the template gets the answer in the same conversation. `solution_analyze` and `packages_upgrade` cover existing solutions, including CPM-aware NuGet upgrades.

Stdio is the default transport, started with `template-engine-mcp`. The global tool needs .NET 8+, and `dnx` needs .NET 10+. The HTTP transport refuses to start without a token, because every tool writes files and installs packages. It is also single-tenant, so run one instance per trusted team.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- find a web API template on NuGet.org from the chat
- preview the files a template would create before anything hits disk
- check `template.json` for mistakes before publishing
- turn an existing `.csproj` into a reusable template
- spot outdated NuGet versions across a solution

## Example prompts
- Search for a web API template with authentication and run `template_dry_run` before creating anything
- Validate the template in `./my-template` with `template_validate`
- Generate a reusable template from my existing `.csproj` using `template_create_from_existing`

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24271
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9369
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7548

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
