Skip to main content
If you primarily want to chat with your data (not code), Claude Web is the easiest path: install the official Detrics connector from the Claude directory and authorize with OAuth.

Prerequisites

Setup

1

Generate a Detrics API key

Go to app.detrics.io/mcp/api-keys and click Generate New Key. Copy it, you will need it in the next step.
Treat your API key like a password. Never share it publicly or commit it to version control. See API Keys for security best practices.
2

Register the Detrics MCP server

Run the following command in your terminal. Replace your-api-key with the key you just generated.
3

Start querying

Open Claude Code and try a test prompt:
Claude Code will call the Detrics MCP server and return your connected platforms. If you see results, you are all set.

Example prompts

Once connected, try these:
  • “What was my total ad spend across all platforms last month?”
  • “Compare my Google Ads and Meta Ads ROAS for the last 30 days”
  • “Show me my top 5 campaigns by conversions this week”
  • “What’s my Shopify revenue trend over the last 90 days?”
  • “What metrics are available for TikTok Ads?”
Or browse the Prompt Templates for 40+ ready-made marketing prompts.

Updating your API key

If you need to rotate your API key:
  1. Generate a new key at app.detrics.io/mcp/api-keys
  2. Remove the existing server: claude mcp remove detrics-mcp
  3. Re-add with the new key:

Troubleshooting

The MCP server URL may be incorrect.Fix: Make sure the URL is exactly https://mcp.detrics.io. Enter the base URL by itself, with no trailing slash and no /sse suffix.
Your API key is missing or invalid.Fix: Remove and re-add the server, making sure the -e DETRICS_API_KEY=... flag is included with your full API key.
Your MCP connection works, but there are no platforms connected in your Detrics workspace.Fix:
  1. Go to app.detrics.io and connect at least one data source
  2. Or ask Claude Code: “Connect my Meta Ads account”, it will generate an OAuth link for you
For more issues, see Troubleshooting.