-
Notifications
You must be signed in to change notification settings - Fork 702
mcp-publisher v1.0.0 converts camelCase package fields to snake_case, causing 422 validation errors #1110
Description
Environment
mcp-publisher v1.0.0 (Windows amd64)
PowerShell 7.6.0 and Git Bash (MINGW64)
server.json validated manually with correct camelCase fields
Behavior
mcp-publisher publish converts camelCase fields in packages[] to snake_case before sending to the API. The API validates against the camelCase schema and rejects the request with 422.
Fields affected:
registryType → sent as registry_type
environmentVariables → sent as environment_variables
isRequired → sent as is_required
isSecret → sent as is_secret
Steps to reproduce
mcp-publisher init generates a template with snake_case fields
Manually correct to camelCase per the schema at https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json
mcp-publisher publish still sends snake_case
server.json (verified with cat before publish)
json{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.GUARDIANCHAIN-GC-1/gc1",
"description": "Non-custodial AI governance evidence. 6 blockchains. 38 tools.",
"repository": {
"url": "https://github.com/GUARDIANCHAIN-GC-1/GC-1",
"source": "github"
},
"version": "1.0.0",
"packages": [
{
"registryType": "npm",
"identifier": "@guardianchain-llc/gc1",
"version": "1.0.0",
"transport": {
"type": "stdio"
}
}
]
}
API error response
json{
"title": "Unprocessable Entity",
"status": 422,
"detail": "validation failed",
"errors": [
{
"message": "expected required property registryType to be present",
"location": "body.packages[0]"
},
{
"message": "unexpected property",
"location": "body.packages[0].registry_type"
}
]
}
Expected behavior
mcp-publisher publish should send the JSON fields exactly as written in server.json without case conversion, or mcp-publisher init should generate the schema the API actually accepts.