go-sdk/mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rob Findley d2f2f87bbe internal/mcp: implement streamable HTTP transport
Add an (almost) complete implementation of the streamable HTTP
transport, including:
- A StreamableHTTPHandler for serving sessions.
- A StreamableHTTPServerTransport that supports session resumption.
- A minimal StreamableHTTPClientTransport.

Additionally, include the following minor changes:
- Refactor SSE event reading to use an iterator.
- Start to to aliases for JSON-RPC types (incomplete)
- Fix handling for null tool arguments (again)

Still to do:
- The streamable client does not support retry/resumption, or the
  side-channel GET requests.
- Support configurable session and event retention (garbage collection).
- Expose the HTTP client used for HTTP requests (for auth).

Change-Id: Ieba216ef901169b4660d601386fa0c7c7bb4c4b2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/667515
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-17 17:54:33 -07:00
..
testdata internal/mcp: implement resource templates 2025-06-09 10:59:01 -07:00
client.go internal/mcp: add NotifyProgress 2025-06-12 09:59:05 -07:00
client_list_test.go internal/mcp: consolidate list tests 2025-06-10 07:43:39 -07:00
client_test.go internal/mcp: iterators return pointers 2025-06-10 06:10:44 -07:00
cmd.go internal/mcp: add a command transport for connecting to a sidecar 2025-05-01 17:43:04 -07:00
cmd_test.go internal/mcp: reorganize the tool API, keeping generics 2025-06-10 04:57:48 -07:00
conformance_test.go internal/jsonrpc2_v2: refactor Reader/Writer and remove event dependency 2025-06-10 07:56:09 -07:00
content.go all: fix some function names and typos in comment 2025-05-23 10:44:52 -07:00
content_test.go internal/mcp: pointerize all the things 2025-05-14 06:22:56 -07:00
example_progress_test.go internal/mcp: middleware on the sending side 2025-06-02 13:16:02 -07:00
features.go internal/mcp: keep an ordered list of feature keys 2025-05-20 13:37:12 -07:00
features_test.go internal/mcp: reorganize the tool API, keeping generics 2025-06-10 04:57:48 -07:00
generate.go internal/mcp: add NotifyProgress 2025-06-12 09:59:05 -07:00
logging.go internal/mcp: implement logging 2025-05-22 15:02:13 -07:00
mcp.go internal/mcp: construct README with weave 2025-05-21 16:21:26 -07:00
mcp_test.go internal/mcp: add NotifyProgress 2025-06-12 09:59:05 -07:00
prompt.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
prompt_test.go internal/mcp: future-proof prompt handling 2025-05-22 15:06:03 -07:00
protocol.go internal/mcp: add NotifyProgress 2025-06-12 09:59:05 -07:00
resource.go internal/mcp: implement resource templates 2025-06-09 10:59:01 -07:00
resource_go124.go internal/mcp: add the FileResourceHandler method 2025-05-19 11:15:23 -07:00
resource_pre_go124.go internal/mcp: add the FileResourceHandler method 2025-05-19 11:15:23 -07:00
resource_test.go internal/mcp: implement resource templates 2025-06-09 10:59:01 -07:00
root.go internal/mcp: implement roots 2025-05-13 07:52:49 -07:00
server.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
server_example_test.go internal/mcp: iterators return pointers 2025-06-10 06:10:44 -07:00
server_test.go internal/mcp: change paginateList to a generic helper 2025-06-05 07:47:33 -07:00
shared.go internal/mcp: change paginateList to a generic helper 2025-06-05 07:47:33 -07:00
shared_test.go internal/mcp: reorganize the tool API, keeping generics 2025-06-10 04:57:48 -07:00
sse.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
sse_example_test.go internal/mcp: reorganize the tool API, keeping generics 2025-06-10 04:57:48 -07:00
sse_test.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
streamable.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
streamable_test.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
tool.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
tool_test.go internal/mcp: apply JSON schema defaults 2025-06-10 08:07:54 -07:00
transport.go internal/mcp: implement streamable HTTP transport 2025-06-17 17:54:33 -07:00
transport_test.go internal/jsonrpc2_v2: refactor Reader/Writer and remove event dependency 2025-06-10 07:56:09 -07:00
util.go internal/mcp: unify json tag parsing 2025-06-04 11:03:21 -07:00
util_test.go internal/mcp: meta and progress token 2025-05-27 12:53:53 -07:00