reddit-mcp
A read-only MCP server that connects to the Reddit Data API to search posts, browse subreddits, read comments, view user profiles, and check trending content through the Model Context Protocol.
README
reddit-mcp
A read-only MCP server built for Claude that connects to the Reddit Data API (oauth.reddit.com). Search posts, browse subreddits, read comments, view user profiles, and check trending content — all through the Model Context Protocol.
Quick Install (Claude Code)
npx -y @hamzashahbaz/reddit-mcp
Or add it to Claude Code with environment variables:
claude mcp add reddit -e REDDIT_CLIENT_ID=your_id -e REDDIT_CLIENT_SECRET=your_secret -e REDDIT_USERNAME=your_username -e REDDIT_PASSWORD=your_password -- npx -y @hamzashahbaz/reddit-mcp
Features
- Search Reddit -- query posts across all of Reddit or within a specific subreddit
- Browse subreddits -- get posts sorted by hot, new, top, or rising
- Read comments -- fetch a post's details and top-level comments
- User profiles -- view profile info and recent activity (posts, comments, or both)
- Trending posts -- see what's popular on r/popular
Prerequisites
- Node.js 18+
- A Reddit account
- A Reddit "script" application (free) -- see Setup
Setup
1. Request Reddit API access
Reddit requires API access approval before you can create apps.
- Go to Reddit Help — Submit a request
- Select API Access Request
- Fill in the form:
- Benefit/purpose: Read-only content browsing tool that helps users discover and read Reddit content through AI assistants — no posting, commenting, or voting.
- Detailed description: reddit-mcp is an open-source MCP (Model Context Protocol) server that provides read-only access to Reddit's public content. It allows AI assistants to search posts, browse subreddits, read comments, and view user profiles. All operations are read-only GET requests. Source code: https://github.com/hamzashahbaz/reddit-mcp
- Devvit question: This tool is an external read-only client that integrates Reddit content into AI workflows — a use case outside Devvit's scope.
- Source code link:
https://github.com/hamzashahbaz/reddit-mcp - Subreddits: General-purpose — works with any public subreddit
- Submit and wait for approval (typically a few days)
2. Create a Reddit script app
Once approved:
- Go to reddit.com/prefs/apps
- Click "create another app..."
- Fill in:
- name: anything (e.g.,
mcp-reader) - type: select script
- redirect uri:
http://localhost:8080(not used, but required)
- name: anything (e.g.,
- Note your client ID (under the app name) and client secret
3. Clone and build
git clone https://github.com/hamzashahbaz/reddit-mcp.git
cd reddit-mcp
npm install
npm run build
Configuration
Add to your .mcp.json (Claude Code) or claude_desktop_config.json (Claude Desktop):
{
"mcpServers": {
"reddit": {
"command": "node",
"args": ["/path/to/reddit-mcp/dist/server.js"],
"env": {
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_USERNAME": "your_reddit_username",
"REDDIT_PASSWORD": "your_reddit_password"
}
}
}
}
Replace /path/to/reddit-mcp with the actual path to your cloned directory.
Tools
| Tool | Description | Key Parameters |
|---|---|---|
search_reddit |
Search posts by query | query, subreddit?, sort, time_filter, limit |
get_subreddit_posts |
Browse a subreddit | subreddit, sort, time_filter, limit |
get_post_comments |
Get post details + comments | post_id, sort, limit |
get_user_profile |
User info + recent activity | username, content_type, limit |
get_trending |
Trending posts from r/popular | (none) |
Parameter details
- sort (search):
relevance,hot,top,new - sort (subreddit):
hot,new,top,rising - sort (comments):
best,top,new,controversial - time_filter:
hour,day,week,month,year,all - content_type:
overview,posts,comments - limit: 1-25 for most tools, 1-50 for comments
How it works
- Uses the Reddit Data API (REST) at
https://oauth.reddit.com - Authenticates via OAuth 2.0 password grant (script app)
- All operations are read-only GET requests
- Tokens cached in memory, auto-refreshed before expiry
- Respects Reddit rate limits (100 req/min authenticated)
- Built for Claude Code and Claude Desktop via the Model Context Protocol (MCP)
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。