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-server
  • GET 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

  1. Open Connect Your AI in the dashboard (/dashboard/connect-ai).
  2. Create an API credential for your integration.
  3. Copy the key when shown (it is only displayed at creation time).
  4. Use it as Authorization: Bearer atai_....

Claude Setup

  1. Open Claude connector/MCP configuration.
  2. Set server URL to https://attribution.ai/api/mcp/rpc.
  3. Use OAuth (recommended) or bearer API key auth.
  4. Validate with a discovery query (for example: “What tools are available?”).

ChatGPT Setup

  1. Open connector or MCP server settings in ChatGPT.
  2. Add server URL: https://attribution.ai/api/mcp/rpc.
  3. Complete OAuth flow when prompted, or provide bearer API key if required.
  4. Start a new chat and run a basic performance question.

Gemini Setup

  1. Open MCP/connector settings in Gemini.
  2. Add server URL: https://attribution.ai/api/mcp/rpc.
  3. Authenticate via OAuth + PKCE (preferred) or bearer API key.
  4. 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/tools in the app
  • tools/list at 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/rpc and payload is JSON-RPC.
  • No useful results: verify your store has synced data for the requested date range.

Related articles