Bellows
Bellows: AI-agent support
Bellows makes an app ready for coding agents. Each part is chosen with smeltery new … --bellows (or the question)
and can be added to an existing app with smeltery bellows:install:
| Part | Files | What it gives an agent |
|---|---|---|
| MCP server | .mcp.json |
the app's own MCP server, smeltery bellows:mcp |
| Skills | .bellows/skills/*.md |
step-by-step guides: crud-resource (web apps), spark (Mold apps), alloy-page (React and Vue apps), auth-route (web apps with authentication), migration, mail, agent (apps with agents) |
| Guidelines | .bellows/guidelines.md |
the app's conventions |
Every new app also has CLAUDE.md and AGENTS.md (the same text): the layout, the conventions, the commands and
generators, and which Bellows parts are installed. In React and Vue apps they and the skills describe the kit
(Alloy pages, useForm, partial reloads, deferred props); bellows:install reads the kit from the app's Cargo.toml.
bellows:mcp is an app command: bootstrap/app.rs calls .bellows(), and smeltery bellows:mcp runs the app
binary with it. It speaks JSON-RPC 2.0 over stdin / stdout, one message per line (MCP's stdio transport), answers
initialize (protocol versions 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05), server/discover
(2026-07-28), ping, tools/list and tools/call, and writes nothing else to stdout (logs go to stderr).
Requests run one at a time, in order; while one runs, ping is answered and notifications/cancelled stops it (a
running cargo test or generator is killed). A line longer than 1 MiB gets a parse error and is skipped. Tool results
hold the app's data, log lines, test and compiler output and documentation files; the server's instructions tell the
agent to treat them as data, not as instructions.
| Tool | Answers |
|---|---|
route_list |
every route: methods, path, name, middleware |
models |
the models in app/models/ with their table's columns, and tables without a model |
db_schema |
tables with columns (type, nullable, default, primary key) and indexes; table for one table (SQLite, PostgreSQL, MySQL) |
config_keys |
the names of the keys in .env, .env.example and the framework's settings; values are never returned |
last_errors |
the latest ERROR lines of the app's log file, LOG_FILE and its .1 backup, else storage/logs/*.log (limit, default 20; warnings: true adds WARN lines); at most 20 files, lines cut at 2,000 characters, 12,000 characters in all |
docs_search |
the sections of this guide (embedded), the app's CLAUDE.md and .bellows/ files that match the words |
run_generator |
one smeltery make:* command (only the generators; SMELTERY_BIN picks the binary), stopped after 60 s; the arguments are names, fields (title:string, body:text?) and the generators' options, nothing else |
run_tests |
cargo test [filter], stopped after BELLOWS_TEST_TIMEOUT seconds (600); the result lines and failures. The filter is a test path (letters, digits, _, :, at most 200 characters). The tool compiles and runs the app's code, its build scripts and its tests |
agents_list, agent_control |
the running app's Watchfire agents, and start / stop / pause / resume / restart, through its API with the token derived from APP_KEY (like agents:*) |
smeltery bellows:install [--mcp] [--skills] [--guidelines] [--all] writes the missing files and keeps existing
ones; when .mcp.json exists with other servers, it adds the smeltery entry to its mcpServers object.