TrustData
API and agents

Quickstart

Connect your agent, sign in, and run your first tool call in about 2 minutes.

The MCP server lives at:

https://mcp.trustdata.tech/mcp/

Most agents connect with OAuth: you sign in to TrustData in the browser and approve access. Use an API token for scripts, CI, or a client that doesn't support OAuth.

1. Add the server to your agent

# Plugin: MCP server + TrustData skill in one step
claude plugin marketplace add trstdata/trustdata-integrations
claude plugin install trustdata@trustdata

# Or the MCP server on its own
claude mcp add --transport http trustdata https://mcp.trustdata.tech/mcp/

2. Sign in and approve

On the first tool call (in Claude Code, run /mcp and pick trustdata), your browser opens TrustData:

  1. Sign in with your TrustData account.
  2. Pick the workspace(s) the agent may read. Agencies can tick several; the agent then reads every workspace you ticked.
  3. Review the scopes. They're grouped as Analytics, Search and AI visibility, Operations, Recommendations, Client connections and Connected accounts. Untick anything the agent shouldn't have. A client that asks for no specific scope gets read access only. Reading orders, querying a BigQuery warehouse and watching search terms are opt-in: a client gets them only by asking for them by name.
  4. Approve. You're sent back to your agent.

The connection now appears in Settings → Connected apps, where you can revoke it at any time. Access tokens refresh automatically; if the agent goes unused for 30 days, you'll be asked to sign in again.

Option B: connect with an API token

1. Issue a token

  1. As an organization admin, open Organization settings → Developer and click + New token.
  2. On the New API token page:
    • Name: something you'll recognise later (e.g. "CI deploy annotations").
    • Rate tier: read-only. It comes from your plan.
    • Expires: Never, 30 days, 90 days or 1 year. An expiring token limits the damage if it leaks.
    • Scopes: tick what the workflow needs. Select the SEO × GEO playbook preset ticks read:geo_visibility, read:seo_keywords, read:recommendations and write:recommendations. Select all scopes ticks everything.
  3. Click Issue token.
  4. Copy the td_live_… token. This is the only time it's shown. Store it in a password manager.
Scopes = capabilities. A tool your token's scopes don't cover isn't listed to the agent at all. Pick the least-privilege set that covers your workflow. The full SEO × GEO playbook also reads your properties and reports (read:metrics) and recent signals (read:alerts), so add those two scopes to the preset.

2. Connect your agent

After you issue the token, the dashboard shows a Connect an agent panel with ready-made snippets. You can also use these:

claude mcp add --transport http trustdata https://mcp.trustdata.tech/mcp/ \
  --header "Authorization: Bearer td_live_YOUR_TOKEN"

The dashboard snippet may show https://app.trustdata.tech/mcp/. That address accepts API tokens too.

Restart the agent. You should see a trustdata connection in its MCP or tools panel.

Verify with a first tool call

Ask your agent something that exercises a tool:

"List my TrustData properties and the metrics and dimensions I can report on."

The agent calls list_properties and list_fields. If you see your properties and a list of fields (sessions, spend, session__channel_group, keyword__text, …), you're connected. Only what your scopes reach is listed, so nothing it names will be refused.

Try the playbook

The real value is letting the agent drive an end-to-end loop. Open the SEO × GEO playbook and paste it as a system prompt. The agent will diagnose, propose hypotheses, and record trackable recommendations in one conversation.

Rate limits

Every token and OAuth connection gets the rate tier of your plan, automatically:

Rate tierCap
Measure30 requests/min
Optimize300 requests/min
Prove3,000 requests/min

See pricing for which plan carries which tier. Each call reads at most 400 days and returns at most 10,000 rows.

Troubleshooting

Errors come back as [CODE] message, and the message says how to fix the call.

ErrorCauseFix
401No token, a revoked or expired token, or an OAuth session that needs a new sign-inIssue a new token in Developer, or reconnect the client and sign in again.
403 SCOPE_DENIEDThe grant is missing the scope the tool needs. The message names it.Tokens can't be edited: issue a replacement with the scope, then revoke the old one. For OAuth, reconnect and approve the scope.
422 INVALID_ARGUMENTA malformed argument, a property or prompt ID outside your workspace, or a hypothesis under 20 charactersFetch IDs with list_properties / list_brand_prompts. Write hypotheses as "If we X, then Y because Z".
422 WINDOW_TOO_LARGEDate range over 400 daysNarrow the range.
422 DIMENSION_NOT_ALLOWEDA dimension the dataset doesn't carry, or one your scopes don't allow (country needs read:geo, for example)Pick dimensions from list_fields.
422 QUERY_TOO_LARGEThe query would scan too many rowsNarrow the dates, add a filter, or use fewer dimensions.
429 RATE_LIMITEDOver your plan's rate capWait for the retry window, or batch fewer calls.
Agent doesn't see TrustData toolsThe grant covers none of them, or the client wasn't restartedGrant the scopes you need, then reconnect.

Need help?

  • Revoke a token: Organization settings → Developer → Revoke. Revoke an OAuth client: Settings → Connected apps. Both stop working immediately.
  • Support: [email protected]