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:

CapabilityEnvironment variableWhat it permits
Template executionMCP_ENABLE_TEMPLATE_RENDER=truerender_template and render_template_file. Rendering can execute local template code.
Project mutationsMCP_ENABLE_MUTATIONS=trueGenerators, 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:

macOS / Linux / WSL
MCP_ENABLE_MUTATIONS=true bun run mcp
Windows PowerShell
$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:

GroupExamplesPurpose
Templatesvalidate_template, compile_template, analyze_template, list_components, read_template_fileInspect Ree source and syntax without executing it.
Projectget_project_context, list_routes, list_templates, search_code, list_configLearn the authored application structure.
Translationslist_translations, get_translationsRead the file-backed language content.
Databaselist_db_tables, get_table_structure, get_db_config, run_sqlRead schema and query data safely.
Operationsget_queue_status, run_tests, check_domain_compliance, spreadsheet_sheetsCheck runtime state, project health, and inspect a spreadsheet's sheets (read-only).

With template execution enabled, two more tools become available:

  • render_template and render_template_file

With mutation capability enabled, nine more tools become available:

  • run_generator, refresh_crud, and spreadsheet_to_sql
  • reload_translations and add_translations
  • prune_translations, insert_translations, and sync_translations
  • run_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.

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.