mcp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package mcp provides shared types and functionality for MCP (Machine Cognition Protocol) integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// AddServer adds and initializes a new MCP server
	AddServer(ctx context.Context, cfg ServerConfig) error

	// Close closes all MCP server connections
	Close() error

	// Servers returns all registered MCP servers
	Servers() map[string]*Server

	// GetServer returns a specific MCP server by name
	GetServer(name string) (*Server, bool)
}

Manager defines the interface for managing MCP servers

type Server

type Server struct {
	Client *mcplib.Client
	Tools  []mcplib.ToolRetType
}

Server represents a connected MCP server with its tools

type ServerConfig

type ServerConfig struct {
	Name    string
	Command string
	Args    []string
	Env     []string
}

ServerConfig represents the configuration for an MCP server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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