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.
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 usecampaigns/{id}(no account prefix). - Budgets are micro-currency:
goal_value: 6000000= $6.00,goal_type: "DAILY_SPEND". Theset_*_budgettools take plain dollars and convert for you. - Reports are a read-only
POSTtoad_accounts/{id}/reportswith a{data:{…}}body. - Write OAuth scope is
adsedit(notadswrite).
Setup
1. Create a Reddit Ads API app
ads.reddit.com → Developer Applications → Create 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。