MCP Server
Reepolee includes a Model Context Protocol server for AI assistants and development tools. It lets a client inspect the current project, database, routes, templates, translations, generators, and queue without inventing a separate API for every task.
The server is a local stdio process. It speaks JSON-RPC 2.0 through its standard input and output; it does not listen on an HTTP port. Never expose its stdio or bridge it to a network endpoint.
Connect a Client
The project-root mcp.json provides the standard configuration:
{
"mcpServers": {
"reepolee": {
"command": "bun",
"args": ["run", "mcp"],
"cwd": "."
}
}
}
Register the equivalent configuration in the MCP client you use, with cwd set to the root of the Reepolee project. To start it directly for troubleshooting, run:
bun run mcp
The server writes protocol messages to stdout and diagnostics to stderr, so do not wrap it with a command that mixes normal log output into stdout.
Safety Model
The default surface is intentionally inspection-oriented. It includes project and route discovery, template analysis, read-only database inspection, code search, queue status, tests, and domain-type checks.
Two capabilities require explicit local opt-in:
| Capability | Environment variable | What it permits |
|---|---|---|
| Template execution | MCP_ENABLE_TEMPLATE_RENDER=true | render_template and render_template_file. Rendering can execute local template code. |
| Project mutations | MCP_ENABLE_MUTATIONS=true | Generators, CRUD refresh, and translation writes and maintenance. |
Database inspection runs against the active connection (DEV_CONNECTION_STRING). SQLite inspection opens a separate read-only connection; MySQL inspection uses the development connection as-is. run_sql accepts one read-only SELECT statement and applies a result limit.
Keep the opt-ins scoped to the MCP process rather than adding them permanently to a deployed environment:
MCP_ENABLE_MUTATIONS=true bun run mcp
$env:MCP_ENABLE_MUTATIONS = "true"
try { bun run mcp } finally { Remove-Item Env:MCP_ENABLE_MUTATIONS -ErrorAction SilentlyContinue }
Tool Groups
The server registers 34 tools. A full per-tool reference - names, input schemas, and which capability each requires - lives on the MCP Tool Reference page. The 23 tools available without any opt-in are grouped as follows:
| Group | Examples | Purpose |
|---|---|---|
| Templates | validate_template, compile_template, analyze_template, list_components, read_template_file | Inspect Ree source and syntax without executing it. |
| Project | get_project_context, list_routes, list_templates, search_code, list_config | Learn the authored application structure. |
| Translations | list_translations, get_translations | Read the file-backed language content. |
| Database | list_db_tables, get_table_structure, get_db_config, run_sql | Read schema and query data safely. |
| Operations | get_queue_status, run_tests, check_domain_compliance, spreadsheet_sheets | Check runtime state, project health, and inspect a spreadsheet's sheets (read-only). |
With template execution enabled, two more tools become available:
render_templateandrender_template_file
With mutation capability enabled, nine more tools become available:
run_generator,refresh_crud, andspreadsheet_to_sqlreload_translationsandadd_translationsprune_translations,insert_translations, andsync_translationsrun_sql_dev(writes/DDL against the dev DB, opted into per call)
spreadsheet_to_sql is the MCP counterpart of the reeman DATA to SQL flow: it reads an .xls/.xlsx workbook and writes a paired sql/mysql/NN-<slug>.sql + sql/sqlite/NN-<slug>.sql for every non-empty sheet (or one named --sheet), normalizing columns through the canonical domain types. spreadsheet_sheets is the read-only companion that lists a workbook's sheets, row counts, and detected columns before you commit to a conversion. The JSON-array path (json-to-sql) is exposed through reeman rather than the MCP - drive it from the CLI when your data is already JSON.
Schema-reading generator tools automatically take a fresh in-memory schema snapshot before generating. There is no rescan_ddl_cache tool or persisted DDL cache to manage.
The tools remain project-local. A client can make a destructive change only after the local operator enables mutation capability, so use it deliberately and review generator output and emitted SQL as you would when running the corresponding CLI commands.
Recommended Use
Use MCP for project-aware work where raw filesystem access is easy to misuse: inspecting an unfamiliar schema, finding the route responsible for a page, checking generated CRUD metadata, reading translations, or running a constrained diagnostic query. For normal source editing, the project remains a regular Bun application and its code is still the source of truth.