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, translation writes and maintenance, and DDL-cache rescan.

For a MySQL project, inspection must use a separate account supplied by MCP_READONLY_CONNECTION_STRING. Give that account SELECT only and no file privileges. SQLite inspection opens a read-only connection. 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

Tool Groups

The server currently registers 31 tools. The 24 default tools are grouped as follows:

GroupExamplesPurpose
Templatesvalidate_template, compile_template, analyze_template, list_componentsInspect Ree source and syntax without executing it.
Projectget_project_context, list_routes, list_templates, search_codeLearn the authored application structure.
Translationslist_translations, get_translationsRead the database-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_complianceCheck runtime state and project health.

With mutation capability enabled, seven more tools become available:

  • run_generator and refresh_crud
  • reload_translations and add_translations
  • prune_translations and sync_missing_translations
  • rescan_ddl_cache

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.