Forge
markdownf583a481
1## AIGuiders.DotnetMcp.Templates
2
3Template pack for `dotnet new` to bootstrap MCP servers on .NET.
4
5### Why
6
7Use this template pack when you want to start a **.NET MCP server** without rebuilding the same boilerplate every time (host wiring, tool registration skeleton, publish/deploy scripts, and manifest/docs conventions).
8
9It’s especially useful if you maintain multiple MCP repos and want a consistent “shape” across them.
10
11### When to use
12
13- You’re creating a new MCP server for Cursor / Claude Desktop / your own stdio host.
14- You want a repo scaffold that can grow from POC to “real project” without a rewrite.
15- You want a stable convention for tool contracts and automation (manifest/docs generation).
16
17### Templates
18
19- `mcp`: full scaffold (recommended for real projects).
20- `mcp-min`: minimal scaffold (good for small experiments).
21
22**Common structure (both templates):**
23
24- `Program.cs`: server bootstrap (stdio transport).
25- `ToolCatalog.cs`: tool definitions (names + descriptions + schemas) in one place.
26- `ToolHandlers.cs`: handler methods that implement the tools.
27
28**`mcp-min` includes:**
29
30- The minimal runnable server + sample tool wiring.
31- No extra automation/testing layers.
32
33**`mcp` (full) additionally includes:**
34
35- **Manifest/docs automation**: generate `mcp-tools.manifest.json` and `docs/MCP-TOOLS.md` from `ToolCatalog`.
36- **Consistency tests**: validate that docs/manifest match the runtime tool catalog.
37- Small shared helpers/libraries used by the automation (so each generated repo doesn’t re-invent the JSON contract).
38
39### What you get (high level)
40
41The generated project gives you a working starting point with a basic structure for tools/handlers.
42The full template is aligned with a “tool catalog as source of truth” workflow (manifest/docs automation).
43
44### Non-goals
45
46- This package is not an MCP framework/runtime library — it’s a **scaffold**.
47- It does not decide auth/permissions/policy (that’s host- and deployment-specific).
48- It doesn’t design your domain tools for you — it gives rails, not product semantics.
49
50### Install
51
52```powershell
53dotnet new install AIGuiders.DotnetMcp.Templates
54```
55
56### Create a new MCP server (full pattern)
57
58```powershell
59dotnet new mcp -n MyCompany.MyMcp --mcp-id my-mcp
60```
61
62### Create a minimal MCP server
63
64```powershell
65dotnet new mcp-min -n MyCompany.MyMcp --mcp-id my-mcp
66```
67
68### Uninstall
69
70```powershell
71dotnet new uninstall AIGuiders.DotnetMcp.Templates
72```
73
74
View only · write via MCP/CIDE