mcpA2aBridgeServer

fun mcpA2aBridgeServer(identity: ServerMetaData, baseUri: Uri, security: McpSecurity, tenant: Tenant? = null, http: HttpHandler = JavaHttpClient(responseBodyMode = BodyMode.Stream), mcpFilter: McpFilter = McpFilter.NoOp, a2aProtocolVersion: ProtocolVersion = LATEST_VERSION, random: Random = SecureRandom(), path: String = "/mcp"): PolyHandler(source)

A complete MCP Server that bridges an A2A agent at baseUri — the agent card is fetched once at construction (typically from .well-known/agent-card.json) and the resulting tools (send_message, get_task, cancel_task, list_tasks) are exposed under path.

The inbound MCP request's Authorization header is forwarded to the A2A agent on every tool call. For other passthrough schemes (e.g. X-Api-Key), use mcpA2aBridge with a custom lens and wrap it with mcp.