-
Notifications
You must be signed in to change notification settings - Fork 274
Description
MCP spec and design document both state that it should be possible to implement a custom transport protocol. This library tries to allow that by defining a Transport and Connection interfaces which rely on internal jsonrpc2 types. Some of the types are re-exported, but unfortunately are impossible to construct without relying on internal jsonrpc2 library.
Specifically JSONRPCRequest relies on JSONRPCID, which contains only private fields. Because jsonrpc2.MakeID is internal function, it is impossible to construct JSONRPCID. At minimum jsonrpc2.MakeID should also be re-exported. But it would be beneficial for custom transport implementations to also have access to jsonrpc2.EncodeMessage and jsonrpc2.DecodeMessage functions, and perhaps helpers in jsonrpc2/wire.go file.
I am happy to open a PR with the changes, but I am not sure how much of the jsonrpc2 package should be re-exported.