Jonathan Amsterdam
bac1b78b4a
internal/mcp: client middleware
...
Implement middleware for clients.
Make the middleware types generic so we can factor out code
from both peers.
I was able to make the request handler generic, with one weird trick
(see handleRequest).
The first three declarations of shared.go, and a few others as well,
are copied unchanged from middleware.go.
Change-Id: Ib3239d8fcfda022ddb5b554c38cff4cdbc3704c1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/673635
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-05-19 11:15:45 -07:00
..
testdata /files
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
client.go
internal/mcp: client middleware
2025-05-19 11:15:45 -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: reinstate ClientSession
2025-05-14 12:41:58 -07:00
content.go
internal/mcp: pointerize all the things
2025-05-14 06:22:56 -07:00
content_test.go
internal/mcp: pointerize all the things
2025-05-14 06:22:56 -07:00
features.go
internal/mcp/protocol: featureSet[T]
2025-05-12 11:03:35 -07:00
generate.go
internal/mcp: dispatcher middleware
2025-05-16 11:24:52 -07:00
mcp.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
mcp_test.go
internal/mcp: client middleware
2025-05-19 11:15:45 -07:00
prompt.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
prompt_test.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
protocol.go
internal/mcp: dispatcher middleware
2025-05-16 11:24:52 -07:00
resource.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -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: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
root.go
internal/mcp: implement roots
2025-05-13 07:52:49 -07:00
server.go
internal/mcp: client middleware
2025-05-19 11:15:45 -07:00
server_example_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
shared.go
internal/mcp: client middleware
2025-05-19 11:15:45 -07:00
sse.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
sse_example_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
sse_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
tool.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
tool_test.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
transport.go
internal/mcp: dispatcher middleware
2025-05-16 11:24:52 -07:00
transport_test.go
internal/mcp: implement HTTP SSE transport
2025-04-23 19:15:20 -07:00
util.go
internal/mcp: simplify content
2025-05-13 15:03:25 -07:00