mcp

package
v0.0.0-...-ab6ecea Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages the lifecycle of MCP servers.

func NewManager

func NewManager(configs map[string]config.MCPServerConfig) *Manager

NewManager creates a new MCP Manager and starts the idle reaper.

func (*Manager) BuildSummary

func (m *Manager) BuildSummary() string

BuildSummary generates XML for the system prompt using config only (no process start).

func (*Manager) CallTool

func (m *Manager) CallTool(ctx context.Context, serverName, toolName string, args map[string]interface{}) (string, error)

CallTool executes a tool on an MCP server.

func (*Manager) GetTools

func (m *Manager) GetTools(ctx context.Context, serverName string) ([]*sdkmcp.Tool, error)

GetTools returns the tool list for a server, starting it if needed.

func (*Manager) ListServers

func (m *Manager) ListServers() []ServerSummary

ListServers returns server names and descriptions without starting processes.

func (*Manager) ReadResource

func (m *Manager) ReadResource(ctx context.Context, serverName, uri string) (string, error)

ReadResource reads a resource from an MCP server by URI.

func (*Manager) Stop

func (m *Manager) Stop()

Stop shuts down all running servers and the idle reaper.

type ServerInstance

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

ServerInstance manages a connected MCP server session.

type ServerSummary

type ServerSummary struct {
	Name        string
	Description string
	Status      string
}

ServerSummary is a lightweight view of a server for listing. This is a Manager-specific type (not part of the MCP SDK).

Jump to

Keyboard shortcuts

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