mcpserver

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package mcpserver provides the local stdio transport shared by PitCrew MCP tool groups. Domain packages own their schemas and tool behavior.

Index

Constants

View Source
const ProtocolVersion = "2025-11-25"

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, in io.Reader, out io.Writer, config Config, handlers ...Handler) error

Serve runs a local stdio MCP endpoint. Tool errors remain call-level errors so clients can distinguish an unavailable tool result from a protocol error.

Types

type Config

type Config struct {
	Name         string
	Version      string
	Instructions string
}

type Handler

type Handler interface {
	Tools() []Tool
	CallTool(context.Context, string, map[string]any) (any, error)
}

type Tool

type Tool struct {
	Name        string         `json:"name"`
	Title       string         `json:"title"`
	Description string         `json:"description"`
	InputSchema map[string]any `json:"inputSchema"`
	Annotations map[string]any `json:"annotations,omitempty"`
}

Jump to

Keyboard shortcuts

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