MCP, CLI & API

Three ways in, all of them safe by default: an MCP server for agents, Artisan commands for skills and scripts, and a read-only API for everything else.

MCP both waysYour coding agents reach Larapilot's own MCP server, over stdio on this machine or over HTTP from elsewhere, with tools for the backlog, a spec, the search, diagnostics, and the read-only commands. Larapilot also keeps the MCP servers of every agent — Linear, GitHub, Sentry, Notion, Figma, Context7, Playwright — as one list, written to each agent's own file.your agentsClaude CodeCursorVS CodeGemini CLIJunieKiroOpenCodeLarapilotbacklog · spec · searchdiagnostics · read commandsstdioHTTP + tokentheir MCP serversLinearGitHubSentryNotionFigmaContext7Playwrightone list,every agent's filemcp:start larapilot · POST /larapilot/mcp · larapilot:mcp-add

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.

ToolWhat it answers
BacklogListToolThe backlog, filtered by status, epic, or version
SpecShowToolOne story with its plan and tasks
SearchToolEverything Larapilot keeps, by words or a code; in narrows to one kind
DiagnosticsToolThe health of the app and a log tail, secrets redacted
RunArtisanToolThe 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.

Terminal
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:

AgentFile
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
OpenCodeopencode.json
Terminal
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:context lists 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:

stdout
{ "schema": "larapilot/v1", "kind": "spec_list", "data": { "items": [ … ], "summary": { … } } }

{ "schema": "larapilot/v1", "kind": "error",
  "error": { "code": "E_PRECONDITION", "message": "…", "hint": "…" } }
Error codeExitTypical cause
E_INVALID_INPUT2A bad flag value or payload
E_CONNECTOR3A forge, tracker, or scanner out of reach
E_PRECONDITION4A step the workflow does not allow yet
E_NOT_FOUND4No such story, task, or version
AreaCommands (all larapilot:)
Setup & healthinstall · update · self-update · doctor --human · context {skill} · config-show · settings-set · quality
Accessdashboard-user · api-token · mcp-list · mcp-add · mcp-remove
Discoveryprd-write · prd-show · prd-impact · validate-prd · choices-set
Backlogspec-list · search · spec-add · spec-show · spec-next · spec-answer · spec-sprint · validate-spec
Plan & buildspec-plan · validate-plan · spec-start · task-done · verify · spec-review
Reviewspec-approve · spec-request-changes
Traceabilitydecision-log · decision-check · code-log · code-history · trace-code
Releases & roadmaprelease-* · roadmap-set · roadmap-show
Economics & usageeconomics-set · economics-show · usage-log · usage-report · metrics · schedule-*
Security & qualitysbom · vendor-audit · checkpoint-scan · security-* · errors-* · stack · upgrade-check
Runtimelogs · diagnostics
Integrationsgithub-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:

Terminal
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 load

The JSON API#

EndpointReturns
GET /larapilot/api/boardMetrics 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/prdThe PRD and its heading index
GET /larapilot/api/metricsA delivery snapshot, with estimates against build time
GET /larapilot/api/economicsThe economics snapshot; what-if parameters are computed, never stored
GET /larapilot/api/diagnosticsA read-only runtime snapshot for bug triage
GET /larapilot/api/backstageBackstage entities and a delivery snapshot
GET /larapilot/api/openapi.json · /docsOpenAPI 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.

WhereNo token existsA token exists
local / testingOpen under a name of this machine (or 503 with api_auth=YES); 403 under any other hostEvery request needs it
Any other environment503, with how to make oneEvery request needs it
productionNot served, unless forcedAs 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.