# Dotnet Template MCP

> Dotnet Template MCP is an open-source MCP server for developer tools. MCP server letting AI agents search, inspect and create .NET projects from dotnet new. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, vscode, Linux, macOS, Windows, self-hosted, API
- **Repository:** https://github.com/yuliiakovalova/dotnet-template-mcp
- **MCP Registry name:** io.github.YuliiaKovalova/dotnet-template-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says the server lets AI agents work with dotnet new templates through conversation, so a developer can describe a project such as a web API with authentication and controllers instead of looking up CLI flags. Agents can search templates locally and on NuGet.org, inspect parameters and constraints, preview output with a dry run, and then instantiate the project.

Beyond project creation, the server covers template authoring: a template_validate tool checks a local template.json before publishing and returns errors, warnings and suggestions as structured JSON. It also includes tools for analysing solutions, comparing templates, composing several templates in one run, and upgrading outdated NuGet package versions with Central Package Management awareness.

It is aimed at .NET developers using MCP-capable clients such as VS Code with GitHub Copilot. It runs locally over stdio by default, with an optional HTTP transport that requires a bearer token, and the README warns that it is not designed to be shared across mutually untrusting users.

## Features

- **Natural language template discovery:** Maps a plain-language request such as a web API with auth onto a matching dotnet new template and its parameters.
- **Parameter inspection and dry runs:** Lists template parameters, constraints and post-actions, and previews generated files without writing to disk.
- **Interactive parameter prompts:** Asks the user for missing required template parameters through MCP elicitation instead of failing.
- **Template authoring validation:** Checks a local template directory for missing fields, invalid parameters and missing tags before publishing.
- **Central Package Management support:** Detects Directory.Packages.props and adjusts generated project files to use centrally managed package versions.
- **Outdated package upgrades:** Scans projects or solutions for outdated NuGet versions and can report or apply upgrades.

## Good for

- Scaffolding a new .NET web API from a chat request without memorising dotnet new flags
- Previewing which files a template would create before committing to it
- Validating a custom dotnet new template before publishing it to a team
- Comparing candidate templates side by side for a new project
- Auditing a solution for outdated NuGet packages under central package management

## Install

### Claude Code (Terminal)

```sh
claude mcp add dotnet-template-mcp -- dnx DotnetTemplateMCP --yes
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "dotnet-template-mcp": {
      "command": "dnx",
      "args": [
        "DotnetTemplateMCP",
        "--yes"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "dotnet-template-mcp": {
      "command": "dnx",
      "args": [
        "DotnetTemplateMCP",
        "--yes"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "dotnet-template-mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "DotnetTemplateMCP",
        "--yes"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "dotnet-template-mcp": {
      "command": "dnx",
      "args": [
        "DotnetTemplateMCP",
        "--yes"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "dotnet-template-mcp": {
      "command": "dnx",
      "args": [
        "DotnetTemplateMCP",
        "--yes"
      ]
    }
  }
}
```

## Tools

- `template_search`: Search locally and on NuGet.org for templates.
- `template_list`: List installed templates, filterable by language, type or classification.
- `template_inspect`: Show parameters, constraints and post-actions for a template.
- `template_instantiate`: Create a project from a template, resolving from NuGet if needed.
- `template_dry_run`: Preview generated files without touching disk.
- `template_install`: Install a template package.
- `template_uninstall`: Remove a template package.
- `templates_installed`: Inventory of installed template packages.
- `template_from_intent`: Map a plain-language request to a template and parameters.
- `template_create_from_existing`: Analyse a .csproj and generate a reusable template.
- `template_compose`: Run a sequence of templates in one workflow.
- `template_suggest_parameters`: Suggest parameter values with rationale.
- `template_validate`: Validate a local template directory before publishing.
- `template_compare`: Compare two or more templates side by side.
- `solution_analyze`: Analyse solution structure, frameworks and CPM status.
- `packages_upgrade`: Scan for outdated NuGet versions and report or apply upgrades.

## FAQ

### How is the server installed?

The README gives a global tool install with dotnet tool install --global DotnetTemplateMCP --version 2.0.0 for .NET 8 and later, and a zero-install dnx command for .NET 10 and later.

### Does it support HTTP as well as stdio?

Yes. Stdio is the default, and an HTTP transport is available for remote or CI use, but it requires either a bearer token or an explicit opt-in to anonymous access.

### How many tools are exposed by default?

All 15 tools are available by default. Setting MCP_TEMPLATE_TOOL_PROFILE to lite exposes five core tools.

### Is the server multi-tenant?

No. The README says the installed-template set and workspace root are process-wide, so it should run one instance per trusted team or tenant.

### Is Dotnet Template MCP free?

Yes. Dotnet Template MCP is open source, so you can use and self-host it for free.

### How do I add Dotnet Template MCP to Claude Code?

Run this command in your terminal: claude mcp add dotnet-template-mcp -- dnx DotnetTemplateMCP --yes

### What are the best alternatives to Dotnet Template MCP?

The closest alternatives to Dotnet Template MCP are Srecode Template MCP, Velocity Template Language MCP, MisarDev MCP Server, MobileBuildMCP and magic-mcp.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Srecode Template MCP](https://ai-powered.com/mcp/srecode-template-mcp): Srecode Template MCP is an open-source MCP server for developer tools.
- [Velocity Template Language MCP](https://ai-powered.com/mcp/velocity-template-language-mcp): Velocity Template Language MCP is an open-source MCP server for developer tools.
- [MisarDev MCP Server](https://ai-powered.com/mcp/misardev-mcp-server): MisarDev MCP Server is a freemium MCP server for developer tools.
- [MobileBuildMCP](https://ai-powered.com/mcp/mobilebuildmcp): MobileBuildMCP is an open-source MCP server for developer tools.
- [magic-mcp](https://ai-powered.com/mcp/magic-mcp): magic-mcp is a freemium MCP server for developer tools.
- [Api Test MCP](https://ai-powered.com/mcp/api-test-mcp): Api Test MCP is an open-source MCP server for developer tools.
- [Freshdeps MCP](https://ai-powered.com/mcp/freshdeps-mcp): Freshdeps MCP is a free MCP server for developer tools.
- [AI-Powered directory](https://ai-powered.com/mcp/ai-powered-directory): AI-Powered directory is a free MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/dotnet-template-mcp
