Skip to content

MCP Driver part 2: Streamable HTTP transport #54

@dgenio

Description

@dgenio

Parent: #41 | Split: Streamable HTTP transport

Problem

This is part 2 of #41 (MCP Driver). It covers the Streamable HTTP transport — connecting to remote MCP servers over HTTP — and reconnection handling for long-lived connections.

Depends on the core MCPDriver + stdio transport (part 1).

Proposed Change

1. Streamable HTTP transport

  • Connect to remote MCP servers via mcp.client.streamable_http.streamable_http_client.
  • Factory method: MCPDriver.from_http(url).
  • Handle reconnection for long-lived HTTP connections.
  • Clean shutdown via async with protocol.

2. Extended response handling

  • Support structured output (structuredContent) when available.
  • Handle HTTP-specific errors (timeouts, connection drops) with retry logic.

Acceptance Criteria

  • MCPDriver.from_http() connects to a Streamable HTTP MCP server
  • HTTP reconnection works for dropped connections
  • Structured output (structuredContent) is properly handled
  • Integration test with mock HTTP MCP server
  • docs/integrations.md updated with real usage examples for both transports

Affected Files

  • src/agent_kernel/drivers/mcp.py (extend with HTTP transport)
  • tests/test_drivers.py (HTTP transport tests)
  • docs/integrations.md (usage examples)

Dependencies

  • Requires MCP Driver part 1 (stdio transport + core)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions