Skip to main content

Overview

The Scope3 Agentic API is built from the ground up for AI agents, providing both programmatic REST access and natural language interfaces through the Model Context Protocol (MCP). Whether you’re building agents or using them, Scope3 makes advertising operations conversational and intelligent.

REST API

Traditional HTTP REST API for programmatic integrations with standard HTTP methods.

MCP Protocol

Connect AI agents (Claude, ChatGPT, etc.) to manage campaigns through natural conversation.

Connection Methods

REST API

Standard HTTP REST API for traditional integrations:
EnvironmentBuyer Base URLStorefront Base URL
Productionhttps://api.agentic.scope3.com/api/buyerhttps://api.agentic.scope3.com/api/storefront
Staginghttps://api.agentic.staging.scope3.com/api/buyerhttps://api.agentic.staging.scope3.com/api/storefront
Localhttp://localhost:4001/api/buyerhttp://localhost:4001/api/storefront

MCP (Model Context Protocol)

For AI agent integrations using JSON-RPC 2.0:
EnvironmentBuyer MCP EndpointStorefront MCP Endpoint
Productionhttps://api.agentic.scope3.com/mcp/buyerhttps://api.agentic.scope3.com/mcp/storefront
Staginghttps://api.agentic.staging.scope3.com/mcp/buyerhttps://api.agentic.staging.scope3.com/mcp/storefront
Localhttp://localhost:4001/mcp/buyerhttp://localhost:4001/mcp/storefront
These URLs always resolve to the latest stable API version.

Available MCP Tools

The Buyer MCP endpoint exposes 3 tools:
ToolPurpose
healthCheck API health and verify connectivity
ask_about_capabilityQuery the skill documentation to understand available endpoints
api_callMake authenticated REST API calls to any endpoint
Workflow: AI agents first use ask_about_capability to learn about available endpoints, then use api_call to execute requests.

Authentication

Scope3 supports two authentication methods for connecting agents: When connecting via Claude Connectors or ChatGPT MCP Connectors, authentication is handled automatically through OAuth. Users log in with their Scope3 credentials and the agent receives a secure token — no API keys to manage.

API Keys

For programmatic integrations, Claude Code, Cursor, and custom agents, use an API key:
  1. Visit agentic.scope3.com/user-api-keys
  2. Generate a new API key (starts with scope3_)
  3. Pass it via the Authorization: Bearer <key> header
See the Authentication guide for full details.

Connecting AI Agents

Claude Connector (Claude.ai Team / Enterprise)

This is the recommended way to connect Claude to Scope3. It provides OAuth-based authentication and works across both Claude.ai (browser) and Claude Desktop automatically.
Admin Setup (one-time):
  1. Go to claude.aiAdmin SettingsIntegrationsMCP Connectors
  2. Click Add Connector
  3. Enter the MCP endpoint URL:
    • Production: https://api.agentic.scope3.com/mcp/buyer
    • Staging: https://api.agentic.staging.scope3.com/mcp/buyer
  4. Name it (e.g., “Scope3 Agentic API”)
  5. Save the connector — it is now available to all members in your organization
User Setup:
  1. Go to claude.aiSettingsIntegrationsMCP Connectors
  2. Find the Scope3 connector and click Connect
  3. Log in with your Scope3 credentials when prompted (OAuth)
  4. Start chatting! Ask Claude: “List my advertisers” or “Create a performance campaign”
Once connected via the connector, it works in both Claude.ai (browser) and Claude Desktop. No separate configuration needed.

Claude Desktop (Personal / Manual Setup)

If you don’t have a Claude Team or Enterprise plan, you can connect Claude Desktop directly using an API key:
Edit your Claude Desktop config file:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "scope3-buyer": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.agentic.scope3.com/mcp/buyer"],
      "env": {
        "SCOPE3_API_KEY": "your-api-key-here"
      }
    }
  }
}
Restart Claude Desktop after saving.

Claude Code (CLI)

# Add the production MCP server
claude mcp add --transport http scope3-buyer https://api.agentic.scope3.com/mcp/buyer

# Set your API key
export SCOPE3_API_KEY="your-api-key-here"

# Start Claude Code
claude
Then ask: “Use ask_about_capability to learn how to list advertisers, then use api_call to list them”

ChatGPT

Important: ChatGPT MCP connectors use OAuth authentication only. Custom headers like x-scope3-api-key are not supported. Authentication is handled automatically through the OAuth login flow.
Connect ChatGPT to Scope3 via MCP:
  1. Go to ChatGPT → SettingsMCP Connectors
  2. Click Add Connector
  3. Enter MCP Server URL: https://api.agentic.scope3.com/mcp/buyer
  4. Select OAuth as the authentication method
  5. Complete the Scope3 login flow when prompted
  6. Once connected, you’ll have access to 3 tools:
    • health - Check API status
    • ask_about_capability - Learn about available endpoints
    • api_call - Make authenticated API calls
  7. Test with: “Use ask_about_capability to learn how to list advertisers”

Cursor

Configure Cursor with production API:
  1. Open Cursor Settings → MCP tab
  2. Add a new MCP server:
    • Name: scope3
    • URL: https://api.agentic.scope3.com/mcp/buyer
    • Headers: Authorization: Bearer your-api-key
  3. Restart Cursor
  4. In chat, ask: “Use Scope3 tools to list advertisers”

Testing Locally

Local Development Setup RequiredBefore testing with AI agents locally, ensure your local API server is running:
cd apps/api
pnpm dev
This starts the server at http://localhost:4001

Testing with curl (REST API)

# List advertisers
curl -X GET "https://api.agentic.scope3.com/api/buyer/advertisers" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json"

# Create an advertiser
curl -X POST "https://api.agentic.scope3.com/api/buyer/advertisers" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Test Advertiser", "description": "Created via API"}'

Testing MCP with curl

# Generate a session ID
SESSION_ID=$(uuidgen)

# Initialize MCP session
curl -X POST "https://api.agentic.scope3.com/mcp/buyer" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {"name": "curl-test", "version": "1.0"}
    }
  }'

# Call health tool
curl -X POST "https://api.agentic.scope3.com/mcp/buyer" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "health",
      "arguments": {}
    }
  }'

# Call api_call tool to list advertisers
curl -X POST "https://api.agentic.scope3.com/mcp/buyer" \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: $SESSION_ID" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "api_call",
      "arguments": {
        "method": "GET",
        "endpoint": "/api/buyer/advertisers"
      }
    }
  }'

What Your Agents Can Do

Once connected, AI agents use the 3 MCP tools to interact with the full REST API:

The Three Tools

ToolPurposeExample
healthVerify connectivityCheck if the API is responding
ask_about_capabilityLearn about endpoints”How do I create a campaign?”
api_callExecute API requestsPOST /api/buyer/campaigns

Example Workflows

Advertiser Management:
  1. Agent asks ask_about_capability “How do I list advertisers?”
  2. Agent uses api_call with GET /api/buyer/advertisers
Campaign Creation:
  1. Agent asks ask_about_capability “How do I create a performance campaign?”
  2. Agent learns about required fields (advertiserId, type, performanceConfig, etc.)
  3. Agent uses api_call with POST /api/buyer/campaigns including the proper body
Example Prompts:
  • “First use ask_about_capability to learn about creating advertisers, then create one called Acme Corp”
  • “Check what campaigns exist for advertiser 24”
  • “Create a $100K performance campaign optimized for SALES”
  • “Launch the campaign we just created”

Notifications

The Scope3 API includes a notification system that surfaces events about your resources — campaigns going unhealthy, creatives syncing, agents registering, etc. Unread notifications are automatically included in help and ask_about_capability tool responses. To ensure your AI agent proactively surfaces notifications to users, add the following to your agent’s instructions:
Create a Project in Claude Desktop and add this to the project instructions:
When using Scope3 tools, always start by calling the help tool.
The response includes unread notifications — summarize those
for the user before answering their question.
Notifications can also be managed directly via the REST API:
OperationMethodEndpoint
List notificationsGET/api/buyer/notifications
Mark as readPOST/api/buyer/notifications/{id}/read
Mark as acknowledgedPOST/api/buyer/notifications/{id}/acknowledge
Mark all as readPOST/api/buyer/notifications/read-all

Building Custom Agents

Node.js Integration

// REST API example
const response = await fetch('https://api.agentic.scope3.com/api/buyer/advertisers', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.SCOPE3_API_KEY}`,
    'Content-Type': 'application/json'
  }
});

const { data } = await response.json();
console.log('Advertisers:', data);

Python Integration

import requests
import os

# REST API example
response = requests.get(
    'https://api.agentic.scope3.com/api/buyer/advertisers',
    headers={
        'Authorization': f'Bearer {os.environ["SCOPE3_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)

advertisers = response.json()['data']
print('Advertisers:', advertisers)

MCP Client Example

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { HttpClientTransport } from '@anthropic-ai/mcp-client-http';

const transport = new HttpClientTransport({
  url: 'https://api.agentic.scope3.com/mcp/buyer',
  headers: {
    'Authorization': `Bearer ${process.env.SCOPE3_API_KEY}`
  }
});

const client = new Client({ name: 'my-agent', version: '1.0.0' });
await client.connect(transport);

// List available tools (health, ask_about_capability, api_call)
const tools = await client.listTools();
console.log('Available tools:', tools.tools.map(t => t.name));

// Check API health
const health = await client.callTool('health', {});
console.log('Health:', health);

// Learn about an endpoint
const docs = await client.callTool('ask_about_capability', {
  query: 'How do I create an advertiser?'
});
console.log('Documentation:', docs);

// Make an API call
const result = await client.callTool('api_call', {
  method: 'GET',
  endpoint: '/api/buyer/advertisers'
});
console.log('Advertisers:', result);

Troubleshooting

Common Issues

Make sure your local API server is running:
cd apps/api && pnpm dev
Verify it’s listening on port 4001.
Check that:
  1. Your API key is valid
  2. The Authorization header is formatted as Bearer your-api-key
  3. For MCP, the mcp-session-id header is included
  1. Verify your admin has added the connector in Admin SettingsIntegrationsMCP Connectors
  2. Check that you’re on a Claude Team or Enterprise plan
  3. Go to SettingsIntegrationsMCP Connectors and click Connect
  4. If prompted, complete the OAuth login with your Scope3 credentials
  1. Verify your claude_desktop_config.json is valid JSON
  2. Restart Claude Desktop completely (quit and reopen)
  3. Check Claude Desktop logs for errors
ChatGPT only supports OAuth authentication for MCP connectors. Make sure:
  1. You selected OAuth when adding the connector
  2. You completed the Scope3 login flow
  3. Your Scope3 account has access to the API
MCP sessions have a timeout. Initialize a new session:
SESSION_ID=$(uuidgen)
# Then re-initialize with the new session ID

Next Steps

Quick Start

Get started with the API in 5 minutes.

API Reference

Explore all available endpoints and tools.

Authentication

Learn about API keys and OAuth authentication.