mcpserver

package
v0.0.0-...-3b979f0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 15 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 assembles the MCP server behind `fizzy mcp`: the hand-written Fizzy tool catalog served through the shared toolkit's gateway, dispatching real API calls through the CLI's authenticated, account-scoped SDK client.

The generic machinery — domain gateway tools, the {"action", "params"} calling convention, read-only filtering, the in-band describe action — lives in the shared toolkit at github.com/basecamp/mcp. The catalog in internal/mcpserver/catalog is deliberately duplicated from its sibling in fizzy-mcp-server (synced by scripts/sync-mcp-catalog.sh, provenance recorded). This package supplies the CLI's half: wiring the catalog to the gateway and the dispatcher that turns catalog operations into fizzy-sdk requests.

Index

Constants

View Source
const Name = "fizzy-cli"

Name identifies the server in the MCP initialize handshake. The version is the CLI's own: `fizzy mcp` is the CLI serving MCP, not a separate product.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Get(ctx context.Context, path string) (*fizzy.Response, error)
	Post(ctx context.Context, path string, body any) (*fizzy.Response, error)
	Put(ctx context.Context, path string, body any) (*fizzy.Response, error)
	Patch(ctx context.Context, path string, body any) (*fizzy.Response, error)
	Delete(ctx context.Context, path string) (*fizzy.Response, error)
}

API is the slice of the fizzy-sdk client the dispatcher drives. Both *fizzy.Client and *fizzy.AccountClient satisfy it; the SDK carries auth, retry, and base URL resolution — the AccountClient adds account-slug scoping — so the dispatcher only assembles paths and bodies.

type Config

type Config struct {
	// ReadOnly drops every write action from the catalog and refuses write
	// dispatch outright. The served default, matching fizzy-mcp-server's
	// posture: writes are an explicit opt-in, paired with a Read+Write
	// token — the token's permission is the server-side enforcement, this
	// filter is the client-side surface.
	ReadOnly bool
	// Domains narrows the served domains by key ("boards", "cards", ...).
	// Empty means all. Unknown keys are a startup error — fail closed.
	Domains []string
	// Version is the CLI version reported in the initialize handshake.
	Version string
}

Config selects the served tool surface.

type Server

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

Server wraps the toolkit gateway serving the catalog, dispatching through the CLI's SDK clients.

func New

func New(account, root API, cfg Config) (*Server, error)

New validates the catalog and hands it to the gateway, which applies the config's domain and read-only filters. Tool calls dispatch through account (account-scoped operations) and root (the few unscoped ones, like get_identity).

func (*Server) BuildMCPServer

func (s *Server) BuildMCPServer(logger *slog.Logger) *mcp.Server

BuildMCPServer constructs the SDK MCP server with one gateway tool per served domain.

func (*Server) Domains

func (s *Server) Domains() []gateway.Domain

Domains returns the served domains.

Directories

Path Synopsis
Package catalog hand-writes the Fizzy MCP tool catalog.
Package catalog hand-writes the Fizzy MCP tool catalog.

Jump to

Keyboard shortcuts

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