{
  "markdown": "<!-- mcp-name: io.github.mkerchenski/reddit-ads-mcp -->\n# RedditAdsMcp\n\n[![NuGet](https://img.shields.io/nuget/v/RedditAdsMcp)](https://www.nuget.org/packages/RedditAdsMcp)\n[![Build](https://github.com/mkerchenski/RedditAdsMcp/actions/workflows/lint.yml/badge.svg)](https://github.com/mkerchenski/RedditAdsMcp/actions/workflows/lint.yml)\n\nA C# MCP (Model Context Protocol) server for the Reddit Ads API. Provides read-only tools for listing accounts, campaigns, ad groups, ads, and pulling performance reports.\n\nBuilt with .NET 10 and the official [ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol/) SDK.\n\n## Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `ListAccounts` | List all Reddit ad accounts accessible with current credentials |\n| `ListCampaigns` | List campaigns for an account |\n| `ListAdGroups` | List ad groups, optionally filtered by campaign |\n| `ListAds` | List ads, optionally filtered by ad group |\n| `GetPerformanceReport` | Get a performance report with custom date range, fields, and breakdowns |\n| `GetDailyPerformance` | Convenience wrapper — last N days of impressions, clicks, spend, CTR, CPC, eCPM |\n\nAll tools accept an optional `accountId` parameter. If omitted, the default account from `REDDIT_ACCOUNT_ID` is used.\n\n## Prerequisites\n\n1. A Reddit account with an active [Reddit Ads](https://ads.reddit.com) advertiser account\n2. [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)\n\n## Install\n\n### Option A: Install as a dotnet tool (recommended)\n\n```bash\ndotnet tool install -g RedditAdsMcp\n```\n\nThen configure Claude Code (see [Step 5b](#5b-configure-claude-code-dotnet-tool) below).\n\n### Option B: Clone and build from source\n\n```bash\ngit clone https://github.com/mkerchenski/RedditAdsMcp.git\ncd RedditAdsMcp\ndotnet build\n```\n\nThen configure Claude Code (see [Step 5a](#5a-configure-claude-code-from-source) below).\n\n## Setup\n\n### 1. Create a Reddit Ads API App\n\n1. Go to [ads.reddit.com](https://ads.reddit.com)\n2. In the left sidebar, click **Developer Applications** (under your account/business settings)\n3. Click **Create a new app** and fill in:\n\n| Field | Value |\n|-------|-------|\n| **App name** | `Reddit Ads MCP` |\n| **Description** | `MCP server for Reddit Ads reporting` |\n| **About url** | `https://github.com/mkerchenski/RedditAdsMcp` (or leave blank) |\n| **Redirect URI** | `https://hurrah.dev/oauth/reddit` |\n\nReddit requires a public HTTPS redirect URI (localhost won't work). The URL above is a simple callback page maintained by the package author that displays the authorization code for you to copy — it does not store any data. You can use any HTTPS URL you control instead; just update the redirect URI in Steps 2–3 to match.\n\n4. Click **Create app**\n5. Copy your **App ID** and **Secret** — you'll need both in the next steps\n\n### 2. Authorize the App\n\nOpen this URL in your browser, replacing `YOUR_APP_ID` with the App ID from Step 1:\n\n```\nhttps://www.reddit.com/api/v1/authorize?client_id=YOUR_APP_ID&response_type=code&state=mcp&redirect_uri=https%3A%2F%2Fhurrah.dev%2Foauth%2Freddit&duration=permanent&scope=adsread\n```\n\nClick **Allow**. You'll be redirected to a page that displays your authorization code — click **Copy**.\n\n### 3. Exchange the Code for a Refresh Token\n\nRun this command, replacing the three placeholders with your App ID, Secret, and authorization code:\n\n```bash\ncurl -X POST https://www.reddit.com/api/v1/access_token \\\n  -u \"YOUR_APP_ID:YOUR_SECRET\" \\\n  -A \"ads-mcp/1.0\" \\\n  -d \"grant_type=authorization_code&code=YOUR_AUTHORIZATION_CODE&redirect_uri=https://hurrah.dev/oauth/reddit\"\n```\n\n> The `redirect_uri` must match exactly what you entered in Step 1.\n\nThe response JSON contains a `refresh_token` field. Save it — it's permanent until revoked.\n\n### 4. Find Your Account ID\n\n1. Go to [ads.reddit.com](https://ads.reddit.com) and click **All accounts** (top-left dropdown)\n2. Select your business on the left — your ad account appears on the right\n3. The account ID is the value under the account name (e.g. `a2_eaf73mplhhps`)\n\n### 5a. Configure Claude Code (from source)\n\nAdd to your Claude Code MCP settings (`.mcp.json` in your project, or `~/.claude/settings.json`), replacing the four placeholder values:\n\n```json\n\"reddit-ads\": {\n  \"type\": \"stdio\",\n  \"command\": \"dotnet\",\n  \"args\": [\"run\", \"--project\", \"/path/to/RedditAdsMcp\", \"--no-build\"],\n  \"env\": {\n    \"REDDIT_CLIENT_ID\": \"your_app_id\",\n    \"REDDIT_CLIENT_SECRET\": \"your_secret\",\n    \"REDDIT_REFRESH_TOKEN\": \"your_refresh_token\",\n    \"REDDIT_ACCOUNT_ID\": \"your_account_id\"\n  }\n}\n```\n\n### 5b. Configure Claude Code (dotnet tool)\n\n```json\n\"reddit-ads\": {\n  \"type\": \"stdio\",\n  \"command\": \"reddit-ads-mcp\",\n  \"env\": {\n    \"REDDIT_CLIENT_ID\": \"your_app_id\",\n    \"REDDIT_CLIENT_SECRET\": \"your_secret\",\n    \"REDDIT_REFRESH_TOKEN\": \"your_refresh_token\",\n    \"REDDIT_ACCOUNT_ID\": \"your_account_id\"\n  }\n}\n```\n\nVerify with `/mcp` in Claude Code — the `reddit-ads` server should appear with 6 tools.\n\n## Development\n\n```bash\ndotnet build    # compile\ndotnet run      # start MCP server on stdio\ndotnet pack     # create NuGet package\n```\n\n## License\n\nMIT\n",
  "bytes": 5147,
  "sha": "42e6d4b9985c52ccffa5b1575d086f0577a907aa6a7c3ac2906302fef8873366",
  "repo_slug": "mkerchenski/redditadsmcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mkerchenski_reddit_ads_mcp_e0a44bf1/readme"
}