Skip to content

Environment Variables

Bridge resolves ${VAR} placeholders from .env and process environment.

  1. Put secrets in ~/.mcp-bridge/.env
  2. Reference secrets in config.json
  3. Keep config portable and secret-free
Terminal window
TODOIST_API_TOKEN=your-token
GITHUB_TOKEN=ghp_xxxxx
NOTION_TOKEN=ntn_xxxxx
{
"env": {
"TODOIST_API_KEY": "${TODOIST_API_TOKEN}",
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
  • mcp-bridge init sets .env file mode to 600
  • Recipes must not contain raw credentials (spec security requirement)
  • OpenClaw plugin adds an extra env resolution pass for unresolved placeholders

See also OpenClaw configuration.