Skip to content

MCP tools

Agents reach Gerald through a local MCP server, gerald mcp, which gerald install registers for you. It speaks MCP over stdio and talks to the model on loopback, starting it when a tool is first called. You do not run it yourself.

Transport stdio, one JSON-RPC message per line
Protocol versions 2025-06-18, 2025-03-26, 2024-11-05
Server name gerald
Methods initialize, ping, tools/list, tools/call

The server offers tools when Gerald is on and a model is either serving on its port or installed and able to start. Otherwise tools/list is empty, so the agent carries no Gerald instructions it cannot use.

Every tool is marked as writing (readOnlyHint: false, destructiveHint: true), because each one writes files or runs your project’s tests. Agents that gate tools on those hints will ask before the first call.

The tool gerald install sets up.

fill(path, methods?, line?, keep_failing?)
Argument
path A .rb or .rake file with # TODO: implement <name> markers
methods Methods to add with no marker: name, Owner#name or name: hint
line Where to add methods; default, as public methods of the class
keep_failing Keep methods whose tests fail, and report them

The reply is one line: all tests pass. Nothing to review., or the methods left as TODO for the agent to write.

Off by default. To offer them, change the server command in the agent’s configuration, for example gerald mcp --tools fill,implement,scaffold.

Tool Does
implement(path, line, instruction | steps, replace_end_line?, dry_run?) Writes one method per step at a line and returns a diff to review
scaffold(path, name, kind?, superclass?, body?, methods?, private_methods?, frozen_string_literal?, dry_run?) Creates a class or module file; Gerald writes each method body
test(path, method) Runs your check for one method. Offered only with --check

gerald mcp takes the same options as gerald fill, except --hook. The ones that shape an agent session:

Option
--tools <LIST> Offer only these tools
--on-request Tell the agent to use Gerald only when asked
--only <GLOB> Limit edits to matching paths
--port <PORT> Port of the model
--check <COMMAND> Your own test command; also enables the test tool