Make server.mcp_config optional for uv server type (strict 0.4 schema)#270
Open
aosmcleod wants to merge 1 commit into
Open
Make server.mcp_config optional for uv server type (strict 0.4 schema)#270aosmcleod wants to merge 1 commit into
aosmcleod wants to merge 1 commit into
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
MANIFEST.md (uv server type): "
mcp_configis optional (host manages execution)". The loose 0.4 schema encodes this, but the strict schema — the onevalidateandpackuse — still requiredmcp_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_configto thehello-world-uvexample rather than fixing the schema, so the underlying contradiction remained. Fixes #263 (refs #201).Fix
In
src/schemas/0.4.ts, makemcp_configoptional and add asuperRefinethat still requires it for all non-uvserver types — so strictness is preserved for node/python/binary while UV extensions validate.Test
Adds 0.4 cases to
test/schemas.test.ts: auvserver with nomcp_configvalidates; anodeserver without it still errors atserver.mcp_config. The uv-accept case fails against the old schema and passes with the fix.yarn lint+yarn testgreen.