reddit-ads-mcp

reddit-ads-mcp

A self-hosted MCP server for the Reddit Ads API v3, enabling reading ad accounts, campaigns, ad groups, ads, and performance reports, with optional write support for pausing/activating, budgeting, patching, and creating entities.

Category
Visit Server

README

reddit-ads-mcp

A small, self-hosted MCP server for the Reddit Ads API v3, in Python.

  • Read accounts, campaigns, ad groups, ads, and performance reports.
  • Write (opt-in) — pause/activate, set budgets, patch fields, create entities.
  • No third party. Auth is a direct OAuth2 refresh-token exchange with reddit.com using your app credentials. Nothing is proxied anywhere.
  • Safe by default. Mutations are refused unless REDDIT_ADS_WRITE_ENABLED=true.

Inspired by the read-only C# RedditAdsMcp; rewritten in Python with opt-in write support and a self-hosted token helper.

Status: reads + the core small-writes (status / budget / field patch) are verified against the live Reddit Ads API v3 (2026-06-30). create_* are wired but not yet validated end-to-end — marked experimental below.

Tools

Tool Access Description
list_accounts read ✓ All ad accounts reachable with your credentials
list_campaigns read ✓ Campaigns for an account
list_ad_groups read ✓ Ad groups, optionally by campaign_id
list_ads read ✓ Ads, optionally by ad_group_id
get_performance_report read ✓ Custom date range / fields / breakdowns
get_daily_performance read ✓ Last N days by DATE + CAMPAIGN_ID
set_campaign_status / set_ad_group_status write ✓ Pause / activate / archive
set_campaign_budget / set_ad_group_budget write ✓ Daily budget in dollars (auto micro-conversion)
update_campaign / update_ad_group write ✓ Patch arbitrary fields
create_campaign / create_ad_group write ⚠️ Create entities (experimental — unvalidated)

Write tools are only registered when REDDIT_ADS_WRITE_ENABLED=true.

API notes (learned from the live v3 API)

  • Collections are nested, single entities are top-level: list/create use ad_accounts/{id}/campaigns, but get/update use campaigns/{id} (no account prefix).
  • Budgets are micro-currency: goal_value: 6000000 = $6.00, goal_type: "DAILY_SPEND". The set_*_budget tools take plain dollars and convert for you.
  • Reports are a read-only POST to ad_accounts/{id}/reports with a {data:{…}} body.
  • Write OAuth scope is adsedit (not adswrite).

Setup

1. Create a Reddit Ads API app

ads.reddit.comDeveloper ApplicationsCreate a new app. Set the redirect URI to any HTTPS URL you control — it only needs to show the code query param Reddit appends after you click Allow. Copy the App ID and Secret.

2. Get a refresh token (one-time)

Open this URL (URL-encode your redirect; drop %20adsedit for read-only):

https://www.reddit.com/api/v1/authorize?client_id=YOUR_APP_ID&response_type=code&state=mcp&redirect_uri=YOUR_REDIRECT&duration=permanent&scope=adsread%20adsedit

Click Allow, copy the code from the redirected URL, then:

python scripts/get_refresh_token.py \
  --client-id YOUR_APP_ID --client-secret YOUR_SECRET \
  --code THE_CODE --redirect-uri YOUR_REDIRECT

It prints your permanent REDDIT_ADS_REFRESH_TOKEN.

3. Find your account ID

ads.reddit.com → account dropdown — it looks like a2_xxxxxxxx.

4. Configure your MCP client

With uv (no global install needed):

{
  "mcpServers": {
    "reddit-ads": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/reddit-ads-mcp", "python", "-m", "reddit_ads_mcp"],
      "env": {
        "REDDIT_ADS_CLIENT_ID": "your_app_id",
        "REDDIT_ADS_CLIENT_SECRET": "your_secret",
        "REDDIT_ADS_REFRESH_TOKEN": "your_refresh_token",
        "REDDIT_ADS_ACCOUNT_ID": "a2_xxxxxxxx",
        "REDDIT_ADS_WRITE_ENABLED": "false"
      }
    }
  }
}

Flip REDDIT_ADS_WRITE_ENABLED to "true" only when you want mutations (and only if the refresh token was granted the adsedit scope).

Development

uv sync
uv run python -m reddit_ads_mcp   # starts the stdio server (needs env vars)

License

MIT © Sorin Mihailescu

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured