Documentation
¶
Overview ¶
Package streamable provides a streamable HTTP proxy for MCP servers.
Index ¶
- Constants
- type HTTPProxy
- func (p *HTTPProxy) ForwardResponseToClients(_ context.Context, msg jsonrpc2.Message) error
- func (p *HTTPProxy) GetMessageChannel() chan jsonrpc2.Message
- func (p *HTTPProxy) GetResponseChannel() <-chan jsonrpc2.Message
- func (p *HTTPProxy) SendMessageToDestination(msg jsonrpc2.Message) error
- func (p *HTTPProxy) SendResponseMessage(msg jsonrpc2.Message) error
- func (p *HTTPProxy) Start(_ context.Context) error
- func (p *HTTPProxy) Stop(ctx context.Context) error
Constants ¶
View Source
const (
// StreamableHTTPEndpoint is the endpoint for streamable HTTP.
StreamableHTTPEndpoint = "/mcp"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPProxy ¶
type HTTPProxy struct {
// contains filtered or unexported fields
}
HTTPProxy implements a proxy for streamable HTTP transport.
func NewHTTPProxy ¶
func NewHTTPProxy( host string, port int, prometheusHandler http.Handler, middlewares ...types.NamedMiddleware, ) *HTTPProxy
NewHTTPProxy creates a new HTTPProxy for streamable HTTP transport.
func (*HTTPProxy) ForwardResponseToClients ¶
ForwardResponseToClients forwards a response from the container to the client.
func (*HTTPProxy) GetMessageChannel ¶
GetMessageChannel returns the message channel for sending JSON-RPC to the container.
func (*HTTPProxy) GetResponseChannel ¶
GetResponseChannel returns the response channel for receiving JSON-RPC from the container.
func (*HTTPProxy) SendMessageToDestination ¶
SendMessageToDestination sends a message to the container.
func (*HTTPProxy) SendResponseMessage ¶
SendResponseMessage is for compatibility with the Proxy interface.
Click to show internal directories.
Click to hide internal directories.