mcp

package
v0.71.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 12 Imported by: 0 modules, 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 mcp serves the API's methods as MCP tools: one tool per unary method, generated from the proto schema into gen/mcptools. It knows nothing of tokens; the caller says which procedures a client may reach.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InProcess

func InProcess(h http.Handler, peer string) connect.HTTPClient

InProcess is a client that serves each call on h in this process. peer becomes the call's remote address, so a handler still tells a tailnet caller from the unix socket.

func New

func New(o Options) *sdk.Server

New is an MCP server offering the tools Allow admits.

Types

type Options

type Options struct {
	// Allow reports whether a procedure is offered as a tool; nil offers none.
	Allow func(procedure string) bool
	// HTTP and BaseURL are where every call goes.
	HTTP    connect.HTTPClient
	BaseURL string
	// Before runs ahead of each call; an error ends the call with it.
	Before  func(ctx context.Context) error
	Version string
}

Options says which tools a server offers and where their calls go.

Jump to

Keyboard shortcuts

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