Setting Up AI Connectors (MCP)
docs@attribution.aiReviewed 2026-02-22Status published
<!-- Keep tool references aligned with lib/mcp/tool-registry.ts -->
Setting Up AI Connectors (MCP)
Attribution.ai exposes a production MCP JSON-RPC endpoint so AI clients can query your attribution workspace.
Endpoint
POST https://attribution.ai/api/mcp/rpc- Protocol: JSON-RPC 2.0 over HTTP
- Auth: OAuth access token (recommended) or Bearer API key
OAuth Discovery
GET https://attribution.ai/.well-known/oauth-authorization-serverGET https://attribution.ai/.well-known/oauth-protected-resource
Authentication Guidance
Use OAuth + PKCE for interactive connector flows when your client supports it.
Use API keys for:
- automation scripts
- CI jobs
- clients that do not support OAuth
Create API Credentials
- Open Connect Your AI in the dashboard (
/dashboard/connect-ai). - Create an API credential for your integration.
- Copy the key when shown (it is only displayed at creation time).
- Use it as
Authorization: Bearer atai_....
Claude Setup
- Open Claude connector/MCP configuration.
- Set server URL to
https://attribution.ai/api/mcp/rpc. - Use OAuth (recommended) or bearer API key auth.
- Validate with a discovery query (for example: “What tools are available?”).
ChatGPT Setup
- Open connector or MCP server settings in ChatGPT.
- Add server URL:
https://attribution.ai/api/mcp/rpc. - Complete OAuth flow when prompted, or provide bearer API key if required.
- Start a new chat and run a basic performance question.
Gemini Setup
- Open MCP/connector settings in Gemini.
- Add server URL:
https://attribution.ai/api/mcp/rpc. - Authenticate via OAuth + PKCE (preferred) or bearer API key.
- Confirm tool discovery succeeds before deeper analysis prompts.
Available Tool Families
Current tools cover:
- discovery and documentation (
discover,explain,ask) - analytics (
performance,campaigns,trends,customers,surveys,products) - planning and analysis (
optimization,experiments,insights,compare) - operations (
manage,diagnose,influencers)
For the full, up-to-date list and parameter schemas, use:
/developers/mcp/toolsin the apptools/listat runtime
Security and Access
- Create one key per integration/client.
- Rotate keys periodically.
- Revoke keys immediately if exposed.
- Keep credentials in environment variables, never client-side code.
- Write actions are restricted when using read-only scoped credentials.
Troubleshooting
- 401 Unauthorized: token/key is invalid, revoked, or expired.
- 429 Rate limit exceeded: back off and retry with exponential delay.
- 400 Bad request: confirm endpoint is
/api/mcp/rpcand payload is JSON-RPC. - No useful results: verify your store has synced data for the requested date range.