mcp

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package mcp connects a harness to MCP servers with the official MCP Go SDK. It is a leaf package, so a harness that does not use MCP does not link the SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.5.0

type Client struct{}

Client is the session.MCPClient that connects with the official MCP Go SDK, over stdio, streamable HTTP or SSE. Set AgentOptions.MCP to Client{}.

func (Client) Connect added in v0.5.0

func (Client) Connect(ctx context.Context, servers []session.MCPServer) ([]session.MCPTool, func())

Connect implements session.MCPClient: it connects to each server and returns the tools of those that answered, sorted by name per server, and a func that closes the connections. A server that fails to connect or list its tools is logged and skipped.

Jump to

Keyboard shortcuts

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