mcp-client

MCP 2026-07-28 client: streamable-HTTP and stdio transports, MRTR, subscriptions and the tasks extension.

mcp
model-context-protocol
client
async
moon add marianoguerra/mcp-client@0.7.0
Download zip
Version
0.7.0
License
MIT
Last updated
2 days ago
Downloads
66

Dependencies

README

#marianoguerra/mcp-client

A Model Context Protocol 2026-07-28 client: transports, the request engine, MRTR, subscriptions and the tasks extension.

moon add marianoguerra/mcp-client

Native only, because moonbitlang/async's process spawning and HTTP client are. If you need another backend, depend on marianoguerra/mcp and implement its Transport trait yourself.

#What is in it

PackagePurpose
@clientserver/discover, the request engine and its MRTR retry loop, subscriptions/listen, and the io.modelcontextprotocol/tasks extension
@transport_httpStreamable HTTP: POST-only, SEP-2243 headers, request-scoped SSE streams
@transport_stdioA child process speaking newline-delimited JSON-RPC
@sseSSE framing over an @io.Reader

#Notes on the era

  • There is no initialize handshake, no session id, no GET stream. server/discover replaces all of it, and a 2025-era server will answer it with -32601.
  • Server-to-client requests are gone. A server that needs input returns an input_required result and the client retries the original request with a new id (MRTR, SEP-2322). What the client can answer depends on the capabilities it declares.
  • resources/subscribe, ping and logging/setLevel were removed. Push notifications come from one long-lived subscriptions/listen POST; the log level is a per-request _meta opt-in.
  • A task-augmented tools/call returns a seed with resultType: "task" — the request is finished, the work is not — and progress comes from polling tasks/get.