MMetadata /docs
Docs/Introduction

Run paid media from your agent

Metadata exposes its whole platform over MCP: 160 tools for audiences, campaigns, creative, paid search and attribution. Point a client at the server and your agent can build an audience, draft a campaign and read what it returned.

Watch a real session

Five calls an agent makes before it does anything that spends. Every response below came back from the production server while these docs were written, at the latency shown. The sixth call is the one that would launch a campaign, and it is not made.

5 calls · 3,053 ms of real latency, replayed at 4× recorded 2026-09-05, values redacted
  1. get_current_date Read 160 B · 102 ms

    Return the REAL current date and time (UTC).

    {
     "current_date": "2026-09-05",
     "current_datetime_utc": "2026-09-05T15:03:22.518Z",
     "current_year": 2026,
     "current_quarter": "Q3",
     "timezone": "UTC"
    }
  2. get_account_details Read 1,111 B · 1699 ms

    Current user and account information.

    {
     "id": 6,
     "firstName": "[firstName redacted]",
     "lastName": "[lastName redacted]",
     "email": "[email redacted]",
     "role": "SUPER_USER",
     "roleId": "sys_super_user",
     "status": "ACTIVE",
     "saml": false,
     "accountId": "[number redacted]",
     "userId": 6,
     "domain": "[domain redacted]",
     "phoneNumber": "[phoneNumber redacted]",
     "jobTitle": null,
     "country": null,
     "uiPreference": "CLASSIC",
     "experiencePromptDismissed": false,
     "accountName": "[accountName redacted]",
     "landingSubdomain": "metadataone",
     "impersonate": null,
     "accountStatus": "ACTIVE",
     "impersonatedAccountStatus": null,
     "currency": "USD",
     "renewalDate": "2026-02-27T22:32:37.000Z",
     "subscriptionChangeStatus": {
      "hasScheduledDowngrade": false,
      "hasScheduledCancellation": false
     },
     "isSocial": true,
     "auth0UserId": "[auth0UserId redacted]",
     "subscriptionComponents": [
      "audiences",
      "bid-agent",
      "campaigns",
      
      …
  3. list_target_groups Read 5,729 B · 299 ms

    List and search target groups in Metadata platform.

    {
     "totalElements": 45,
     "totalPages": 5,
     "data": [
      {
       "id": "[number redacted]",
       "name": "[name redacted]",
       "channel": "REDDIT",
       "createdDate": "2026-09-03T22:16:30.000Z",
       "matchCountType": "FIXED_SIZE",
       "matchCount": "[number redacted]",
       "isMatchCountTooSmall": false,
       "visibility": "VISIBLE",
       "mdAudienceIds": [],
       "tags": [],
       "activeExperiments": false,
       "locked": false,
       "inactiveAudiences": false,
       "hasExclusionCriteria": true,
       "hasAudiencesOlderThan90Days": false,
       "hasAudiencesOlderThan180Days": false
      },
      {
       "id": "[number redacted]",
       "name": "[name redacted]",
       "channel": "REDDIT",
       "createdDate": "2026-09-03T20:45:30.000Z",
       "matchCountType": "FIXED_SIZE",
       "matchCount": "[number redacted]",
       "isMatchCountTooSmall": false,
       "visibility": "VISIBLE",
       "mdAudienceIds": [],
       "tags": [],
       "activeExperiments": false
      …
  4. account_level_stats Read 2,765 B · 619 ms

    Account-level statistics and channel breakdown for a timeframe.

    "[value redacted]"
  5. get_converted_leads_summary Read 396 B · 334 ms

    Fast aggregate summary of the account's converted leads (Smart Leads) — counts and rates only, no lead rows.

    "[value redacted]"
  6. launch_campaign Destructive not called

    This is where the agent stops. LAUNCHES REAL MARKETING CAMPAIGNS WITH REAL BUDGET SPEND 🚨 KEYWORDS: launch, start, activate, go live, campaign, begin, advertising, spend, marketing PREREQUISITE: Before runni…

All 65 read-only tools behave like the five above. The 39 destructive ones behave like the sixth. Filter the full list by effect.

Connect in one command

Claude Code, with a key you have already minted:

Claude Code
claude mcp add --transport http metadata https://mcp-server.metadata.io/mcp \
  --header "Authorization: ${METADATA_PAT}"

Claude Desktop and any client that speaks stdio, via the mcp-remote bridge:

claude_desktop_config.json
{
  "mcpServers": {
    "metadata": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp-server.metadata.io/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "pat-your-key-here"
      }
    }
  }
}
The token goes in the Authorization header raw, with no Bearer prefix. That trips people up more than anything else here, and it is worth knowing why, because it is the opposite of what the MCP specification says. The spec requires Authorization: Bearer <token>. On this server the Bearer form is accepted by tools/list but rejected by tools/call, which returns -32001 Invalid token — the scheme is passed through to the platform API rather than stripped. Send the token raw until that is fixed; this page changes when it is.

Or skip the client entirely

The server is plain JSON-RPC over HTTP. This lists every tool it exposes:

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

A useful sanity check, because it needs no client, no npx and no config file: if this returns 160 tools, your key works and the fault is somewhere else.

Know which calls spend money

The server annotates every tool with what it does to the account. Of the 160:

EffectCountMeaning
Read65Returns data. Safe to call freely.
Writes56Creates or changes something in the account.
Destructive39Deletes, archives, launches or moves budget.

Filter the full list by effect in the tool reference. If you are giving an agent an unattended loop, start it with the 65 read tools.

Where to go next