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

Agent security & ENV

Tokens, IP rules and every ENV variable.

Cipi Agent & AI

Each feature of the agent has its own token and can be switched off independently. A disabled route answers 404: hidden, not just forbidden.

Tokens and endpoints#

FeatureTokenEndpoint
Webhook deployCIPI_WEBHOOK_TOKENPOST /cipi/webhook
HealthCIPI_HEALTH_TOKEN (falls back to the webhook token)GET /cipi/health
MCPCIPI_MCP_TOKENPOST /cipi/mcp
AnonymizerCIPI_ANONYMIZER_TOKENPOST /cipi/db, /cipi/db/user
Panel toolsCIPI_TOKEN (server API token)outbound, via cipi/sdk

Protections#

AreaProtection
WebhooksHMAC signatures (GitHub, Bitbucket, Gitea) or token header (GitLab, Azure), constant-time comparisons; what the push claims is recorded as a claim, never as a fact
MCPCommand and SQL blocklists, one statement per call, row caps, optional read-only DB, secret redaction, Origin check, no sessions
AnonymizerConfig outside the repository (0640); DB passwords via environment, never on a command line; raw dump deleted right after; outputs 0600; signed, expiring download links

Source: github.com/cipi-sh/agent (MIT).

Environment variables#

Written by cipi app create; toggle features with php artisan cipi:service <type> --enable|--disable.

VariablePurposeDefault
CIPI_WEBHOOK_TOKENWebhook secretgenerated
CIPI_APP_USERThe app's Linux userset by Cipi
CIPI_DEPLOY_BRANCHBranch that deploys (empty = any)the app's branch
CIPI_ENVEnvironment label; picks cipi-<env>.ymlproduction
CIPI_HOME, CIPI_DEPLOY_SCRIPTPaths overrides/home/<user>, ~/.deployer/deploy.php
CIPI_PHP_VERSIONReported PHP; used by cipi:yml generatesystem PHP
CIPI_ROUTE_PREFIXPrefix of all agent routescipi
CIPI_LOG_CHANNELLog channel for deploy eventsnone
CIPI_HEALTH_CHECK, CIPI_HEALTH_TOKENHealth endpointon, none
CIPI_MCP, CIPI_MCP_TOKENMCP endpointoff, none
CIPI_MCP_ALLOWED_ORIGINSExtra browser originsthe app host
CIPI_MCP_DB_WRITEAllow writes in db_querytrue
CIPI_MCP_MAX_ROWSRow cap (max 500)100
CIPI_MCP_REDACTMask secrets in outputtrue
CIPI_ANONYMIZER, CIPI_ANONYMIZER_TOKENAnonymizer endpointoff, none
CIPI_ANONYMIZER_CONFIG, CIPI_ANONYMIZER_TTLConfig path; link validity (minutes)~/.db/anonymization.json, 15
CIPI_MYSQLDUMP, CIPI_PG_DUMPDump binariesfrom PATH
CIPI_PANEL, CIPI_PANEL_APPPanel MCP tools; app name on the panelon, CIPI_APP_USER
CIPI_BASE_URL, CIPI_TOKENServer API URL and token for cipi/sdknone

For production, set CIPI_MCP_DB_WRITE=false unless you really want your assistant to write data.

Questions#

QuestionAnswer
Where do I see a token?In the app's .env (cipi app env myapp --get=CIPI_MCP_TOKEN). Generate a new one with php artisan cipi:generate-token mcp.
A feature answers 404. Is it broken?It's disabled, on purpose: php artisan cipi:service <feature> --enable.
After changing a variable nothing happens.Rebuild the config cache: cipi app artisan myapp config:cache.
Is the agent required?No. It's optional and adds features inside the app. See Install the agent.