Agent Registry の MCP レコード作成は server.json スキーマの制約に注意
AWS Agent Registry で MCP サーバーレコードを作成しようとしたら、Schema validation failed: content is not in compliance with schema version で何度もエラーになった。ドキュメントの Minimal valid example 通りに書いているのに通らない。
原因は、Agent Registry が MCP Registry の server.json スキーマでバリデーションしており、そのスキーマに以下の制約があるためだった。
nameは reverse-DNS 形式が必須(パターン:^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$)。weather-apiは NG、io.example/weather-apiは OKdescriptionは 100 文字以内(maxLength: 100)。超えると無言でバリデーションエラーschemaVersionの指定が必須。省略するとdoes not match any supported versionエラー
動くコマンド:
aws bedrock-agentcore-control create-registry-record \
--registry-id "<registry-id>" \
--name "weather-api" \
--record-version "1.0.0" \
--descriptor-type MCP \
--descriptors '{
"mcp": {
"server": {
"schemaVersion": "2025-07-09",
"inlineContent": "{\"name\": \"io.example/weather-api\", \"description\": \"Weather data and forecast service\", \"version\": \"1.0.0\"}"
}
}
}' \
--region ap-northeast-1エラーメッセージが content is not in compliance with schema version としか言わず、どのフィールドが問題かを教えてくれないのが厄介。スキーマの JSON を直接読んで制約を確認するのが確実である。
詳しい検証は AWS Agent Registry を実機検証 を参照。
