Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Cipi Agent & AI
  3. MCP server

MCP server

Deploy, roll back and read logs from Claude, Cursor or VS Code.

Cipi Agent & AI

Talk to production from Claude, Cursor or VS Code: "is the app healthy, what failed last night, deploy main". The agent's MCP server exposes one app to your assistant over HTTPS, with a token, guardrails and secret redaction. No SSH access needed.

bash
php artisan cipi:service mcp --enable
php artisan cipi:generate-token mcp
php artisan cipi:mcp             # endpoint + ready-to-paste client config

Step-by-step with real prompts: Manage Laravel in production with Claude and the Cipi MCP.

Two MCP servers#

Agent MCPServer MCP
Endpointhttps://myapp.com/cipi/mcphttps://api.example.com/mcp
ScopeOne app: logs, DB, Artisan, deploy, cipi.ymlThe whole server: create apps, SSL, databases, backups
Installed withcomposer require cipi/agentcipi api api.example.com
Use forDebugging and deploying an appOperating the server

Tools#

ToolModeDoes
healthreadApp, database, cache, queue, storage, deploy state
app_inforeadVersions, drivers, features, environment, live commit; never secrets
deploy_statusreadLive release, rollback candidates, running/queued, last outcome, log tail
logsreadlaravel, nginx, php, worker, horizon, reverb, deploy; level and keyword filters
db_schemareadTables, columns, indexes, foreign keys; flags likely personal data
env_checkreadWhich keys are set or missing vs .env.example and cipi.yml; names only
cipi_ymlreadValidate a draft, show, generate or example
db_queryconfigurableReads capped at 100 rows; writes unless CIPI_MCP_DB_WRITE=false
artisanmay change dataRuns commands non-interactively; dangerous ones blocked
deployactionQueues a zero-downtime deploy; records who asked in the audit ledger
anonymizeractionAudit, scan, or start an anonymized dump
panel_*via cipi/sdkRollback, audit ledger, DB backup, job status, server status

Resources: cipi://cipi.yml, its schema and example, cipi://anonymization.json and its schema.

Guardrails#

GuardBlocks
Artisan blocklisttinker, serve, queue:work, horizon, octane:start, reverb:start, db:wipe, migrate:fresh, migrate:reset… (extendable)
SQL guardDDL (DROP, ALTER, TRUNCATE, CREATE), GRANT, file I/O, SET GLOBAL, KILL, multi-statements
RedactionEnv assignments, bearer tokens, DSNs, APP_KEY, provider keys masked in output
Origin checkBrowser requests from other hosts refused (DNS-rebinding guard)
AnnotationsEvery tool declares read-only/destructive hints so clients can ask before acting

The MCP token can deploy, read logs and query the database. Keep it secret; rotate with php artisan cipi:generate-token mcp (restart Octane and workers after).

Connect your client#

json
// Cursor: ~/.cursor/mcp.json
{ "mcpServers": { "cipi-myapp": {
    "type": "http", "url": "https://myapp.com/cipi/mcp",
    "headers": { "Authorization": "Bearer YOUR_CIPI_MCP_TOKEN" } } } }
json
// VS Code: .vscode/mcp.json (token asked once, never committed)
{ "inputs": [{ "type": "promptString", "id": "cipi-token", "description": "Cipi MCP token", "password": true }],
  "servers": { "cipi-myapp": { "type": "http", "url": "https://myapp.com/cipi/mcp",
    "headers": { "Authorization": "Bearer ${input:cipi-token}" } } } }
bash
# Claude Code
claude mcp add --transport http cipi-myapp https://myapp.com/cipi/mcp \
    --header "Authorization: Bearer YOUR_CIPI_MCP_TOKEN"
json
// Claude Desktop (stdio bridge): claude_desktop_config.json
{ "mcpServers": { "cipi-myapp": { "command": "npx",
    "args": ["-y", "mcp-remote", "https://myapp.com/cipi/mcp", "--header", "Authorization: Bearer YOUR_CIPI_MCP_TOKEN"] } } }

What a session looks like#

text
You:    Is production healthy, and what commit is live?
Claude: [health, deploy_status] Healthy. Release 20261109103000, commit 0123456 (webhook, 42 s).
You:    Show the last errors and tell me which job fails.
Claude: [logs level=error] InvoiceJob: column invoices.paid_at not found.
        [artisan migrate:status] 2026_11_08_add_paid_at is pending.
You:    Deploy main and note that Jane asked.
Claude: [deploy actor=jane@example.com] Queued; it runs within a minute.

Panel tools#

With cipi/sdk and a server API token, the same MCP server gains server-side actions no in-app process could do:

bash
composer require cipi/sdk
# on the server: cipi api token create   (abilities: apps-view, deploy-manage, dbs-manage, status-view)
ini
CIPI_BASE_URL=https://api.myserver.com
CIPI_TOKEN=your-sanctum-token
ToolDoesAbility
panel_statusThe app as the panel sees it, plus server snapshotapps-view, status-view
panel_deploy_auditThe hash-chained deploy ledgerdeploy-manage
panel_rollbackRoll back the code (migrations stay)deploy-manage
panel_db_backupServer-side database snapshot, e.g. before a risky fixdbs-manage
panel_jobStatus and output of an async jobany

Scope that token to exactly these abilities: it is the one credential that reaches beyond the app.