rpc

package
v0.3.17-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 11 Imported by: 0

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

func (*MCPRPCServer) Start

func (s *MCPRPCServer) Start(ctx context.Context) error

Start starts the RPC server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL