The larapilot MCP server#
Any agent reads Larapilot mid-conversation through its MCP server — over stdio on this machine, and over Streamable HTTP at /larapilot/mcp for agents elsewhere: a teammate’s editor, Studio, a CI runner.
| Tool | What it answers |
|---|---|
BacklogListTool | The backlog, filtered by status, epic, or version |
SpecShowTool | One story with its plan and tasks |
SearchTool | Everything Larapilot keeps, by words or a code; in narrows to one kind |
DiagnosticsTool | The health of the app and a log tail, secrets redacted |
RunArtisanTool | The read and validate commands of Larapilot — and nothing that writes |
All five are annotated read-only. RunArtisanTool checks the parameters too: an option that writes a file — quality --fix, sbom --write, release-notes --write — is refused before the command runs, and the commands that decide or push (security-link, errors-resolve…) are not allowed at all.
php artisan mcp:start larapilot # stdio, for the agents of this machine
claude mcp add --transport http larapilot https://staging.example.com/larapilot/mcp \
--header "Authorization: Bearer ${LARAPILOT_API_TOKEN}"The HTTP server stands behind the door of the API: the API token as a bearer token wherever one exists; open on a developer’s machine while none does — to a request that names the machine (localhost, an address, a .test domain, the host of APP_URL), so to no page of another site and to no domain pointed at 127.0.0.1; closed on a shared host until a token is made; hidden in production. Behind a tunnel or in a cloud workspace, make a token, or list the host in LARAPILOT_API_OPEN_HOSTS. A --file read through MCP is a YAML, JSON, or Markdown file of the project, never an environment or a credentials file. LARAPILOT_MCP_HTTP=false turns it off.
The MCP servers of the project#
Every coding agent keeps its MCP servers in its own file, in its own shape. Larapilot reads them all as one list — and writes a server to all of them at once:
| Agent | File |
|---|---|
| Claude Code | .mcp.json |
| Cursor | .cursor/mcp.json |
| VS Code (Copilot) | .vscode/mcp.json |
| Gemini CLI | .gemini/settings.json |
| Junie | .junie/mcp/mcp.json |
| Kiro | .kiro/settings/mcp.json |
| OpenCode | opencode.json |
php artisan larapilot:mcp-list # every server, the agents that have it, secrets masked
php artisan larapilot:mcp-list --check # and whether each remote one answers, with its tools
php artisan larapilot:mcp-add --preset=linear # linear · github · sentry · notion · figma · context7 · playwright
php artisan larapilot:mcp-add docs --url=https://mcp.example.com/mcp --header='Authorization: Bearer ${DOCS_TOKEN}'
php artisan larapilot:mcp-remove docs- Secrets — these files are committed: write a reference to a variable (
${GITHUB_TOKEN}), never the value. The list masks every value that is not a reference. - Who — the MCP servers page is for admins and developers; only an admin adds, removes, or checks. Every change is a line of the audit trail.
- The skills know —
larapilot:contextlists the servers the agents have, so a skill reads the tracker or the error tracker through them when their tools are loaded.
The CLI#
Skills call the commands for you; run them by hand for scripts, CI, or curiosity. Every command prints one JSON envelope:
{ "schema": "larapilot/v1", "kind": "spec_list", "data": { "items": [ … ], "summary": { … } } }
{ "schema": "larapilot/v1", "kind": "error",
"error": { "code": "E_PRECONDITION", "message": "…", "hint": "…" } }| Error code | Exit | Typical cause |
|---|---|---|
E_INVALID_INPUT | 2 | A bad flag value or payload |
E_CONNECTOR | 3 | A forge, tracker, or scanner out of reach |
E_PRECONDITION | 4 | A step the workflow does not allow yet |
E_NOT_FOUND | 4 | No such story, task, or version |
| Area | Commands (all larapilot:) |
|---|---|
| Setup & health | install · update · self-update · doctor --human · context {skill} · config-show · settings-set · quality |
| Access | dashboard-user · api-token · mcp-list · mcp-add · mcp-remove |
| Discovery | prd-write · prd-show · prd-impact · validate-prd · choices-set |
| Backlog | spec-list · search · spec-add · spec-show · spec-next · spec-answer · spec-sprint · validate-spec |
| Plan & build | spec-plan · validate-plan · spec-start · task-done · verify · spec-review |
| Review | spec-approve · spec-request-changes |
| Traceability | decision-log · decision-check · code-log · code-history · trace-code |
| Releases & roadmap | release-* · roadmap-set · roadmap-show |
| Economics & usage | economics-set · economics-show · usage-log · usage-report · metrics · schedule-* |
| Security & quality | sbom · vendor-audit · checkpoint-scan · security-* · errors-* · stack · upgrade-check |
| Runtime | logs · diagnostics |
| Integrations | github-status · tracker-push · tracker-pull · backstage-export · notify |
The complete list, with every option, is in the README. A few you will use by hand:
php artisan larapilot:doctor --human # is the install healthy?
php artisan larapilot:spec-list --status=REVIEW # the backlog without the bodies
php artisan larapilot:spec-show US-006 --task=TASK-02 # one task, without the story (--story adds it)
php artisan larapilot:prd-show --ids=FR-004,J-001 # the PRD by the piece
php artisan larapilot:search "late cancellation" # everything Larapilot keeps
php artisan larapilot:context implement # what a skill would loadThe JSON API#
| Endpoint | Returns |
|---|---|
GET /larapilot/api/board | Metrics and stories by status |
GET /larapilot/api/specs · /specs/{code} | Stories with task progress, mockups, release, and sprint (?status=, ?version=) |
GET /larapilot/api/versions · /versions/{v} | Versions with progress, forecast, milestone, and risk |
GET /larapilot/api/prd | The PRD and its heading index |
GET /larapilot/api/metrics | A delivery snapshot, with estimates against build time |
GET /larapilot/api/economics | The economics snapshot; what-if parameters are computed, never stored |
GET /larapilot/api/diagnostics | A read-only runtime snapshot for bug triage |
GET /larapilot/api/backstage | Backstage entities and a delivery snapshot |
GET /larapilot/api/openapi.json · /docs | OpenAPI 3 and Swagger UI |
The API reads only: the state of the workflow changes through skills and Artisan, never from the dashboard or the API. An admin makes the token on the API token page or with php artisan larapilot:api-token generate; it is shown once and only its hash is kept. Send it as Authorization: Bearer … or X-Larapilot-Token.
| Where | No token exists | A token exists |
|---|---|---|
local / testing | Open under a name of this machine (or 503 with api_auth=YES); 403 under any other host | Every request needs it |
| Any other environment | 503, with how to make one | Every request needs it |
production | Not served, unless forced | As above |
Rate limited per IP (LARAPILOT_API_RATE_LIMIT, 120 a minute), with ETag and 304 on reads. A signed-in user whose role sees the API reads it from the browser — the Swagger page included — without the token.
Diagnostics#
A read-only snapshot of the app — info, health checks (storage, cache, database, queue, log file), and a log tail with secrets redacted — from the shell (larapilot:diagnostics), the MCP DiagnosticsTool, or GET /larapilot/api/diagnostics. larapilot:logs reads the log files as entries for an agent; /larapilot-bug runs it every time. LARAPILOT_DIAGNOSTICS_ENABLED=false turns both off.