# ClickTrust MCP Agent Skill

Skill-Version: de3320a0074d  
Refresh-Protocol: https://clicktrust.cc/api/mcp/heartbeat.md  

> Agents: re-fetch this document periodically (see the heartbeat protocol above) and re-read it whenever `Skill-Version` changes.

## Server

- **MCP endpoint**: `https://clicktrust.cc/mcp`
- **Website-operations endpoint** (clicktrust.cc pages/blog/assets with admin:site; customer web accounts, tag, blocking, IP lists, traps with admin:web; reads for partner keys): `https://clicktrust.cc/mcp/web`
- **Auth**: `Authorization: Bearer <CLICKTRUST_API_KEY>`
- **Transport**: Streamable HTTP + SSE

## Getting a Key

1. Create a ClickTrust account at [https://clicktrust.cc/register](https://clicktrust.cc/register)
2. Go to **Profile → API Keys & Agent Access**
3. Create an MCP key with the scopes your agent needs
4. Copy the key (shown only once)

## Scopes

Grant only what the agent actually needs. Available user scopes:

- `audience.*`: audience:read, audience:write
- `inapp.*`: inapp:read, inapp:write, inapp:sdk
- `iplists.*`: iplists:read, iplists:write
- `mmp.*`: mmp:read, mmp:write, mmp:postback
- `reports.*`: reports:read, reports:write
- `trap.*`: trap:read
- `web.*`: web:read, web:write

## Tool Catalog (73 tools)

### audience

- **`audience.exclusion.export_url`** (scope: `audience:read`): Return a dashboard URL the partner can use to download the audience-exclusion CSV. We don't stream large CSVs back throu...
- **`audience.exclusion.preview`** (scope: `audience:read`): Preview the audience-exclusion list for an account (counts of users by risk bucket: 0=clean, 1=sus, 2=fraud).
- **`audience.unsubscribe.add`** (scope: `audience:write`): Add an email to the partner's unsubscribe list so future workflow emails skip them.
### inapp

- **`inapp.accounts.create_native`** (scope: `inapp:write`): Create a native (iOS/Android/Flutter) tracking account. platform must be one of ios|android|flutter. bundleId / packageN...
- **`inapp.app_events.list`** (scope: `inapp:read`): Recent app events for a native account. Filter by name (event name) or eventCategory.
- **`inapp.app_events.summary`** (scope: `inapp:read`): Per-event-name counts over the last N days for a native account.
- **`inapp.device_blocklist.list`** (scope: `inapp:read`): Per-account device blocklist (iOS/Android/Flutter), keyed on the SDK-reported deviceIdHash.
- **`inapp.device_blocklist.remove`** (scope: `inapp:write`): Soft-remove a device blocklist entry (sets is_active=false).
- **`inapp.device_blocklist.upsert`** (scope: `inapp:write`): Add or refresh a device blocklist entry for a native account.
- **`inapp.sdk.install_md`** (scope: `inapp:read`): Render the markdown install instructions for an account's SDK (with the trackingId + secret pre-filled). Useful for an L...
- **`inapp.sdk.rotate_secret`** (scope: `inapp:sdk`): Rotate the SDK secret for a native account. Existing installs keep working until they re-init; new installs must use the...
### iplists

- **`iplists.blocklist.list`** (scope: `iplists:read`): Read the per-account fraud blocklist (the IPs we'd push to the partner's ad platforms via autopush). Filter by accountId...
- **`iplists.whitelist.add`** (scope: `admin:web`): ADMIN KEY ONLY. Add a single IP (or CIDR like 10.0.0.0/24) to the customer's whitelist with an optional human-readable l...
- **`iplists.whitelist.bulk_upload`** (scope: `admin:web`): ADMIN KEY ONLY. Bulk-add IPs to the customer's whitelist. Each entry is { ipAddress, label? }. Useful for importing an o...
- **`iplists.whitelist.list`** (scope: `iplists:read`): List the tenant-wide IP whitelist (entries here are NEVER flagged as fraud). Returns entries with id, ipAddress, label, ...
- **`iplists.whitelist.remove`** (scope: `admin:web`): ADMIN KEY ONLY. Remove a whitelist entry by its id (returned from iplists.whitelist.list).
### mmp

- **`mmp.affiliates.create`** (scope: `mmp:write`): Add an affiliate (e.g. a media buyer or partner network) to an account. Returns the created row including auto-generated...
- **`mmp.affiliates.invite`** (scope: `mmp:write`): Send an affiliate-portal invitation. Returns the invite URL the affiliate should open.
- **`mmp.affiliates.list`** (scope: `mmp:read`): List all affiliates configured under an account.
- **`mmp.affiliates.update`** (scope: `mmp:write`): Update an existing affiliate (status, contact info, fraud thresholds, notes).
- **`mmp.clicks.list`** (scope: `mmp:read`): Stream of MMP-tracked clicks for an account. Filter by affiliateId / offerId. Default limit 100.
- **`mmp.offer_affiliates.upsert`** (scope: `mmp:write`): Attach an affiliate to an offer (or update its terms). Allows per-affiliate payout overrides.
- **`mmp.offers.create`** (scope: `mmp:write`): Create an offer. payoutType is one of CPI/CPA/CPC/revshare. Currency defaults to USD. attributionModel is last_click or ...
- **`mmp.offers.list`** (scope: `mmp:read`): List all offers under an account.
- **`mmp.offers.update`** (scope: `mmp:write`): Update an existing offer (payout, status, caps, destination URLs).
- **`mmp.postbacks.list`** (scope: `mmp:read`): List postback delivery attempts (most recent first). Filter by status (pending|delivered|failed). Default limit 100.
- **`mmp.postbacks.replay`** (scope: `mmp:postback`): Reset a single postback row to pending so the worker retries delivery. Useful when an affiliate's endpoint was temporari...
- **`mmp.settings.enable`** (scope: `mmp:write`): Turn on Lite-MMP for an account so the rest of the mmp.* tools become available.
- **`mmp.settings.get`** (scope: `mmp:read`): Read Lite-MMP settings + 30-day stats for an account (affiliates, active offers, clicks, attributed conversions, postbac...
- **`mmp.tracking_domains.add`** (scope: `mmp:write`): Add a custom tracking-domain CNAME. Returns the verification token the partner must set as a TXT record or HTTP-file.
- **`mmp.tracking_domains.list`** (scope: `mmp:read`): List custom tracking domains (CNAMEs) configured for the account.
### reports

- **`reports.aggregate.query`** (scope: `reports:read`): Aggregate fraud stats over a date range: total clicks, fraud rate, top countries, top IPs. Optional accountId.
- **`reports.data.query`** (scope: `reports:read`): Pull raw click rows + verdicts (the same rows the dashboard table shows). Filters: accountId, fraudFilter, dateFrom/date...
- **`reports.scheduled.create`** (scope: `reports:write`): Create a new scheduled report. Frequency is daily/weekly/monthly; recipients is a list of emails.
- **`reports.scheduled.list`** (scope: `reports:read`): List scheduled reports for the caller. Returns name, frequency, next run, recipients.
- **`reports.scheduled.run_now`** (scope: `reports:write`): Force a scheduled report to run immediately (sends to its configured recipients). Useful when an exec wants the latest n...
### site

- **`site.assets.delete`** (scope: `admin:site`): ADMIN. Delete an uploaded asset by name. Pages still referencing it will show a broken link.
- **`site.assets.list`** (scope: `admin:site`): ADMIN. List uploaded site assets with their URLs.
- **`site.assets.upload`** (scope: `admin:site`): ADMIN. Upload an image/PDF/CSS/JS/font (base64, ≤5 MB) for use in pages or posts. Returns a permanent URL under /site-as...
- **`site.blog.create`** (scope: `admin:site`): ADMIN. Create a blog post (markdown or HTML content, same renderer as the blog). Draft unless publish=true. Slug is deri...
- **`site.blog.get`** (scope: `admin:site`): ADMIN. Fetch one blog post by id or slug, including full content.
- **`site.blog.list`** (scope: `admin:site`): ADMIN. List blog posts (newest first) with slug, status, tags and dates.
- **`site.blog.update`** (scope: `admin:site`): ADMIN. Edit a blog post (title, content, excerpt, tags, SEO, cover, author) or change its status (draft|published). Only...
- **`site.pages.create`** (scope: `admin:site`): ADMIN. Create a website page at a URL path. Provide title and content (HTML, or markdown with format=markdown). Starts a...
- **`site.pages.delete`** (scope: `admin:site`): ADMIN. Archive a page (kept in the database, no longer served, path freed only after deleting). Pass hard=true to delete...
- **`site.pages.get`** (scope: `admin:site`): ADMIN. Fetch one page by id or path, including its full HTML and SEO fields.
- **`site.pages.list`** (scope: `admin:site`): ADMIN. List website pages managed through MCP (drafts and published), with path, status, nav settings and size. Compiled...
- **`site.pages.publish`** (scope: `admin:site`): ADMIN. Publish a draft (or re-publish an archived page) so it is served at its path.
- **`site.pages.unpublish`** (scope: `admin:site`): ADMIN. Take a page offline (status=draft). Its path reverts to whatever the app served before.
- **`site.pages.update`** (scope: `admin:site`): ADMIN. Edit a page: any of title, content (+format), layout, SEO fields, nav settings, or move it to a new path (newPath...
### trap

- **`trap.account.set`** (scope: `admin:web`): Enable or disable one or more traps for an account. Pass trapIds (array of catalog ids) and action=enable|disable. Enabl...
- **`trap.account.status`** (scope: `web:read`): Show which traps are enabled vs disabled for a specific account. Returns per-trap state (enabled/disabled) with the reas...
- **`trap.catalog.get`** (scope: `trap:read`): Get the full definition of a single trap by its id, including its plain-English meaning, detection method, risk weightin...
- **`trap.catalog.list`** (scope: `trap:read`): List ClickTrust's fraud-detection traps with their names, definitions (what each detects and why it matters), risk weigh...
- **`trap.taxonomy`** (scope: `trap:read`): Explain the classification system behind the traps: every detection category and its meaning, the risk levels (clean/low...
### web

- **`web.accounts.create`** (scope: `admin:web`): ADMIN KEY ONLY. Create a web tracking account (a site to protect) for the customer named by ownerEmail. Returns the inst...
- **`web.accounts.features`** (scope: `web:read`): Report the full feature/capability map for accounts: every toggleable capability (scanning surfaces page/creative/pathfi...
- **`web.accounts.get`** (scope: `web:read`): Look up a single tracking account by trackingId or numeric accountId. Returns blocking config, scanning modes, and SDK i...
- **`web.accounts.list`** (scope: `web:read`): List every web/in-app tracking account owned by the caller. Returns id, trackingId, name, domain, platform, and active s...
- **`web.accounts.set_active`** (scope: `admin:web`): ADMIN KEY ONLY. Activate or deactivate a tracking account. Deactivating stops the tag and rejects its beacons immediatel...
- **`web.accounts.update`** (scope: `admin:web`): ADMIN KEY ONLY. Edit a web tracking account: name, domain (landing URL the tag is locked to), tagUnlocked (multi-site ta...
- **`web.accounts.update_blocking`** (scope: `admin:web`): ADMIN KEY ONLY. Set real-time blocking for a site: enabled, blockAction (redirect_404 | captcha | custom_redirect), capt...
- **`web.blocking.get`** (scope: `web:read`): Read the real-time blocking configuration for a site (enabled, action, captcha type, rule mode, blocked categories/traps...
- **`web.heatmap.clicks`** (scope: `web:read`): Get click heatmap data: list of all clicks with x/y coordinates, timestamps, and fraud verdicts. Returns grid coordinate...
- **`web.heatmap.patterns`** (scope: `web:read`): Identify behavioral patterns: scroll depth distribution, time-on-page, mouse movement, click velocity. Compares clean vs...
- **`web.heatmap.summary`** (scope: `web:read`): Get heatmap data summary for an account or page: click density, scroll depth distribution, mouse behavior patterns, time...
- **`web.scripts.snippet`** (scope: `web:read`): Return the install snippet for an account (the same `<script>` shown in the partner dashboard). Use this after creating ...
- **`web.session.export`** (scope: `web:read`): Export a session as JSON or HAR (HTTP Archive) format for sharing with team or external fraud analysts. Includes full cl...
- **`web.session.get`** (scope: `web:read`): Retrieve full session replay: all clicks in sequence with timestamps, coordinates, analysis verdicts, page views, and us...
- **`web.session.list`** (scope: `web:read`): List recorded user sessions for an account. Returns session metadata: id, duration, click count, fraud score, user agent...
- **`web.single.analyze`** (scope: `web:read`): Run an ad-hoc fraud analysis on a single click payload (IP, user agent, referer, optional country/macros). Returns the s...
- **`web.traffic.query`** (scope: `web:read`): Query the click stream for an account or for the whole tenant. Filters: fraudFilter (clean|sus|fraud), accountId, dateFr...
- **`web.traffic.tqi`** (scope: `web:read`): Get Traffic Quality Index (TQI) for one or more accounts. TQI is a 0–10 score where 10 = all clicks are clean and 0 = al...

## Safe Operating Guidance

- Only act within accounts visible to the key owner
- The key is scoped; tools outside granted scopes will be rejected
- Do not log, print, or share the API key
- Use `web:read` / `reports:read` for read-only monitoring agents
- Use `web:write` / `iplists:write` etc. only when the agent needs to modify data
