Skip to main content

MCP server for Taboola's Realize API - campaign analysis and reporting

Project description

Realize MCP Server

A Model Context Protocol (MCP) server that provides read-only access to Taboola's Realize API, enabling AI assistants to analyze campaigns, retrieve performance data, and generate reports through natural language.

License Python MCP Latest Version

Quick Start

Cursor IDE Setup

Add to Cursor Settings → Features → Model Context Protocol:

{
  "mcpServers": {
    "realize-mcp": {
      "command": "realize-mcp-server",
      "env": {
        "REALIZE_CLIENT_ID": "your_client_id",
        "REALIZE_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Claude Desktop Setup

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "realize-mcp": {
      "command": "realize-mcp-server",
      "env": {
        "REALIZE_CLIENT_ID": "your_client_id",
        "REALIZE_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Installation

pip install realize-mcp

Setup

# Set credentials
export REALIZE_CLIENT_ID="your_client_id"
export REALIZE_CLIENT_SECRET="your_client_secret"

Basic Usage

User: "Show me campaigns for Marketing Corp"
AI: 
  1. Searches accounts for "Marketing Corp" 
  2. Retrieves campaigns using the found account_id
  3. Returns campaign list with performance metrics

Important: All operations require getting account_id values from search_accounts first - never use numeric IDs directly.

Available Tools

🔍 Account Management

  • search_accounts - [REQUIRED FIRST] Find accounts and get account_id values for other tools (with pagination support: page_size max 10)

📊 Campaign Tools

  • get_all_campaigns - List all campaigns for an account
  • get_campaign - Get detailed campaign information
  • get_campaign_items - List campaign creative items
  • get_campaign_item - Get specific item details

📈 Reporting Tools (CSV Format)

  • get_top_campaign_content_report - Top performing content with sorting & pagination
  • get_campaign_breakdown_report - Campaign performance breakdown with sorting & pagination
  • get_campaign_history_report - Historical campaign data with pagination
  • get_campaign_site_day_breakdown_report - Site/day performance breakdown with sorting & pagination

🔐 Authentication

  • get_auth_token - Authenticate with Realize API
  • get_token_details - Check token information

Prerequisites

  • Python 3.10+ (Python 3.11+ recommended)
  • Taboola Realize API credentials (client ID and secret)
  • MCP-compatible client (Claude Desktop, Cursor, VS Code, etc.)

Usage Examples

1. Find Account and List Campaigns

User: "Show campaigns for account 12345"
AI Process:
  Step 1: search_accounts("12345") → Returns account_id: "advertiser_12345_prod"
  Step 2: get_all_campaigns(account_id="advertiser_12345_prod")
  Result: List of campaigns with details

2. Get Performance Report

User: "Get campaign performance for Marketing Corp last month"
AI Process:
  Step 1: search_accounts("Marketing Corp") → account_id: "mktg_corp_001"  
  Step 2: get_campaign_breakdown_report(
    account_id="mktg_corp_001",
    start_date="2024-01-01", 
    end_date="2024-01-31"
  )
  Result: CSV report with campaign metrics

3. Top Performing Content

User: "Show top 20 performing content items"
AI Process:
  get_top_campaign_content_report(
    account_id="account_id_from_search",
    start_date="2024-01-01",
    end_date="2024-01-31", 
    page_size=20,
    sort_field="spent",
    sort_direction="DESC"
  )
  Result: Top content sorted by spend

Important Workflow Notes

⚠️ Account ID Requirement

All campaign and report tools require account_id values from search_accounts:

Correct Workflow:

1. search_accounts("company name" or "numeric_id") 
2. Extract account_id from response
3. Use account_id in other tools

Incorrect:

get_all_campaigns(account_id="12345")  # Numeric IDs won't work

📊 Report Features

  • CSV Format: Reports return efficient CSV data with headers and pagination info
  • Pagination: Default page_size=20, max=100 to prevent overwhelming responses
  • Sorting: Available for most reports by clicks, spent, or impressions
  • Size Optimization: Automatic truncation for large datasets

Quick Troubleshooting

If you encounter issues with the MCP server, try this quick diagnostic:

# Test server manually
REALIZE_CLIENT_ID=test REALIZE_CLIENT_SECRET=test realize-mcp-server

You should see: INFO:realize.realize_server:Starting Realize MCP Server...

Detailed Documentation

📖 For comprehensive information, see design.md:

  • Recent Fixes & Version History - Detailed release notes and upgrade instructions
  • Installation Options - PyPI & Source installation with troubleshooting
  • Architecture & Design Principles - Technical implementation details
  • Advanced Features - CSV format, pagination, sorting, and optimization
  • Development Guide & Testing - Setup, testing, and contribution guidelines
  • Comprehensive Troubleshooting - Detailed solutions for common issues
  • Security Best Practices - Credential management and operational security
  • Complete API Reference - Full technical API documentation
  • Technology Stack Details - Dependencies and system requirements

License

Licensed under the Apache License 2.0. See LICENSE for details.


Realize MCP Server - Safe, efficient, read-only access to Taboola's advertising platform through natural language.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

realize_mcp-1.0.7.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

realize_mcp-1.0.7-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file realize_mcp-1.0.7.tar.gz.

File metadata

  • Download URL: realize_mcp-1.0.7.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for realize_mcp-1.0.7.tar.gz
Algorithm Hash digest
SHA256 8486668d4715cc8ddb8b7fab6cc7216166d036b28b382beb078913c329617ed1
MD5 8169cbd0133f4827177894e3d9f3f7ac
BLAKE2b-256 d3b5191abb1d59fd575e6aabef9c8710bf6c357c74381b8540f0e86b064886b4

See more details on using hashes here.

File details

Details for the file realize_mcp-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: realize_mcp-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for realize_mcp-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b6e3c1f41cbebb072e3a6c8a86a07eabdd9d89b04c6349137e771cd082ce6a2a
MD5 0193d8f89c5bd9fc7f1c17d44ba1e492
BLAKE2b-256 deec5d1244c459d98ec332039add439e85a42fa2193575b00a918ce39b51ab94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page