Claude Code
Add Gazebo to Claude Code as an MCP server so it can retrieve credentials from your vault during coding sessions.
Prerequisites
- A Gazebo account with at least one service connected
- An agent created in Gazebo with a bearer token
Configuration
In Claude Code's MCP server configuration, add Gazebo with endpoint https://app.gazebohq.com/api/mcp and the header Authorization: Bearer <your-agent-token>. Create the agent bearer token at Gazebo Agents.
For a project .mcp.json, the current documented HTTP configuration is:
{
"mcpServers": {
"gazebo": {
"type": "http",
"url": "https://app.gazebohq.com/api/mcp",
"headers": {
"Authorization": "Bearer ${GAZEBO_AGENT_TOKEN}"
}
}
}
}
Set GAZEBO_AGENT_TOKEN in the environment inherited by Claude Code. Do not put the real token in a committed file. Note that Claude Code uses ${NAME} interpolation, unlike Cursor's ${env:NAME}. See Claude Code's current MCP documentation. Configuration was checked against that documentation; it is not a completed runtime test of your installed release.
Claude Code and Claude Desktop have separate setup surfaces. This page is for Claude Code; use Claude Code's current documentation for its configuration location and syntax rather than Claude Desktop configuration instructions.
Verify the connection
Ask Claude to call get_identity:
get_identity()
→ {
status: "ok",
name: "claude-dev",
accessible_services: [
{ service: "github", allowed_methods: ["GET"] },
{ service: "stripe", allowed_methods: ["GET", "POST"] }
]
}
Retrieve a credential
get_credential({ service: "github", method: "GET" })
→ "ghp_..."
Claude Code receives the actual provider credential. The declared method controls retrieval; the provider key's permissions control subsequent GitHub API calls. Do not persist the returned value. Revoking Gazebo access blocks new retrieval, not use of a key already received.
Usage guidance for Claude
Claude works well with Gazebo when given context about what it's allowed to do. You can prompt it directly:
"Use the Gazebo MCP server to get my GitHub token, then list the open issues on my repo."
Claude will call get_identity to confirm access, then get_credential to retrieve the token, then use it for the GitHub API call.
Troubleshooting
MCP server not appearing — Confirm the Claude Code MCP configuration follows Claude Code's current documentation and that the endpoint and header are correct.
401 Unauthorized — Token is wrong or the agent was deleted. Check the Gazebo dashboard.
Denial on get_credential — The method you requested isn't in the agent's access profile. Update the profile in the Gazebo dashboard.