Claude.ai
Connect OpsTrails to Claude.ai for AI-powered querying of your operational timeline. Claude.ai uses OAuth for authentication — no API key needed.
1. Add Integration
- Go to Claude.ai → Settings → Integrations → “Add more integrations”
- Enter the MCP server URL:
https://api.opstrails.dev/api/mcp/mcp
2. Authorize
- Claude.ai will redirect you to OpsTrails to sign in
- Select which organization to connect
- Click “Approve” to grant read-only access to your events
3. Start Using
Return to Claude.ai and ask questions like:
- “What was deployed today?”
- “Show me recent events for the production environment”
- “Did the error rate change after the last deployment?”
- “What changed in the last 2 hours?”
💡 Info
No API key needed — Claude.ai handles authentication automatically via OAuth. The connection creates a read-only MCP API key named “MCP — Claude.ai” visible on the API Keys page. You can revoke access anytime by deleting that key.
Troubleshooting
Integration not connecting
- Verify the MCP server URL is exactly
https://api.opstrails.dev/api/mcp/mcp — a common mistake is to omit the trailing /mcp - Check that you are signed in to Claude.ai with a Pro or Team plan (MCP integrations require a paid plan)
- Try removing the integration and re-adding it
Permission denied
- During the OAuth flow, make sure you selected the correct organization
- Check the API Keys page in the console — verify the “MCP — Claude.ai” key exists and has not been revoked
- If the key was deleted, remove the integration in Claude.ai and re-authorize
No events returned
- Your organization may not have any events yet — send a test event via the Quick Start guide
- Check that events fall within your plan's retention window (Free: 7 days, Starter: 30 days, Pro: 90 days)
- Try a broader query like “show me all events” to confirm the connection is working
What Happens Behind the Scenes
When you authorize Claude.ai to access OpsTrails, the following happens:
- Claude.ai initiates an OAuth 2.0 authorization flow with the OpsTrails API
- You sign in to OpsTrails and select which organization to connect
- OpsTrails creates a READ_ONLY MCP API key named “MCP — Claude.ai”, scoped to the selected organization
- This key is visible on your console's API Keys page alongside any manually created keys
- Claude.ai uses this key to authenticate all MCP tool calls (event queries, metric lookups, etc.)
The key is read-only — Claude.ai can query events and metrics but cannot create or modify events. To revoke access at any time, simply delete the “MCP — Claude.ai” key from the API Keys page in the console.