Instead of clicking through the dashboard, you can let an AI coding agent, Claude Code, Cursor, Windsurf, or Codex, set Pushrail up for you. The agent reads and operates your workspace through Pushrail's hosted Model Context Protocol server. You connect it either by signing in from your editor (the default — you approve access in the browser and pick a workspace) or with an account-wide MCP API key for CI. Either way you don't pick an environment when you connect — the agent names the target environment on each action. This page takes you from install to an agent-driven first delivery.
1. Install the CLI
npm install -g @pushrail/cli
Confirm it's on your path and sign in:
pushrail --version
pushrail login # browser sign-in; use --api-key pr_dev_… for CI
Your workspace role (when you sign in through the browser) or the MCP API key's scope (when you use a key) sets the ceiling of what any connected agent can do. The connection is account-wide; the agent names the environment per action. See the CLI quickstart for the full install and login flow, and Authentication for scopes.
2. Connect the MCP server to your agent
The CLI writes the MCP config for a supported client:
pushrail mcp install --client claude # or cursor | windsurf | codex
install merges into your existing client config rather than overwriting it. To print the config without writing a file, run pushrail mcp config. The hosted server lives at https://mcp.pushrail.io. The first time the agent connects with browser sign-in, it opens your browser to approve access and pick a workspace. For the full tool list and safety-mode ladder, see MCP integration; for the browser sign-in walkthrough, see the OAuth connect guide.
The agent can never do more than you can. With browser sign-in, its ceiling is your workspace role — a viewer is read-only, a member can write, an admin or owner can delete. With an MCP API key, the ceiling is the key's scope: a manage key tops out at write operations, while a read key is read-only.
3. Let the agent do the setup
With the server connected, ask your agent to perform the same first-run steps you'd do by hand. Name the environment you want it to work in. For example:
"In Development, add a webhook destination for customer
cust_42pointing at https://webhook.site/…, then send a testorder.completedevent and show me the delivery result."
The agent uses the MCP tools to create the destination (passing environment: "DEVELOPMENT"), send the event, and report the delivery result, then you can verify it under Observability → Deliveries. If you ask it to do the same in Production, it confirms with you first before the write.
Next steps
- MCP integration, every tool the server exposes and how safety modes work
- CLI command reference,
pushrail mcp install,pushrail mcp config, and the rest - Quickstart, the same flow done by hand