Documentation
¶
Overview ¶
Package rpc provides an RPC server for code execution to call MCP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MCPRPCRequest ¶
type MCPRPCRequest struct {
Server string `json:"server"`
Tool string `json:"tool"`
Arguments map[string]any `json:"arguments"`
}
MCPRPCRequest represents a request to call an MCP tool
type MCPRPCResponse ¶
type MCPRPCResponse struct {
Content []map[string]any `json:"content"`
StructuredContent any `json:"structuredContent,omitempty"`
IsError bool `json:"isError"`
}
MCPRPCResponse represents the response from an MCP tool call
type MCPRPCServer ¶
type MCPRPCServer struct {
// contains filtered or unexported fields
}
MCPRPCServer provides an RPC endpoint for code execution to call MCP tools
func NewMCPRPCServer ¶
func NewMCPRPCServer(mcpManager *tools.MCPManager, socketPath string) (*MCPRPCServer, error)
NewMCPRPCServer creates a new MCP RPC server
func (*MCPRPCServer) Shutdown ¶
func (s *MCPRPCServer) Shutdown(ctx context.Context) error
Shutdown gracefully shuts down the RPC server
func (*MCPRPCServer) SocketPath ¶
func (s *MCPRPCServer) SocketPath() string
SocketPath returns the path to the Unix socket
Click to show internal directories.
Click to hide internal directories.