mcpserver

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package mcpserver publishes operations as MCP tools.

It is the only part that knows the protocol — and it knows no dialect at all. It takes core.Operation and registers it; if a gRPC or SOAP dialect shows up tomorrow, nothing here changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, ops []core.Operation, cfg Config) error

Serve registers the operations and answers until the context ends.

Types

type Config

type Config struct {
	Name    string
	Version string
	Mode    Mode
	Addr    string
	Path    string // http mode only
}

Config holds the transport decisions.

type Mode

type Mode string

Mode is how the server talks to the client.

const (
	ModeStdio Mode = "stdio" // the default: the MCP client starts the process and talks over pipes
	ModeSSE   Mode = "sse"
	ModeHTTP  Mode = "http"
)

Jump to

Keyboard shortcuts

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