Reddit MCP server — access Reddit data through MCP protocol
Project description
reddit-mcp
Reddit MCP server — access Reddit data (posts, comments, search) through the MCP protocol.
Quick Start
# 0. One-line installer (macOS / Linux)
curl -fsSL https://mkterswingman.com/install/reddit-mcp.sh | bash
# 0b. One-line installer (Windows PowerShell)
irm https://mkterswingman.com/install/reddit-mcp.ps1 | iex
# 1. Full setup (OAuth login + Reddit cookies)
uvx --from 5mghost-rover reddit-mcp setup
# 2. Add to your AI client config (Claude Desktop, Cursor, etc.)
{
"mcpServers": {
"reddit": {
"command": "uvx",
"args": ["--from", "5mghost-rover", "reddit-mcp", "serve"],
"env": {
"REDDIT_MCP_TOKEN": "pat_xxx"
}
}
}
}
Authentication
reddit-mcp uses two layers of authentication:
- PAT / OAuth token — Controls access to the MCP service (shared account system with yt-mcp / x-mcp)
- Reddit cookies — Used to fetch data from Reddit's JSON API
First-party local MCPs on the same machine now share one auth file at ~/.mkterswingman/auth.json.
That means logging into yt-mcp or another first-party local MCP can satisfy reddit-mcp too. Reddit local state now lives under ~/.mkterswingman/reddit-mcp/.
PAT Setup (Simplest)
- Visit https://mkterswingman.com/pat/login
- Log in and generate a PAT
- Either save it once through any first-party local MCP setup flow, or set
REDDIT_MCP_TOKEN=pat_xxxin your MCP config'senv - Run
uvx --from 5mghost-rover reddit-mcp setup-cookiesto set up Reddit cookies
OAuth Setup (Full)
uvx --from 5mghost-rover reddit-mcp setup
This runs the OAuth flow and cookie setup in one step.
CLI Commands
| Command | Description |
|---|---|
reddit-mcp serve |
Start MCP server (stdio transport) |
reddit-mcp setup [--shutdown-browser] |
Full setup: OAuth login + cookie setup |
reddit-mcp setup-cookies [--shutdown-browser] |
Cookie-only setup (already have a PAT) |
reddit-mcp uninstall |
Remove MCP registrations and local ~/.mkterswingman/reddit-mcp config |
reddit-mcp update |
Check for updates and install latest version |
reddit-mcp install-skills |
Install/update bundled use-reddit-mcp skill in local AI clients |
reddit-mcp check |
Check token & cookie status |
reddit-mcp version |
Show version |
Bundled Skill
The package includes a bundled skill use-reddit-mcp that helps AI clients route Reddit analysis requests to the right tools.
setupinstalls the skill automaticallyupdaterefreshes the installed skill- You can manually run
reddit-mcp install-skillsat any time
MCP Tools
Data Tools
get_subreddit_posts— Get posts from a subreddit (hot/new/top/rising, up to 100 per request)get_post_content— Get a post's content and comment treesearch_reddit— Search Reddit posts (global or within a subreddit)get_subreddit_info— Get subreddit metadata (subscribers, description, etc.)
Management Tools
check_cookies— Check cookie validity, age, and usernameget_rate_limit_status— Check remaining API quota
Rate Limits
Reddit allows 100 requests per 10-minute window. The client automatically:
- Reads
x-ratelimit-*headers from responses - Throttles when remaining quota < 20
- Retries on 429 (Too Many Requests)
For typical usage (1-10 requests per conversation), you'll never hit the limit.
Cookie Management
Reddit cookies are stored at ~/.mkterswingman/reddit-mcp/cookies.json (permissions: 600).
- Cookie setup/import always works on a copied local browser profile (Chrome/Edge/Chromium), never on your live browser process
- If a reusable Reddit session already exists in local browser profiles,
setup-cookiesimports it headlessly - If no reusable session is found,
setup-cookiesasks you to log in from your normal local browser profile and waits to import that session automatically - On Windows, if browser profile files are locked, save unfinished work in Chrome or Edge, then rerun with
--shutdown-browserto letreddit-mcptry to close Chrome and Edge before importing cookies - They're stored locally and never uploaded to any server
- If cookies expire (403 errors),
reddit-mcpfirst tries headless re-import from local profiles; if that fails, runreddit-mcp setup-cookiesmanually - A warning is shown when cookies are close to expiry (or fallback age is very old)
Package Naming
The published PyPI package name is 5mghost-rover, and the installed executable is reddit-mcp.
uvx --from 5mghost-rover reddit-mcp ...works for one-off runspip install 5mghost-roverinstalls thereddit-mcpcommand globally
Requirements
- Python 3.11+
- Playwright browser runtime (run
playwright install chromiumonce if missing) - A valid PAT or OAuth token
Verification
- Run
python3 -m pytestfor the normal automated suite - Run
docs/E2E_CHECKLIST.mdbefore releasing install or cookie-flow changes
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 5mghost_rover-0.0.13.tar.gz.
File metadata
- Download URL: 5mghost_rover-0.0.13.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6b3e9fadb836b10bb75d5711b55a458aacf49fce9267230e7c8fd2bc77c9b3a
|
|
| MD5 |
fc53be0a6132880e4388c008151d2efc
|
|
| BLAKE2b-256 |
19017df74dda8c6afc7d30798ff9f966423c142a8f823cbd8cbb0f29a033bb63
|
File details
Details for the file 5mghost_rover-0.0.13-py3-none-any.whl.
File metadata
- Download URL: 5mghost_rover-0.0.13-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67aacd5aecd75581394e548b0a91d12cd47cd86aa23ebbedee7ee0ea34203cea
|
|
| MD5 |
abdd34144e475e589408d71d0f1328b2
|
|
| BLAKE2b-256 |
1acd184ab27353b1b9de953e8d76e74975dc797b151e94ce3261d05f878deba8
|