mcptools

package
v0.0.0-...-0129a13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcptools adapts the official MCP Go SDK to the tool-source contract. Sources: https://modelcontextprotocol.io/specification/2025-11-25/server/tools https://github.com/modelcontextprotocol/go-sdk/blob/v1.8.0/docs/protocol.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configured

func Configured(servers []Server, project string, warn func(error)) api.Plugin

Configured starts each configured server independently when warn is set.

func Name

func Name(server, tool string) string

func Plugin

func Plugin(servers []Server, project string) api.Plugin

Types

type Manager

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

func (*Manager) Add

func (m *Manager) Add(ctx context.Context, id string, specs []Server) error

Add prepares an entire group before publishing it. A failed connection leaves no partial tools or child processes. Client-provided groups are never saved.

func (*Manager) AddConfigured

func (m *Manager) AddConfigured(ctx context.Context, id string, spec Server) error

AddConfigured adds one configured server to a session's existing attachment.

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) Remove

func (m *Manager) Remove(id string)

func (*Manager) Run

func (m *Manager) Run(ctx context.Context, s api.Session, call api.Call, progress func(string)) api.ToolResult

func (*Manager) Tools

func (m *Manager) Tools(s api.Session) []api.Tool

type Server

type Server struct {
	Name    string            `json:"name"`
	Command string            `json:"command,omitempty"`
	Args    []string          `json:"args,omitempty"`
	Env     map[string]string `json:"env,omitempty"`
	URL     string            `json:"url,omitempty"`
	Headers map[string]string `json:"headers,omitempty"`
}

Jump to

Keyboard shortcuts

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