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, 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:
| Group | Examples | Purpose |
|---|---|---|
| Templates | validate_template, compile_template, analyze_template, list_components | Inspect Ree source and syntax without executing it. |
| Project | get_project_context, list_routes, list_templates, search_code | Learn the authored application structure. |
| Translations | list_translations, get_translations | Read the database-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 | Check runtime state and project health. |
With mutation capability enabled, seven more tools become available:
run_generatorandrefresh_crudreload_translationsandadd_translationsprune_translationsandsync_missing_translationsrescan_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.
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.