-
Notifications
You must be signed in to change notification settings - Fork 429
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The JSON schema for server.json has a regex for the server name.
"pattern": "^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$", |
But this is not validated on publish. I found this when I added a /aot
to my server name (and AOT'd variant = io.github.joelverhagen/Knapcode.SampleMcpServer/aot
). I wasn't sure if VS Code was correct telling me that my server name was not valid... so I published anyway:
I remember seeing a sample in the past with multiple slashes in the "path" portion but I can't find it now.
To Reproduce
See the schema.
And look at this mistake of mine :/
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
"name": "io.github.joelverhagen/Knapcode.SampleMcpServer/aot",
"description": "A sample MCP server using the MCP C# SDK. Generates random numbers and random weather.",
"repository": {
"url": "https://github.com/joelverhagen/Knapcode.SampleMcpServer.git",
"source": "github"
},
"version": "0.8.0-beta",
"packages": [
{
"registry_type": "nuget",
"registry_base_url": "https://api.nuget.org",
"identifier": "Knapcode.SampleMcpServer",
"version": "0.8.0-beta",
"transport": {
"type": "stdio"
},
"package_arguments": [
{
"value": "mcp",
"type": "positional",
"value_hint": "mcp"
},
{
"value": "start",
"type": "positional",
"value_hint": "start"
}
],
"environment_variables": [
{
"value": "{weather_choices}",
"variables": {
"weather_choices": {
"description": "Comma separated list of weather descriptions to randomly select.",
"is_required": true
}
},
"name": "WEATHER_CHOICES"
}
]
}
],
"_meta": {
"io.modelcontextprotocol.registry/official": {
"id": "86667e38-34da-44eb-a0ce-e34112fd98c6",
"published_at": "2025-09-12T21:54:51.656512708Z",
"updated_at": "2025-09-12T21:54:51.656512708Z",
"is_latest": true
}
}
},
Expected behavior
Schema and server validation should agree.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working