MCP Configuration for AI Coding Agents
The Model Context Protocol (MCP) allows AI coding agents to interact with your deployment.io infrastructure. Once configured, agents like Claude Code, Cursor, and Windsurf can deploy ephemeral preview environments directly from your development workflow.
Prerequisites
- A deployment.io account
Step 1: Generate an API Key
- Go to Organization Settings > Agent Keys in your deployment.io dashboard.
- Click Create New Key and give it a descriptive name (e.g., "Claude Code Key").
- Copy the API key immediately — you won't be able to see it again.
Step 2: Copy the MCP Configuration
After generating your key, you'll see an MCP JSON configuration block like this:
{
"mcpServers": {
"deployment-io": {
"url": "https://api.deployment.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Replace YOUR_API_KEY with the key you copied in Step 1.
Agent Setup
Claude Code
Claude Code CLI
Run the following command to add the MCP server:
claude mcp add deployment-io --transport http https://api.deployment.io/mcp \
-h "Authorization: Bearer YOUR_API_KEY"
Claude Desktop
Add the configuration to your claude_desktop_config.json file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Merge the MCP JSON config from Step 2 into the file.
Cursor
- Open Cursor and go to Settings > MCP.
- Click + Add new global MCP server.
- Paste the MCP JSON configuration from Step 2 into the editor.
- Save and restart Cursor.
Windsurf
- Open Windsurf and go to Settings > MCP.
- Click Add Server and select HTTP.
- Paste the MCP JSON configuration from Step 2.
- Save and restart Windsurf.
Troubleshooting
- Verify your API key works: Run a simple prompt like "list my deployments" in your agent. If the key is invalid, you'll see an authorization error.
- Check the MCP URL: Ensure the URL is exactly
https://api.deployment.io/mcpwith no trailing slash. - Regenerate the key: If your key stops working, it may have been revoked. Create a new one from the Agent Keys settings page.