Documentation
¶
Overview ¶
Package mcp is the Burrow MCP server: the thin, agent-neutral control surface (ADR-0003) that exposes Burrow's operations as MCP tools to any MCP client and translates tool calls into control-plane API calls. It holds NO cluster credentials (ADR-0005) and contains no orchestration logic — it is the remote control, not the engine. NewServer builds the tool surface over a control-plane API Client; Serve runs it over stdio. The binary is cmd/burrow-mcp.
This package is Apache-2.0 licensed (the client surface; see LICENSING.md and ADR-0033). It deliberately does not import the controlplane/ packages — it talks to the control plane only over the HTTP API, with its own request/response types, so the module boundary stays clean.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(clientFor ClientForContext, kubeconfig, version string) *sdk.Server
NewServer builds the Burrow MCP server: an agent-neutral surface (ADR-0003) exposing the control plane's operations as MCP tools. Each tool translates a call into a control-plane API call via the client and returns the structured result; a control plane error becomes a tool error the agent can read. The server holds no cluster credentials (ADR-0005). It targets one environment per call (ADR-0036): a per-app tool's env argument names a local environment handle, resolved through localconfig to the cluster (kube context) it targets and the burrowd-registered environment NAME it sends; the resolved client comes from clientFor, and every mutating tool echoes the environment it acted in. burrow_environments lists the local handles the agent can name (kubeconfig is the path used to mark the current one).
func Serve ¶
func Serve(ctx context.Context, clientFor ClientForContext, kubeconfig, version string) error
Serve runs the Burrow MCP server over stdio until the client disconnects. It targets one environment per call through clientFor, resolving a per-app tool's env handle through the local config (ADR-0036). kubeconfig is the path used to mark the current handle in burrow_environments.
Types ¶
type ClientForContext ¶ added in v0.7.0
ClientForContext resolves a control-plane client for a kubeconfig context (the cluster whose burrowd a call targets; ADR-0035, ADR-0036). An empty context string means the current kubeconfig context. Each context's cluster runs its own burrowd with its own credentials and its own guardrail policy. The MCP server holds one factory instead of one client (ADR-0035, ADR-0005); burrow-mcp builds it to cache a client per context. The server resolves the agent's env argument (a local handle name) to a kube context through localconfig before calling this (ADR-0036 slice 5b).