Skip to content

MCP template should use token replacement for id in server.json #6797

@timheuer

Description

@timheuer

Description

In the .mcp/server.json there is an identifier that has a placeholder <your package ID here> -- this really should use the sourceName property of the template which would get the automatic replacement value and mirror what is used in the PackageId in the csproj.

Changing <your package ID here> to McpServer-CSharp will do the trick as that is the sourceName -- PackageId should be changed too.

Reproduction Steps

Create a new project with the template named "TimFooBar"

Expected behavior

PackageId defaults to the project name. This is common templating behavior.

Actual behavior

Hard-coded to SampleMcpServer

Regression?

No

Known Workarounds

Manually change it

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ai-templatesMicrosoft.Extensions.AI.TemplatesbugThis issue describes a behavior which is not expected - a bug.untriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions