yera.config.schema.mcp

MCP server configuration schemas.

Symbols

class MCPConfig — Configured MCP server connections available for profile selection.
class MCPNoAuth — Declare that an MCP server requires no authentication.
class MCPOAuthAuth — Reference a stored OAuth authorization for an MCP server.
class MCPSecretHeadersAuth — Send HTTP headers whose values the connection keeps in the secret store.
class MCPServerConfig — Configuration required to connect to one MCP server.
class MCPStaticHeadersAuth — Reference credentials supplied as static HTTP headers.
def require_http_url — Require a complete HTTP endpoint for streamable MCP transport.

MCPConfig

Inherits: BaseModel

Configured MCP server connections available for profile selection.

MCPNoAuth

Inherits: BaseModel

Declare that an MCP server requires no authentication.

MCPOAuthAuth

Inherits: BaseModel

Reference a stored OAuth authorization for an MCP server.

Attributes

type
type: Literal['oauth']

Discriminator identifying OAuth authentication.

authorization_id
type: str

Stable identity of the stored authorization.

client_profile
type: str | None

Optional predefined OAuth client configuration.

MCPSecretHeadersAuth

Inherits: BaseModel

Send HTTP headers whose values the connection keeps in the secret store.

Attributes

type
type: Literal['secret_headers']

Discriminator identifying connection-owned header authentication.

secret_id
type: str

Owner of the header values in Yera's secret store.

headers
type: Annotated[list[str], Field(min_length=1)]

Names of the headers sent with every request.

MCPServerConfig

Inherits: BaseModel

Configuration required to connect to one MCP server.

Attributes

url
type: str

Streamable HTTP endpoint exposed by the MCP server.

enabled
type: bool

Whether this server is available to Yera.

auth
type: MCPAuth

Authentication policy used for this server.

Methods

validate_http_url — Require a complete HTTP endpoint for streamable MCP transport.

MCPServerConfig.validate_http_url

validate_http_url(
    value: str,
) → str

Require a complete HTTP endpoint for streamable MCP transport.

MCPStaticHeadersAuth

Inherits: BaseModel

Reference credentials supplied as static HTTP headers.

Attributes

type
type: Literal['headers']

Discriminator identifying static-header authentication.

headers
type: dict[str, str]

Mapping of HTTP header names to credential keys.

require_http_url

require_http_url(
    value: str,
) → str

Require a complete HTTP endpoint for streamable MCP transport.

Parameters

value
type: str

The endpoint to check.

Returns

type: str

The endpoint, unchanged.

Raises

ValueError

If the endpoint is not an absolute HTTP or HTTPS URL.