Repository navigation
feat: HTTP server and client support (Streamable HTTP transport) - #5
Merged
Merged
Conversation
- Server: Handler(), ListenAndServe(addr), Serve(l) — MCP Streamable HTTP over net/http, zero new dependencies. One JSON-RPC message per POST, JSON or SSE response per Accept, 202 for notifications, 405/415 for bad method/content-type, MaxRequestBytes caps via MaxBytesReader. - Auth: optional SetAuthToken (constant-time Bearer check, 401 + WWW-Authenticate challenge) and SetAllowedOrigins (403 on off-list Origins, DNS-rebinding defense). Both off by default; stdio unaffected. - Client: Client interface with NewHTTPClient(url) and NewStdioClient (subprocess over pipes) — Initialize, ListTools, CallTool, ListResources, ReadResource, ListPrompts, GetPrompt, Close. - Tests: RED-first; httptest server suite, client suites (HTTP + real subprocess), loopback E2E covering tools, resources, and prompts. - Docs: README API reference and AGENTS.md code map updated.
jkyberneees
force-pushed
the
feat/http-transport
branch
from
October 4, 2026 13:12
6efcced to
e7f1b63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Handler(),ListenAndServe(addr),Serve(l)— one JSON-RPC message per POST, JSON or SSE responses, 202 for notifications, request-size caps, and HTTP server timeouts (slowloris-safe). Zero new dependencies.SetAuthToken(constant-time Bearer check, 401 + WWW-Authenticate) andSetAllowedOrigins(403 on off-list Origins). Both off by default; stdio unaffected.Clientinterface withNewHTTPClient/NewHTTPClientWithToken(remote servers) andNewStdioClient(subprocess over pipes) — concurrency-safe, timeout-safe stream handling, protocol version validation.-race. RED-first throughout; includes loopback E2E and subprocess tests.Adversarially reviewed (3 reviewers) with all findings fixed and independently verified.