Documentation
¶
Index ¶
- func DefaultRemoteCreator(ctx context.Context, url string, headers map[string]string) (client.MCPClient, error)
- func DefaultStdioCreator(command string, env []string, args ...string) (client.MCPClient, error)
- func ResolveConfigPath() (string, error)
- type Config
- type Manager
- type RemoteCreator
- type ServerConfig
- type StdioCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRemoteCreator ¶
func DefaultRemoteCreator(ctx context.Context, url string, headers map[string]string) (client.MCPClient, error)
DefaultRemoteCreator is the standard creator for remote (SSE or Streamable HTTP) clients.
func DefaultStdioCreator ¶
DefaultStdioCreator is the standard creator for Stdio clients.
func ResolveConfigPath ¶
ResolveConfigPath returns the default path to the mcp.json file.
Types ¶
type Config ¶
type Config struct {
McpServers map[string]ServerConfig `json:"mcpServers"`
}
Config represents the mcp.json format.
func LoadConfigPath ¶
LoadConfigPath loads the config from the given file path.
func ParseConfig ¶
ParseConfig parses the mcp.json contents.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages MCP server clients and lifecycles.
func NewManager ¶
func NewManager(cfg *Config, stdioCreator StdioCreator, remoteCreator RemoteCreator) *Manager
NewManager creates a new Manager.
type RemoteCreator ¶
type RemoteCreator func(ctx context.Context, url string, headers map[string]string) (client.MCPClient, error)
RemoteCreator defines a function type for creating remote (SSE or HTTP) MCPClient.
Click to show internal directories.
Click to hide internal directories.