Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MCPError ¶
type MCPError struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
MCPError represents an MCP error
type MCPRequest ¶
type MCPRequest struct {
JSONRPC string `json:"jsonrpc"`
ID interface{} `json:"id"`
Method string `json:"method"`
Params interface{} `json:"params,omitempty"`
}
MCPRequest represents a generic MCP request
type MCPResponse ¶
type MCPResponse struct {
JSONRPC string `json:"jsonrpc"`
ID interface{} `json:"id"`
Result interface{} `json:"result,omitempty"`
Error *MCPError `json:"error,omitempty"`
}
MCPResponse represents a generic MCP response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an MCP server
func (*Server) AddTool ¶
func (s *Server) AddTool(name, description string, inputSchema map[string]interface{}, handler ToolHandler)
AddTool adds a tool to the server
func (*Server) ServeStdio ¶
ServeStdio starts the server using stdio transport
Click to show internal directories.
Click to hide internal directories.