ChatGPT
Connect OpsTrails to ChatGPT for AI-powered querying of your operational timeline. ChatGPT uses OAuth for authentication — no API key needed. See the MCP Overview for background on how the protocol works.
1. Enable Developer Mode
- Go to ChatGPT → Settings → Apps & Connectors → Advanced
- Toggle Developer Mode on
2. Add MCP Server
- In the same settings panel, click “Add MCP Server”
- Enter the MCP server URL:
https://api.opstrails.dev/api/mcp/mcp
3. Authorize
- ChatGPT will redirect you to OpsTrails to sign in
- Select which organization to connect
- Click “Approve” to grant read-only access to your events
4. Start Using
Return to ChatGPT and ask questions about your operational timeline:
- “Use OpsTrails to show me what was deployed today”
- “Ask OpsTrails for recent events in the production environment”
- “Check OpsTrails — did the error rate change after the last deployment?”
- “Query OpsTrails for changes in the last 2 hours”
⚠️ Warning
ChatGPT does not automatically use MCP tools. You must explicitly mention OpsTrails in your prompt for ChatGPT to invoke the integration — for example, “Use OpsTrails to…” or “Check OpsTrails for…”.
💡 Info
No API key needed — ChatGPT handles authentication automatically via OAuth. The connection creates a read-only MCP API key named “MCP — ChatGPT” visible on the API Keys page. You can revoke access anytime by deleting that key.
Troubleshooting
Developer Mode not available
- Developer Mode requires a ChatGPT Plus, Team, or Enterprise plan
- If you don't see the option under Apps & Connectors → Advanced, check that your plan supports MCP integrations
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 - Make sure Developer Mode is toggled on before adding the server
- Try removing the integration and re-adding it
ChatGPT not using OpsTrails tools
- ChatGPT requires you to mention OpsTrails by name in your prompt
- Instead of “What was deployed today?”, try “Use OpsTrails to show what was deployed today”
- Verify the integration is listed under your active MCP servers in Settings
Permission denied
- During the OAuth flow, make sure you selected the correct organization
- Check the API Keys page in the console — verify the “MCP — ChatGPT” key exists and has not been revoked
- If the key was deleted, remove the integration in ChatGPT 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 “Use OpsTrails to show me all events” to confirm the connection is working
What Happens Behind the Scenes
When you authorize ChatGPT to access OpsTrails, the following happens:
- ChatGPT 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 — ChatGPT”, scoped to the selected organization
- This key is visible on your console's API Keys page alongside any manually created keys
- ChatGPT uses this key to authenticate all MCP tool calls (event queries, metric lookups, etc.)
The key is read-only — ChatGPT can query events and metrics but cannot create or modify events. To revoke access at any time, simply delete the “MCP — ChatGPT” key from the API Keys page in the console. For a full list of available tools, see the MCP Tools Reference.