Expand description
Bellows, the AI-agent support of the Smeltery framework.
The app command bellows:mcp runs a Model Context Protocol server on
stdin / stdout (JSON-RPC 2.0, one message per line) inside the app binary, so a coding agent can ask the app
itself about its routes, models, database schema, configuration keys, recent errors and documentation, and can
run generators, tests and agent controls. Apps register it with BellowsExt::bellows; a generated app does
so in bootstrap/app.rs, and .mcp.json points the agent at smeltery bellows:mcp.
use smeltery_bellows::BellowsExt as _;
use smeltery_core::AppBuilder;
fn build(app: AppBuilder) -> AppBuilder {
app.bellows()
}| Tool | Answers |
|---|---|
route_list | every route: methods, path, name, middleware |
models | the models in app/models/ with their table’s columns |
db_schema | every table: columns (type, nullable, default, primary key) and indexes |
config_keys | the names of the settings in .env, .env.example and the framework (never values) |
last_errors | the latest ERROR (and, when asked, WARN) lines of the app’s log file (LOG_FILE, else storage/logs/*.log) |
docs_search | sections of the Smeltery guide, CLAUDE.md and .bellows/ matching the words |
run_generator | runs one smeltery make:* command (names, fields and the generators’ options as arguments) |
run_tests | runs cargo test (optionally filtered by a test path) and returns the summary and failures; it compiles and runs the app’s code |
agents_list | the Watchfire agents of the running app |
agent_control | start / stop / pause / resume / restart an agent of the running app |
Structs§
- McpCommand
- The
bellows:mcpcommand. - McpServer
- The MCP server: reads requests, answers them through the tools.
- Options
- Where the tools look and how long their subprocesses and HTTP calls may take.
Constants§
- PROTOCOL_
VERSIONS - The MCP protocol versions Bellows speaks, newest first.
2026-07-28is the stateless revision (server/discover, noinitialize); the others start withinitialize.
Traits§
- Bellows
Ext AppBuilder::bellows: add thebellows:mcpcommand.