Skip to content
{mcpdesc}

Define security schemes with their required fields

Named security schemes are non-empty and each scheme has a type and the fields that type requires, such as OAuth flows with their URLs and scopes. Unknown properties are rejected.

securitySchemes is a non-empty map of Security Scheme Objects that contain their type-specific required fields and only defined properties.

Rule ID: mcpdesc.security-scheme.members
Owner: mcpdesc
Surface: Security Scheme
Kind: structural
Requirement level: must
Protocol versions: independent of the MCP protocol version
Document schema locations: #/$defs/securitySchemeMap, #/$defs/securityScheme, #/$defs/oauthFlows, #/$defs/oauthFlow
Status: internal · Enforcement: internal

Source: expected-invalid/empty-ordinary-root-collections.json · Selected: /securitySchemes

{}

Source: expected-invalid/invalid-security-scheme-name.json · Selected: /securitySchemes

{
"invalid name": {
"type": "http",
"scheme": "bearer"
}
}

Source: expected-invalid/discriminated-union-members.json · Selected: /securitySchemes/token

{
"type": "http",
"shceme": "bearer"
}

document.yaml at immutable tag v0.9.0-rc.3.