Versions in this module Expand all Collapse all v0 v0.2.0 May 15, 2026 Changes in this version + func RegisterDefaultTools(server *MCPServer, executor ToolExecutor) + func SetClientVersion(v string) + type JSONRPCRequest struct + ID interface{} + JSONRPC string + Method string + Params json.RawMessage + type JSONRPCResponse struct + Error *RPCError + ID interface{} + JSONRPC string + Result interface{} + type MCPServer struct + func NewMCPServer(info ServerInfo) *MCPServer + func (s *MCPServer) RegisterTool(handler MCPToolHandler) + func (s *MCPServer) Serve(ctx context.Context, r io.Reader, w io.Writer) error + func (s *MCPServer) ServeStdio(ctx context.Context) error + type MCPToolHandler struct + Description string + Handler func(ctx context.Context, params json.RawMessage) (string, error) + InputSchema map[string]interface{} + Name string + type RPCError struct + Code int + Message string + type ServerInfo struct + Name string + Version string + type ToolExecutor func(ctx context.Context, name string, input json.RawMessage) (string, error) v0.1.0 May 12, 2026 Changes in this version + type HTTPServer struct + Headers map[string]string + Name string + Type string + URL string + func ConnectHTTP(ctx context.Context, name, url string, headers map[string]string) (*HTTPServer, error) + func ConnectSSE(ctx context.Context, name, url string, headers map[string]string) (*HTTPServer, error) + func (s *HTTPServer) Call(ctx context.Context, method string, params interface{}) (json.RawMessage, error) + func (s *HTTPServer) CallTool(ctx context.Context, name string, args map[string]interface{}) (string, error) + func (s *HTTPServer) Close() error + func (s *HTTPServer) ListTools(ctx context.Context) ([]Tool, error) + type Resource struct + Description string + MimeType string + Name string + URI string + type Server struct + Args []string + Command string + Name string + func Connect(ctx context.Context, name, command string, args ...string) (*Server, error) + func (s *Server) CallTool(name string, args map[string]interface{}) (string, error) + func (s *Server) Close() error + func (s *Server) ListResources() ([]Resource, error) + func (s *Server) ListTools() ([]Tool, error) + func (s *Server) ReadResource(uri string) (string, error) + type Tool struct + Description string + InputSchema map[string]interface{} + Name string