v0.x: MCP publishes progressively, on the estate's own module¶
Spec 0201, consuming go/mcp spec 0001.
What changed¶
The mcp command in every tool built on GTB is now the estate's
go/mcp module, wired through pkg/mcp. The
ophis dependency is gone.
The default tool list a client sees is different. Compact publication is
the default: a client lists search_tools, get_tool_details and call_tool
and finds your commands through them, rather than one native tool per command.
Every command is still callable, with the same flags and args input and the
same stdout, stderr, exitCode output; only how the client discovers it
has changed.
What is retained¶
- Every command spelling:
mcp start,mcp stream(--host,--port,--log-level),mcp tools, andmcp claude|cursor|vscode enable|disable|list. - Exposure rules (spec 0089):
mcp_enabled,setup.ExcludeFromMCPandsetup.IncludeInMCPmean what they did. - The
mcp toolsexport as the full offline catalogue, whatever the mode. - Tool names (
<tool>_<path>) and the annotation keys (readOnlyHintand the rest), so client entries andgtb annotatecarry across unchanged.
If you want the old shape¶
Set the project's publication mode and rebuild:
That publishes one native tool per exposed command, with each tool's own
annotations in the client's approval UI, and is recorded in the manifest as
properties.mcp.mode: direct. Existing manifests say nothing and so publish
compactly.
Smaller differences¶
- Pure command groups are not published. A group whose
RunEissetup.GroupRunEonly prints usage; it is no longer a tool. - GTB's global flags are not tool parameters.
--config,--debug,--ciand--accessiblesteer the process and are withheld from every tool's schema (--configwould let a client point the tool at another configuration file).--outputstays. - A custom
pflag.Valuetype needs a codec. Ophis published unknown types as strings; the binding refuses to start until a codec is registered or the command is excluded, naming the command, flag and type. Every standard pflag kind is covered; keryx's 151 flags needed nothing. mcp start --debugismcp start --log-level debug; the root's own--debugstill moves the same level.- In the export,
titleis the tool's own field, notannotations.title, matching the MCP specification.mcp streamnow refuses browser origins other than its own unless listed with--origin. - Execution is bounded: one command at a time (a second call gets a
retryable
busy), a five-minute timeout, one MiB of retained output, and a cancelled call stops the command and everything it started.