Skip to content

Make server.mcp_config optional for uv server type (strict 0.4 schema)#270

Open
aosmcleod wants to merge 1 commit into
modelcontextprotocol:mainfrom
aosmcleod:fix/uv-mcp-config-optional
Open

Make server.mcp_config optional for uv server type (strict 0.4 schema)#270
aosmcleod wants to merge 1 commit into
modelcontextprotocol:mainfrom
aosmcleod:fix/uv-mcp-config-optional

Conversation

@aosmcleod

Copy link
Copy Markdown

Problem

MANIFEST.md (uv server type): "mcp_config is optional (host manages execution)". The loose 0.4 schema encodes this, but the strict schema — the one validate and pack use — still required mcp_config, so a spec-compliant UV extension without it is rejected (server.mcp_config: Required).

This is the same failure as #201, which was closed by adding mcp_config to the hello-world-uv example rather than fixing the schema, so the underlying contradiction remained. Fixes #263 (refs #201).

Fix

In src/schemas/0.4.ts, make mcp_config optional and add a superRefine that still requires it for all non-uv server types — so strictness is preserved for node/python/binary while UV extensions validate.

Test

Adds 0.4 cases to test/schemas.test.ts: a uv server with no mcp_config validates; a node server without it still errors at server.mcp_config. The uv-accept case fails against the old schema and passes with the fix. yarn lint + yarn test green.

MANIFEST.md states mcp_config is optional for the uv server type (the host
manages execution), and the loose 0.4 schema already encodes this — but the
strict schema still required it, so a spec-compliant UV extension failed
`mcpb validate` and `mcpb pack`. This is the same failure as modelcontextprotocol#201, which was
closed by adding mcp_config to the example rather than fixing the schema.

Make mcp_config optional and add a superRefine that still requires it for all
non-uv server types, preserving strictness. Adds 0.4 tests for both cases.

Fixes modelcontextprotocol#263 (refs modelcontextprotocol#201)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strict 0.4 schema still requires server.mcp_config for uv type (contradicts spec + loose schema; incomplete fix of #201)

1 participant