diff --git a/eng/packages/ProjectTemplates.props b/eng/packages/ProjectTemplates.props
index 1abaa66643f..847d9a68d1f 100644
--- a/eng/packages/ProjectTemplates.props
+++ b/eng/packages/ProjectTemplates.props
@@ -26,7 +26,8 @@
-
+
+
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj b/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj
index 7571f225353..f83fda4db7e 100644
--- a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj
+++ b/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/Microsoft.Extensions.AI.Templates.csproj
@@ -38,24 +38,14 @@
+ Include="templates\**\*"
+ Exclude="templates\**\*.csproj-in"
+ PackagePath="content" />
-
-
-
-
+ PackagePath="content" />
+
+
+ Template
+ netstandard2.0
+ MCP Server project templates.
+ dotnet-new;templates;ai
+
+ preview
+ 1
+ AI
+ 0
+ 0
+
+ true
+ false
+ true
+ false
+ false
+ content
+ false
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/README.md b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/README.md
new file mode 100644
index 00000000000..c8d71cb61fd
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/README.md
@@ -0,0 +1,3 @@
+# Microsoft.McpServer.ProjectTemplates
+
+Provides MCP Server Project Templates.
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/dotnetcli.host.json
similarity index 66%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/dotnetcli.host.json
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/dotnetcli.host.json
index 64694e46660..c2105a0018c 100644
--- a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/dotnetcli.host.json
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/dotnetcli.host.json
@@ -1,13 +1,9 @@
{
"$schema": "https://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
- "TargetFrameworkOverride": {
- "isHidden": "true",
- "longName": "target-framework-override",
- "shortName": ""
- },
- "Framework": {
- "longName": "framework"
+ "Transport": {
+ "longName": "transport",
+ "shortName": "t"
},
"NativeAot": {
"longName": "aot",
@@ -16,6 +12,15 @@
"SelfContained": {
"longName": "self-contained",
"shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "httpPort": {
+ "isHidden": true
+ },
+ "httpsPort": {
+ "isHidden": true
}
},
"usageExamples": [
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/ide.host.json b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/ide.host.json
similarity index 79%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/ide.host.json
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/ide.host.json
index 8574a4767a5..a4971fdf7fc 100644
--- a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/ide.host.json
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/ide.host.json
@@ -3,6 +3,10 @@
"order": 0,
"icon": "ide/icon.ico",
"symbolInfo": [
+ {
+ "id": "Transport",
+ "isVisible": true
+ },
{
"id": "NativeAot",
"isVisible": true
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/ide/icon.ico b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/ide/icon.ico
similarity index 100%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.template.config/ide/icon.ico
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/ide/icon.ico
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/template.json b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/template.json
new file mode 100644
index 00000000000..74ea40a826e
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/.template.config/template.json
@@ -0,0 +1,210 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": [
+ "Common",
+ "AI",
+ "MCP"
+ ],
+ "identity": "Microsoft.McpServer.ProjectTemplates.McpServer.CSharp",
+ "name": "MCP Server App",
+ "description": "A project template for creating a Model Context Protocol (MCP) server using C# and the ModelContextProtocol package.",
+ "shortName": "mcpserver",
+ "defaultName": "McpServer",
+ "sourceName": "McpServer-CSharp",
+ "preferNameDirectory": true,
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ },
+ "guids": [
+ "aaaaaaaa-bbbb-cccc-dddd-eeeeeeffffff"
+ ],
+ "symbols": {
+ "hostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "Transport": {
+ "type": "parameter",
+ "displayName": "The MCP server _transport type to use",
+ "description": "Whether to create a 'local' (stdio transport) or 'remote' (http transport) MCP server",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "local",
+ "description": "A console application will be created to use the stdio transport as a local MCP server"
+ },
+ {
+ "choice": "remote",
+ "description": "An ASP.NET Core web application will be created to use the http transport as a remote MCP server"
+ }
+ ],
+ "defaultValue": "local"
+ },
+ "NativeAot": {
+ "type": "parameter",
+ "datatype": "bool",
+ "defaultValue": "false",
+ "displayName": "Enable _native AOT publish",
+ "description": "Whether to enable the MCP server for publishing as a native AOT application."
+ },
+ "SelfContained": {
+ "type": "parameter",
+ "datatype": "bool",
+ "defaultValue": "true",
+ "displayName": "Enable _self-contained publish",
+ "description": "Whether to enable the MCP server for publishing as a self-contained application."
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "displayName": "Framework",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "net10.0",
+ "description": ".NET 10"
+ },
+ {
+ "choice": "net9.0",
+ "description": ".NET 9"
+ },
+ {
+ "choice": "net8.0",
+ "description": ".NET 8"
+ }
+ ],
+ "replaces": "net10.0",
+ "defaultValue": "net10.0"
+ },
+ "httpsPort": {
+ "type": "parameter",
+ "datatype": "integer",
+ "description": "Port number to use for the HTTPS endpoint in launchSettings.json."
+ },
+ "httpsPortGenerated": {
+ "type": "generated",
+ "generator": "port",
+ "parameters": {
+ "low": 5000,
+ "high": 5300
+ }
+ },
+ "httpsPortReplacer": {
+ "type": "generated",
+ "generator": "coalesce",
+ "parameters": {
+ "sourceVariableName": "httpsPort",
+ "fallbackVariableName": "httpsPortGenerated"
+ },
+ "replaces": "9995",
+ "onlyIf": [{
+ "after": "localhost:"
+ }]
+ },
+ "httpPort": {
+ "type": "parameter",
+ "datatype": "integer",
+ "description": "Port number to use for the HTTP endpoint in launchSettings.json."
+ },
+ "httpPortGenerated": {
+ "type": "generated",
+ "generator": "port",
+ "parameters": {
+ "low": 6000,
+ "high": 6300
+ }
+ },
+ "httpPortReplacer": {
+ "type": "generated",
+ "generator": "coalesce",
+ "parameters": {
+ "sourceVariableName": "httpPort",
+ "fallbackVariableName": "httpPortGenerated"
+ },
+ "replaces": "9996",
+ "onlyIf": [{
+ "after": "localhost:"
+ }]
+ },
+ "IsTransportRemote": {
+ "type": "computed",
+ "value": "(Transport == \"remote\")"
+ },
+ "IsTransportLocal": {
+ "type": "computed",
+ "value": "(!IsTransportRemote)"
+ }
+ },
+ "primaryOutputs": [
+ {
+ "path": "./README.md"
+ },
+ {
+ "path": "./McpServer-CSharp.csproj"
+ }
+ ],
+ "sources": [
+ {
+ "source": "./common",
+ "target": "./"
+ },
+ {
+ "condition": "(IsTransportLocal)",
+ "source": "./local",
+ "target": "./"
+ },
+ {
+ "condition": "(IsTransportRemote)",
+ "source": "./remote",
+ "target": "./"
+ }
+ ],
+ "postActions": [
+ {
+ "condition": "(hostIdentifier != \"dotnetcli\" && hostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens README file in the editor",
+ "manualInstructions": [],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "0"
+ },
+ "continueOnError": true
+ }
+ ],
+ "SpecialCustomOperations": {
+ "**/*.md": {
+ "operations": [
+ {
+ "type": "conditional",
+ "configuration": {
+ "if": [ "#### ---#if" ],
+ "else": [ "#### ---#else" ],
+ "elseif": [ "#### ---#elseif", "#### ---#elif" ],
+ "endif": [ "#### ---#endif" ],
+ "trim": "true",
+ "wholeLine": "true",
+ "evaluator": "C++"
+ }
+ }
+ ]
+ },
+ "**/*.http": {
+ "operations": [
+ {
+ "type": "conditional",
+ "configuration": {
+ "if": [ "#if" ],
+ "else": [ "#else" ],
+ "elseif": [ "#elseif", "#elif" ],
+ "endif": [ "#endif" ],
+ "trim": "true",
+ "wholeLine": "true",
+ "evaluator": "C++"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/Tools/RandomNumberTools.cs b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/common/Tools/RandomNumberTools.cs
similarity index 100%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/Tools/RandomNumberTools.cs
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/common/Tools/RandomNumberTools.cs
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.mcp/server.json b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/.mcp/server.json
similarity index 100%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/.mcp/server.json
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/.mcp/server.json
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/McpServer-CSharp.csproj-in b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/McpServer-CSharp.csproj-in
similarity index 90%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/McpServer-CSharp.csproj-in
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/McpServer-CSharp.csproj-in
index ae86a5b9475..6105d4d53a9 100644
--- a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/McpServer-CSharp.csproj-in
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/McpServer-CSharp.csproj-in
@@ -1,8 +1,7 @@
- net10.0
- TargetFrameworkOverride
+ net10.0
win-x64;win-arm64;osx-arm64;linux-x64;linux-arm64;linux-musl-x64
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/Program.cs b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/Program.cs
similarity index 100%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/Program.cs
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/Program.cs
diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/README.md b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/README.md
similarity index 98%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/README.md
rename to src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/README.md
index 95612c5e35e..85da5d0e61f 100644
--- a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/templates/McpServer-CSharp/README.md
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/local/README.md
@@ -56,6 +56,11 @@ To test this MCP server from source code (locally) without using a built MCP ser
}
```
+Refer to the VS Code or Visual Studio documentation for more information on configuring and using MCP servers:
+
+- [Use MCP servers in VS Code (Preview)](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
+- [Use MCP servers in Visual Studio (Preview)](https://learn.microsoft.com/visualstudio/ide/mcp-servers)
+
## Testing the MCP Server
Once configured, you can ask Copilot Chat for a random number, for example, `Give me 3 random numbers`. It should prompt you to use the `get_random_number` tool on the `McpServer-CSharp` MCP server and show you the results.
@@ -98,8 +103,4 @@ For both VS Code and Visual Studio, the configuration file uses the following se
- [Official Documentation](https://modelcontextprotocol.io/)
- [Protocol Specification](https://spec.modelcontextprotocol.io/)
- [GitHub Organization](https://github.com/modelcontextprotocol)
-
-Refer to the VS Code or Visual Studio documentation for more information on configuring and using MCP servers:
-
-- [Use MCP servers in VS Code (Preview)](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
-- [Use MCP servers in Visual Studio (Preview)](https://learn.microsoft.com/visualstudio/ide/mcp-servers)
+- [MCP C# SDK](https://modelcontextprotocol.github.io/csharp-sdk)
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/McpServer-CSharp.csproj-in b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/McpServer-CSharp.csproj-in
new file mode 100644
index 00000000000..dfeea98e66b
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/McpServer-CSharp.csproj-in
@@ -0,0 +1,35 @@
+
+
+
+ net10.0
+
+ win-x64;win-arm64;osx-arm64;linux-x64;linux-arm64;linux-musl-x64
+
+ Major
+
+ enable
+ enable
+ aaaaaaaa-bbbb-cccc-dddd-eeeeeeffffff
+
+
+
+
+ true
+ true
+
+
+ true
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/McpServer-CSharp.http b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/McpServer-CSharp.http
new file mode 100644
index 00000000000..f79d8ec1429
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/McpServer-CSharp.http
@@ -0,0 +1,21 @@
+# For more info on HTTP files go to https://aka.ms/vs/httpfile
+
+#if (hostIdentifier == "vs")
+@HostAddress = https://localhost:9995
+#else
+@HostAddress = http://localhost:9996
+#endif
+
+POST {{HostAddress}}/
+Accept: application/json, text/event-stream
+Content-Type: application/json
+MCP-Protocol-Version: 2025-11-25
+
+{
+ "jsonrpc": "2.0",
+ "id": 1,
+ "method": "tools/call",
+ "params": {
+ "name": "get_random_number"
+ }
+}
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/Program.cs b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/Program.cs
new file mode 100644
index 00000000000..3a3ce231e69
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/Program.cs
@@ -0,0 +1,15 @@
+var builder = WebApplication.CreateBuilder(args);
+
+// Add the MCP services: the transport to use (http) and the tools to register.
+builder.Services
+ .AddMcpServer()
+ .WithHttpTransport()
+ .WithTools();
+
+var app = builder.Build();
+app.MapMcp();
+#if (hostIdentifier == "vs")
+app.UseHttpsRedirection();
+#endif
+
+app.Run();
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/Properties/launchSettings.json b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/Properties/launchSettings.json
new file mode 100644
index 00000000000..37d5661e4de
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/Properties/launchSettings.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "https://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": false,
+ "applicationUrl": "http://localhost:9996",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "https": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": false,
+ "applicationUrl": "https://localhost:9995;http://localhost:9996",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/README.md b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/README.md
new file mode 100644
index 00000000000..a8700767510
--- /dev/null
+++ b/src/ProjectTemplates/Microsoft.McpServer.ProjectTemplates/templates/McpServer-CSharp/remote/README.md
@@ -0,0 +1,78 @@
+# MCP Server
+
+This README was created using the C# MCP server project template.
+It demonstrates how you can easily create an MCP server using C# and run it as an ASP.NET Core web application.
+
+#### ---#if (SelfContained)
+The MCP server is built as a self-contained application and does not require the .NET runtime to be installed on the target machine.
+However, since it is self-contained, it must be built for each target platform separately.
+By default, the template is configured to build for:
+* `win-x64`
+* `win-arm64`
+* `osx-arm64`
+* `linux-x64`
+* `linux-arm64`
+* `linux-musl-x64`
+
+If you require more platforms to be supported, update the list of runtime identifiers in the project's `` element.
+#### ---#else
+The MCP server is built as a framework-dependent application and requires the ASP.NET Core runtime to be installed on the target machine.
+The application is configured to roll-forward to the next highest major version of the runtime if one is available on the target machine.
+If an applicable .NET runtime is not available, the MCP server will not start.
+Consider building the MCP server as a self-contained application if you want to avoid this dependency.
+#### ---#endif
+
+Please note that this template is currently in an early preview stage. If you have feedback, please take a [brief survey](http://aka.ms/dotnet-mcp-template-survey).
+
+## Developing locally
+
+To test this MCP server from source code (locally), you can configure your IDE to connect to the server using localhost.
+
+#### ---#if (hostIdentifier == "vs")
+```json
+{
+ "servers": {
+ "McpServer-CSharp": {
+ "type": "http",
+ "url": "https://localhost:9995"
+ }
+ }
+}
+```
+#### ---#else
+```json
+{
+ "servers": {
+ "McpServer-CSharp": {
+ "type": "http",
+ "url": "http://localhost:9996"
+ }
+ }
+}
+```
+#### ---#endif
+
+Refer to the VS Code or Visual Studio documentation for more information on configuring and using MCP servers:
+
+- [Use MCP servers in VS Code (Preview)](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
+- [Use MCP servers in Visual Studio (Preview)](https://learn.microsoft.com/visualstudio/ide/mcp-servers)
+
+## Testing the MCP Server
+
+Once configured, you can ask Copilot Chat for a random number, for example, `Give me 3 random numbers`. It should prompt you to use the `get_random_number` tool on the `McpServer-CSharp` MCP server and show you the results.
+
+## Known issues
+
+1. When using VS Code, connecting to `https://localhost:9995` fails.
+ * This is related to using a self-signed developer certificate, even when the certificate is trusted by the system.
+ * Connecting with `http://localhost:9996` succeeds.
+ * See [Cannot connect to MCP server via SSE using trusted developer certificate (microsoft/vscode#248170)](https://github.com/microsoft/vscode/issues/248170) for more information.
+
+## More information
+
+ASP.NET Core MCP servers use the [ModelContextProtocol.AspNetCore](https://www.nuget.org/packages/ModelContextProtocol.AspNetCore) package from the MCP C# SDK. For more information about MCP:
+
+- [Official Documentation](https://modelcontextprotocol.io/)
+- [Protocol Specification](https://spec.modelcontextprotocol.io/)
+- [GitHub Organization](https://github.com/modelcontextprotocol)
+- [MCP C# SDK](https://modelcontextprotocol.github.io/csharp-sdk)
diff --git a/test/ProjectTemplates/Infrastructure/TemplateTestUtilities.cs b/test/ProjectTemplates/Infrastructure/TemplateTestUtilities.cs
index 051b9515ccd..58fe84b7198 100644
--- a/test/ProjectTemplates/Infrastructure/TemplateTestUtilities.cs
+++ b/test/ProjectTemplates/Infrastructure/TemplateTestUtilities.cs
@@ -36,7 +36,7 @@ public static class TemplateTestUtilities
public static string GetProjectNameForArgs(string[] args, string? prefix = null)
{
IEnumerable nameParts = args
- .Select(arg => Regex.Replace(arg, @"--[Ff]ramework=(net[0-9]+)\.0", "$1"))
+ .Select(arg => Regex.Replace(arg, @"-(?:f|-[Ff]ramework)=(net[0-9]+)\.0", "$1"))
.Select(arg => Regex.Replace(arg, "--(.*?)=true", "$1_T"))
.Select(arg => Regex.Replace(arg, "--(.*?)=false", "$1_F"))
.Select(arg => Regex.Replace(arg, "--(.*?)=(.*)", "$2"))
diff --git a/test/ProjectTemplates/Infrastructure/VerifyScrubbers.cs b/test/ProjectTemplates/Infrastructure/VerifyScrubbers.cs
index d172082c5e3..1fa35f33a5e 100644
--- a/test/ProjectTemplates/Infrastructure/VerifyScrubbers.cs
+++ b/test/ProjectTemplates/Infrastructure/VerifyScrubbers.cs
@@ -44,6 +44,7 @@ public static ScrubbersDefinition AddLocalhostPortScrubber(
return scrubbers
.AddScrubber(scrubPorts, extension: "md")
+ .AddScrubber(scrubPorts, extension: "http")
.AddScrubber((path, content) =>
{
if (Path.GetFileName(path).Equals("launchSettings.json", StringComparison.OrdinalIgnoreCase))
diff --git a/test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/McpServerExecutionTests.cs b/test/ProjectTemplates/Microsoft.McpServer.ProjectTemplates.IntegrationTests/McpServerExecutionTests.cs
similarity index 94%
rename from test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/McpServerExecutionTests.cs
rename to test/ProjectTemplates/Microsoft.McpServer.ProjectTemplates.IntegrationTests/McpServerExecutionTests.cs
index 5a3abd9591b..48aaee30a1c 100644
--- a/test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/McpServerExecutionTests.cs
+++ b/test/ProjectTemplates/Microsoft.McpServer.ProjectTemplates.IntegrationTests/McpServerExecutionTests.cs
@@ -30,7 +30,7 @@ public McpServerExecutionTests(TemplateExecutionTestFixture fixture, ITestOutput
public static TemplateExecutionTestConfiguration Configuration { get; } = new()
{
- TemplatePackageName = "Microsoft.Extensions.AI.Templates",
+ TemplatePackageName = "Microsoft.McpServer.ProjectTemplates",
TemplateName = "mcpserver"
};
@@ -39,6 +39,7 @@ public static IEnumerable