Connect your AI

Adflitz runs a remote MCP server at https://adflitz.com/api/mcp (Streamable HTTP, stateless). ChatGPT and Claude sign in with OAuth 2.1. Claude Code, Cursor, Grok and scripts can use an API key.

1. Pick how your client signs in

Sign in with OAuth (ChatGPT, Claude.ai, Claude Desktop and mobile, and any client that supports MCP authorization): add the URL, and the client opens Adflitz. You sign in, pick a workspace, one project and a permission (read, draft or publish), and approve. Only owners and admins can connect apps. Connected apps are listed under Connect your AI, where you can disconnect them.

API key (Claude Code, Cursor, Grok, scripts): open Settings → API keys and create a key with the level you want. Then allow agents on the project under Settings → Agents. Keys are shown once.

2. Add it to your client

ChatGPT (OAuth sign-in)

Settings → Apps → Advanced settings: turn on Developer mode. Then Create app (or + on the Plugins page → Add custom MCP server), paste this URL, keep Authentication on OAuth and leave client ID and secret empty. ChatGPT opens Adflitz: sign in, pick the project and the permission, approve.

https://adflitz.com/api/mcp

Claude.ai · Desktop · mobile (OAuth sign-in)

Settings → Connectors → Add custom connector. Paste this URL and leave the OAuth fields under Advanced empty. Click Connect, sign in to Adflitz and approve. The connector then shows up in Claude Desktop and the mobile apps too.

https://adflitz.com/api/mcp

Claude Code (API key)

One command in your terminal. Leave out the header to sign in with OAuth instead (run /mcp in Claude Code).

claude mcp add --transport http adflitz https://adflitz.com/api/mcp \
  --header "Authorization: Bearer apk_YOUR_KEY"

Cursor (API key)

Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).

{
  "mcpServers": {
    "adflitz": {
      "url": "https://adflitz.com/api/mcp",
      "headers": {
        "Authorization": "Bearer apk_YOUR_KEY"
      }
    }
  }
}

Grok · other agents (API key)

Any client that speaks MCP over Streamable HTTP. Send the key as a Bearer header. Clients with OAuth support only need the URL.

URL:    https://adflitz.com/api/mcp
Header: Authorization: Bearer apk_YOUR_KEY

REST / scripts (API key)

Same tools as plain HTTP. OpenAPI spec at /api/v1/openapi.json.

curl https://adflitz.com/api/v1/reports?days=14 \
  -H "Authorization: Bearer apk_YOUR_KEY"

Authentication

Without credentials the server answers 401 with WWW-Authenticate: Bearer resource_metadata="https://adflitz.com/.well-known/oauth-protected-resource/api/mcp", so MCP clients discover the authorization server on their own. It follows the MCP authorization spec: protected resource metadata (RFC 9728), authorization server metadata at https://adflitz.com/.well-known/oauth-authorization-server (RFC 8414), dynamic client registration (RFC 7591) and Client ID Metadata Documents, authorization code with PKCE (S256 only), resource indicators (RFC 8707), issuer in the redirect (RFC 9207) and token revocation (RFC 7009). Access tokens last one hour. Refresh tokens rotate on every use and a replayed refresh token ends the connection. Only hashes of tokens are stored. Scopes: adflitz.read, adflitz.draft, adflitz.publish; the permission picked on the consent screen wins.

API keys go in Authorization: Bearer apk_… (or x-api-key). Keys in the URL (/api/mcp/apk_…) are no longer accepted and answer 410 Gone; if you used one, revoke that key. Rate limit: 120 requests per minute per key or connection. Supported protocol versions: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05.

Tools

The tool list your client sees depends on the granted permission. Tools marked with credits use Adflitz's built-in AI.

ToolWhat it doesLevel
adflitz_overviewWorkspace overviewread
adflitz_list_projectsList projectsread
adflitz_connection_statusPlatform connection statusread
adflitz_list_ad_accountsList ad accountsread
adflitz_list_campaignsList campaignsread
adflitz_list_ad_groupsList ad groups / ad setsread
adflitz_list_adsList adsread
adflitz_get_reportPerformance reportread
adflitz_platform_optionsPlatform options for draftsread
adflitz_sync_nowSync an ad account nowdraft
adflitz_list_draftsList draftsread
adflitz_get_draftGet a draftread
adflitz_create_draftCreate a change draftdraft
adflitz_approve_draftApprove a draftpublish
adflitz_publish_draftPublish a draftpublish
adflitz_reject_draftReject a draftdraft
adflitz_search_librarySearch the ads libraryread
adflitz_list_competitorsList tracked competitorsread
adflitz_track_competitorTrack a competitordraft
adflitz_untrack_competitorStop tracking a competitordraft
adflitz_list_boardsList swipe-file boardsread
adflitz_list_saved_adsList saved adsread
adflitz_save_adSave an ad to the swipe filedraft
adflitz_list_activityActivity feedread
adflitz_list_autopilot_rulesList autopilot rulesread
adflitz_run_autopilotRun autopilot nowdraft
adflitz_get_creditsAI credit balanceread
adflitz_generate_copyGenerate ad copy (uses credits)(5 credits)draft
adflitz_generate_static_adRender a static ad (uses credits)(25 credits)draft
adflitz_audit_accountAudit performance (uses credits)(10 credits)read

Support and policies

Questions or problems with the connection: contact@adflitz.com. Privacy policy: https://adflitz.com/privacy. Every tool is described, with its read-only, destructive and open-world hints, in the machine-readable server card. Adflitz only reaches ad accounts you connected yourself and only uses the official APIs of Meta, Google and LinkedIn.

Try it with curl

curl https://adflitz.com/api/mcp \
  -H "Authorization: Bearer apk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"adflitz_overview","arguments":{}}}'