mcp
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| McpError aclientp.schema.v2.mcp **UNSTABLE**: An inner MCP error, distinct from an outer ACP error. |
||
| McpServerAcp aclientp.schema.v2.mcp **UNSTABLE**: ACP transport configuration for MCP. |
||
| McpServerHttp aclientp.schema.v2.mcp HTTP transport configuration for MCP. |
||
| McpServerStdio aclientp.schema.v2.mcp Stdio transport configuration for MCP. |
||
| MessageMcpError aclientp.schema.v2.mcp **UNSTABLE**: Successful ``mcp/message`` call whose inner MCP request failed. |
||
| MessageMcpNotification aclientp.schema.v2.mcp **UNSTABLE**: Notification for an active inner MCP request, from provider to consumer. |
||
| MessageMcpRequest aclientp.schema.v2.mcp **UNSTABLE**: Parameters of ``mcp/message``: an inner MCP request to the provider. |
||
| MessageMcpResult aclientp.schema.v2.mcp **UNSTABLE**: Successful ``mcp/message`` outcome: an opaque inner MCP result. |
||
| UnknownMcpServer aclientp.schema.v2.mcp A custom or future MCP transport; ``type`` values starting with ``_`` are extensions. |
🛈 DocStrings¶
v2 MCP servers: transports clients pass on session setup, and MCP over ACP.
McpServer
module-attribute
¶
McpServer = Annotated[
Annotated[McpServerHttp, Tag("http")]
| Annotated[McpServerAcp, Tag("acp")]
| Annotated[McpServerStdio, Tag("stdio")]
| Annotated[UnknownMcpServer, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"http", "acp", "stdio"}))),
]
An MCP server the agent should connect to.
Each transport requires the matching session.mcp agent capability.
MessageMcpResponse
module-attribute
¶
MessageMcpResponse = MessageMcpResult | MessageMcpError
UNSTABLE: Response of mcp/message: exactly one inner MCP outcome.
McpError
¶
Bases: Schema
UNSTABLE: An inner MCP error, distinct from an outer ACP error.
Source code in src/aclientp/schema/v2/mcp.py
McpServerAcp
¶
Bases: AnnotatedObject
UNSTABLE: ACP transport configuration for MCP.
The server is provided by an ACP component and talks over the ACP channel using
mcp/message.
Source code in src/aclientp/schema/v2/mcp.py
server_id
instance-attribute
¶
server_id: McpServerAcpId
Identifier generated by the component providing the server; never reused.
McpServerHttp
¶
Bases: AnnotatedObject
HTTP transport configuration for MCP.
Source code in src/aclientp/schema/v2/mcp.py
headers
class-attribute
instance-attribute
¶
headers: Sequence[HttpHeader] | MISSING = MISSING
HTTP headers to set when making requests to the MCP server. Headers the MCP transport defines are owned by the transport, and Agents use the transport's values for them.
McpServerStdio
¶
Bases: AnnotatedObject
Stdio transport configuration for MCP.
Source code in src/aclientp/schema/v2/mcp.py
args
class-attribute
instance-attribute
¶
Command-line arguments to pass to the MCP server.
env
class-attribute
instance-attribute
¶
env: Sequence[EnvVariable] | MISSING = MISSING
Environment variables to set when launching the MCP server. Names SHOULD be unique.
Agents MAY reject duplicates with -32602, and otherwise the last entry wins.
MessageMcpError
¶
Bases: AnnotatedObject
UNSTABLE: Successful mcp/message call whose inner MCP request failed.
Source code in src/aclientp/schema/v2/mcp.py
MessageMcpNotification
¶
Bases: AnnotatedObject
UNSTABLE: Notification for an active inner MCP request, from provider to consumer.
Source code in src/aclientp/schema/v2/mcp.py
params
class-attribute
instance-attribute
¶
The inner MCP params; None is the same as omitted.
request_id
instance-attribute
¶
request_id: McpRequestId
The identifier of the active inner MCP request.
server_id
instance-attribute
¶
server_id: McpServerAcpId
The declared ACP MCP server handling the associated request.
MessageMcpRequest
¶
Bases: AnnotatedObject
UNSTABLE: Parameters of mcp/message: an inner MCP request to the provider.
Source code in src/aclientp/schema/v2/mcp.py
params
class-attribute
instance-attribute
¶
The inner MCP params; None is the same as omitted.
request_id
instance-attribute
¶
request_id: McpRequestId
The caller-generated identifier for the inner MCP request.
server_id
instance-attribute
¶
server_id: McpServerAcpId
The declared ACP MCP server receiving this request.
MessageMcpResult
¶
Bases: AnnotatedObject
UNSTABLE: Successful mcp/message outcome: an opaque inner MCP result.