mcpserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 19 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 mcpserver registers the gateway's tools in the go-sdk server.

Input: tools/call requests that passed the edge (the caller's identity is in RequestExtra.TokenInfo). Output: a structured result, or a *jsonrpc.Error in the single error format. One wrapper serves every tool: the bucket of the tool (if it has one), the input schema, the taint check for tools with an effect, the service, the output schema, and one audit_log row.

The tools have the same names in every configuration of the benchmark (option WithMode). The register* functions below say which service and which schemas a mode puts behind a name; the wrapper is the same for all of them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(st *store.Store, reader quarantine.QuarantinedReader, dec tools.Decider, log *slog.Logger, opts ...Option) *mcp.Server

New builds the MCP server with the tools of the mode registered. reader is the quarantined reader behind edi.extract_note; nil switches that tool off. dec is the policy that decides the tools with an effect.

Types

type Option

type Option func(*server)

Option changes how New builds the server.

func WithMode

func WithMode(m mode.Mode) Option

WithMode makes the server play a configuration of the benchmark (default mode.Full).

func WithPlain

func WithPlain(env tools.PlainEnv) Option

WithPlain gives the open tools of the modes plain and reqhash the clients of the other systems. The mode reqhash also switches on the stored answers.

func WithUpstream

func WithUpstream(g *upstream.Gateway) Option

WithUpstream gives the server the upstream MCP servers whose pinned tools it passes on as up.<server>.<tool>.

Jump to

Keyboard shortcuts

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