mcp

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package mcp implements an MCP (Model Context Protocol) server. Supports APIMart and OpenRouter providers (auto-detected from base_url).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListTools added in v1.11.0

func ListTools(cfg *Config)

ListTools prints all registered MCP tools and exits.

func NewServer

func NewServer(cfg *Config) *server.MCPServer

NewServer creates and configures an MCP server, registering tools based on config.

func Run

func Run(cfg *Config) error

Run starts the MCP server with stdio transport.

Types

type Config

type Config struct {
	APIKey       string
	BaseURL      string
	Proxy        string
	Output       string
	Defaults     *types.ConfigDefaults
	ToolsEnable  []string
	ToolsDisable []string
	ListTools    bool
}

Config holds the configuration for the MCP server. It's a subset of the full CLI config, focused on what MCP tools need.

Jump to

Keyboard shortcuts

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