Skip to content

5 · Cursor & other IDEs

The constitution is tool-agnostic by design. This step makes the other agents — Cursor, Gemini, Codex — boot from the same AGENTS.md, and registers the project’s MCP servers so any tool can use them.

1. .mcp.json (committed) — project MCP servers

Section titled “1. .mcp.json (committed) — project MCP servers”

Project-scoped MCP servers live in a committed .mcp.json at the repo root so every teammate and every tool gets them. The key one for Laravel is Laravel Boost — it adds search-docs (version-specific docs), tinker, database-query, browser-logs, and more.

Install Boost in Phase 3 (it’s a Composer package needing the extracted app), then register it:

Terminal window
composer require laravel/boost --dev
php artisan boost:install
{
"mcpServers": {
"laravel-boost": {
"command": "php",
"args": ["artisan", "boost:mcp"]
}
}
}

Cursor reads .cursor/rules/*.mdc. Add a single always-apply boot rule that points Cursor at the constitution so it inherits everything without duplicating it:

---
description: Boot — read the constitution first
alwaysApply: true
---
# Boot
Read `AGENTS.md` at the repo root FIRST — it is the cross-tool constitution
(tech stack, conventions, safety rules, read-set). Then honor `.claude/rules/`
(behavioral + reference rules) and `CLAUDE.local.md` if present.
Key safety rules: never edit `vendor/`; wrap vendor edits in `ZAJ:BEGIN/END`;
never run destructive migrations on shared data; always double-quote `.env` values.

Save it as .cursor/rules/000-boot.mdc. Also add a security-focused .cursorignore so Cursor never indexes secrets:

.env
.env.*
!.env.example
*.key
*.pem
auth.json
**/secrets/**
vendor/
node_modules/
storage/framework/
bootstrap/cache/

These tools also converge on AGENTS.md. Keep mirrors thin — a pointer, never a copy:

  • Gemini CLIGEMINI.md at the repo root:
    GEMINI.md
    Read **AGENTS.md** first — it is the single source of truth for this project.
  • Codex — a .codex/ config or AGENTS.md (Codex reads AGENTS.md natively). If you keep a .codex/ note, point it back to AGENTS.md the same way.

The rule across all of them: one canonical file (AGENTS.md), every other tool file is a one-line redirect. That’s what keeps the constitution from drifting across five tools.

  • .mcp.json is valid JSON and committed; in Phase 3 search-docs returns version-specific Laravel docs.
  • Open the project in Cursor → it acknowledges the constitution / safety rules without prompting.
  • Any mirror (GEMINI.md, .codex/) is a pointer, not a fork.

.mcp.json committed (Boost registered in Phase 3), .cursor/rules/000-boot.mdc + .cursorignore in place, optional Gemini/Codex mirrors are thin pointers. → Continue to Verify & gate.