mcp

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInProcessClient

func NewInProcessClient(ctx context.Context, srv *server.MCPServer) (*client.Client, error)

NewInProcessClient connects an in-process MCP server directly to a stdio subprocess.

func StartStdioClient

func StartStdioClient(ctx context.Context, command string, env []string, args ...string) (*client.Client, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) CallTool

func (client *Client) CallTool(ctx context.Context, toolCall *runtimetypes.ToolCall) (string, error)

func (*Client) Close

func (client *Client) Close()

func (*Client) ListTools

func (client *Client) ListTools(ctx context.Context) ([]runtimetypes.ToolDefinition, error)

type Mux

type Mux struct {
	// contains filtered or unexported fields
}

func NewMux

func NewMux(ctx context.Context, clients ...*client.Client) (*Mux, error)

NewMux starts initialized clients list (already started/initialized) and builds an index.

func (*Mux) CallTool

func (m *Mux) CallTool(ctx context.Context, call *runtimetypes.ToolCall) (string, error)

CallTool routes a call by tool name to the owning MCP client and returns a text payload for your LLM transcript.

func (*Mux) ListTools

func (m *Mux) ListTools(_ context.Context) ([]runtimetypes.ToolDefinition, error)

ListTools surfaces merged tools in ToolDefinition form.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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