Skip to content

[FEATURE] Add HTTP client transport support #36

@mchades

Description

@mchades

Describe the feature

Add an HTTP client transport (HttpClientTransport) so the SDK can communicate with ADP servers over HTTP, in addition to the existing stdio transport.

Motivation

The adp-hypervisor is adding HTTP transport support (see adp-hypervisor#89). The SDK needs a corresponding client-side HTTP transport to connect to ADP servers running in HTTP mode, without managing a subprocess.

Describe the solution

  • Add httpx as a required dependency (following MCP SDK precedent).
  • Implement HttpClientTransport that sends JSON-RPC requests via POST and reads the response body.
  • Add an http_client() async context manager as a convenience function (mirroring stdio_client()).
  • Update README.md with HTTP transport documentation and usage examples.

Additional context

  • Related: adp-hypervisor#89 (server-side HTTP transport)
  • The HTTP transport uses request-response semantics: each write_message performs the POST and buffers the response; read_message returns it. Concurrency is serialized by ClientSession._send_lock, consistent with the stdio transport approach.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions