Skip to content
PubTrust — a ClearTrust product · cleartrust.ccAd quality and malvertising protection for publishers

Docs

The MCP server for AI agents

An agent can investigate your ad quality and draft policy through PubTrust's MCP server. Turning enforcement on stays a human decision.

What can an AI agent do through the PubTrust MCP server?

Read and draft, never enforce. The server at https://app.pubtrust.cc/mcp lets an agent query metrics and trends, drill into violations, inspect sites, policies and packs, and generate reports. It can also author policy: create and edit policies, add keywords, domains and URL patterns, propose terms back into a pack and create fallback creatives. It cannot switch a policy from Monitor to Block, and it cannot touch billing.

How do I connect Claude Code?

Register the server over HTTP, passing an API key from your PubTrust account as a bearer token:

shell
claude mcp add --transport http pubtrust https://app.pubtrust.cc/mcp --header "Authorization: Bearer <key>"

Replace <key> with the key. The server speaks Streamable HTTP; clients that support OAuth can connect to the same URL without a key, using OAuth 2.1 with PKCE, in which case the person authorising the agent signs in to PubTrust and approves the connection.

Which tools does the server expose?

Two: discover and execute. discover returns the operations available to the connected credentials, with their input schemas; execute runs one operation by name with arguments that match its schema. Keeping the tool list to two keeps an agent's context free of dozens of tool definitions, and lets the agent find the operation it needs when it needs it.

What needs a human?

Enforcement and billing. When an agent recommends moving a policy from Monitor to Block, it creates an enforcement request, which appears as a pending approval in the dashboard; nothing changes until a person approves it there. Billing — plans, payment methods, invoices — is outside the agent's scope entirely.

How are agent actions recorded?

Every MCP action is written to your organisation's append-only audit log with the agent's identity recorded separately from the person who authorised it, so a change an agent made and a change a person made remain distinguishable afterwards.

How should I run an agent against PubTrust?

  • Issue one key per agent, so revoking one does not disconnect the others.
  • Keep policies an agent drafts in Monitor, and read their violations yourself before approving enforcement.
  • Treat what the agent reads as untrusted input. Creative text, advertiser domains and landing URLs come from ad traffic, and a hostile creative can contain text written to steer an agent.