Skip to content

Commit e9f17d7

Browse files
committed
Add template config
1 parent c8cb65f commit e9f17d7

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.template.config/template.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"$schema": "http://json.schemastore.org/template",
3+
"author": "Microsoft",
4+
"classifications": ["Web", "MCP", "Server", "Protocol"],
5+
"identity": "McpServer.Template",
6+
"name": "MCP Server",
7+
"shortName": "mcp-server",
8+
"description": "A template for creating Model Context Protocol (MCP) servers using ASP.NET Core",
9+
"tags": {
10+
"language": "C#",
11+
"type": "project"
12+
},
13+
"sourceName": "McpServer.Template",
14+
"preferNameDirectory": true,
15+
"symbols": {
16+
"Framework": {
17+
"type": "parameter",
18+
"description": "The target framework for the project.",
19+
"datatype": "choice",
20+
"choices": [
21+
{
22+
"choice": "net8.0",
23+
"description": "Target net8.0"
24+
}
25+
],
26+
"replaces": "net8.0",
27+
"defaultValue": "net8.0"
28+
},
29+
"Port": {
30+
"type": "parameter",
31+
"description": "Port number to use for the MCP server",
32+
"datatype": "integer",
33+
"defaultValue": "5000",
34+
"replaces": "5000"
35+
},
36+
"ServerName": {
37+
"type": "parameter",
38+
"description": "The display name for the MCP server",
39+
"datatype": "string",
40+
"defaultValue": "My MCP Server"
41+
},
42+
"skipRestore": {
43+
"type": "parameter",
44+
"datatype": "bool",
45+
"description": "If specified, skips the automatic restore of the project on create.",
46+
"defaultValue": "false"
47+
}
48+
},
49+
"sources": [
50+
{
51+
"modifiers": [
52+
{
53+
"exclude": [
54+
"**/[Bb]in/**",
55+
"**/[Oo]bj/**",
56+
".template.config/**/*",
57+
"**/*.filelist",
58+
"**/*.user",
59+
"**/*.lock.json",
60+
"**/.vs/**",
61+
"**/.vscode/**",
62+
"**/.idea/**",
63+
"**/*.sln.DotSettings.user"
64+
]
65+
}
66+
]
67+
}
68+
],
69+
"postActions": [
70+
{
71+
"condition": "(!skipRestore)",
72+
"description": "Restore NuGet packages required by this project.",
73+
"manualInstructions": [
74+
{
75+
"text": "Run 'dotnet restore'"
76+
}
77+
],
78+
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
79+
"continueOnError": true
80+
}
81+
]
82+
}

0 commit comments

Comments
 (0)