burgee
API reference

burgee/mcp

Every export of burgee/mcp, with its signature and doc comment: annotationsOf, MCP_PROTOCOL_VERSION, serveMcp, toolsOf, plus 4 types.

burgee/mcp — the MCP server, by itself. See index.ts for why it is not in the barrel.

import { annotationsOf, MCP_PROTOCOL_VERSION, serveMcp, … } from 'burgee/mcp';

Functions

annotationsOf

MCP's hints, from the declared effects. destructiveHint is only ever false by declaration.

function annotationsOf(effects?: Effects): ToolAnnotations;
ParameterType
effects (optional)Effects

Returns ToolAnnotations

serveMcp

Serve until the input closes.

function serveMcp(manifest: Manifest, opts: ServeOptions): Promise<void>;
ParameterType
manifestManifest
optsServeOptions

Returns Promise<void>

toolsOf

The tool list: every runnable, visible command an author has not withheld.

function toolsOf(manifest: Manifest): Tool[];
ParameterType
manifestManifest

Returns Tool[]

Constants

MCP_PROTOCOL_VERSION

The latest revision this server speaks, and the answer to a client asking for one it does not.

const MCP_PROTOCOL_VERSION = "2025-11-25";

Interfaces

ServeOptions

interface ServeOptions {
    input: NodeJS.ReadableStream;
    output: {
        write: (s: string) => unknown;
    };
    invoke: Invoke;
}

Tool

interface Tool {
    name: string;
    description: string;
    inputSchema: JsonSchema;
    annotations: ToolAnnotations;
    /** The command's declared `output.schema`, as the shape of `structuredContent` (mcp-current R2). Absent when none is declared. */
    outputSchema?: OutputSchema;
}

ToolAnnotations

interface ToolAnnotations {
    readOnlyHint?: boolean;
    idempotentHint?: boolean;
    destructiveHint?: boolean;
    /**
     * `'undeclared'`, and only ever that (G1). It appears on a command whose author said
     * nothing — every commander and yargs command that did not call `.effects()` — and never
     * beside a hint, because a hint is what a declaration produces.
     */
    effects?: 'undeclared';
}

Types

Invoke

What a tool call runs: the same execute a --json caller reaches, with the streams captured.

type Invoke = (argv: string[]) => Promise<{
    stdout: string;
    stderr: string;
    code: number;
}>;

On this page