Documentation
¶
Overview ¶
Package mcpserver contains minimal MCP server implementations for testing. Each transport (HTTP, SSE, stdio) implements the MCP JSON-RPC protocol just enough to: respond to initialize, list one tool, and call that tool. They exist so integration/e2e tests can verify the full pipeline without depending on external MCP servers or the full mark3labs/mcp-go SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleMCPRequest ¶
func HandleMCPRequest(body []byte) jsonRPCResponse
HandleMCPRequest processes a single MCP JSON-RPC request and returns the response. This is the shared handler for all three transport test servers.
Types ¶
type HTTPTestServer ¶
type HTTPTestServer struct {
URL string
// contains filtered or unexported fields
}
HTTPTestServer is a minimal HTTP MCP server. It accepts POST requests with JSON-RPC bodies and responds with the shared handler.
func NewHTTPTestServer ¶
func NewHTTPTestServer() *HTTPTestServer
NewHTTPTestServer starts an HTTP MCP server on a random port.
type SSETestServer ¶
type SSETestServer struct {
URL string
// contains filtered or unexported fields
}
SSETestServer is a minimal SSE MCP server. It implements the streamable HTTP transport: the client POSTs JSON-RPC requests, the server responds with text/event-stream frames.
func NewSSETestServer ¶
func NewSSETestServer() *SSETestServer
NewSSETestServer starts an SSE MCP server on a random port.