Skip to content

Conversation

@mzkmnk
Copy link

@mzkmnk mzkmnk commented Nov 3, 2025

Summary

Fixes #3346. Improves the MCP server configuration schema to conditionally require fields based on the transport type.

Problem

The previous schema required the command field for all MCP servers. However, http type MCP servers need a url field instead of command. This caused
incorrect validation for HTTP-based MCP server configurations.

Changes

• Introduced JSON Schema if-then-else syntax in schemas/agent-v1.json
• When type: "http", the url field is required
• Otherwise (for stdio), the command field is required

Impact

• Only affects agent configuration schema validation logic
• No impact on existing valid configurations
• Invalid configurations will now be detected more accurately

Before

スクリーンショット 2025-11-03 午後10 43 23

After

スクリーンショット 2025-11-03 午後9 48 21

Tool used

- Use if-then schema to conditionally require fields based on transport type
- stdio type requires 'command' field
- http type requires 'url' field
- Fixes aws#3346
@mzkmnk
Copy link
Author

mzkmnk commented Nov 5, 2025

@mschrage

Will this PR be merged once the qv2 project is completed?

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.

bug: mcpServers schema requires "command" even for HTTP-based MCP servers

2 participants