Reddit MCP Server
Reddit MCP Server
MCP 服务器,让 Claude(及其他 MCP 客户端)能够扫描、搜索和阅读 Reddit 帖子和评论。
工具
工具 | 描述 |
| 按排序方式(热门/最新/新帖/上升)获取子版块帖子,可选包含评论 |
| 按关键词在某个或所有子版块中搜索 Reddit 帖子 |
| 获取特定帖子的完整详情和评论 |
| 按主题关键词查找子版块 |
| 获取子版块的元数据 |
Related MCP server: reddit-mcp
设置
npm install
npm run build需要 Node.js 18 或更高版本。
服务器使用 Reddit 的公共 JSON 端点,不需要 Reddit API 凭据。
Claude Desktop 配置
在 Claude Desktop 配置文件中添加(macOS/Linux 上为 ~/.config/Claude/claude_desktop_config.json,Windows 上为 %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"reddit": {
"command": "node",
"args": ["/absolute/path/to/reddit-mcp/dist/server.js"]
}
}
}将示例路径替换为你克隆此仓库的路径。
VS Code MCP 配置
在 VS Code 设置中添加(.vscode/mcp.json):
{
"servers": {
"reddit": {
"type": "stdio",
"command": "node",
"args": ["${workspaceFolder}/dist/server.js"]
}
}
}在仓库工作区之外配置时,请将 ${workspaceFolder} 替换为克隆仓库的绝对路径。
使用示例
连接后,Claude 可以使用这些工具:
扫描子版块: "显示本周 r/programming 的热门 20 篇帖子"
搜索帖子: "在 Reddit 上搜索 'MCP 服务器教程'"
获取帖子详情: "获取第一篇帖子的评论"
架构
src/server.ts— MCP 服务器入口、工具注册、stdio 传输src/tools/— 带输入验证的各个工具处理器src/reddit/— 带提供者抽象的 Reddit 数据客户端src/reddit/providers/publicJson.ts— 公共 JSON 端点提供者(MVP)src/core/— 共享类型、验证和错误分类src/tests/— 缓存和评论去重的单元测试
提供者接口(RedditProvider)使得以后无需更改任何工具代码即可轻松切换到 Reddit OAuth API。
This server cannot be deployed
Maintenance
Related MCP Connectors
Reddit MCP server: search posts, subreddit feeds, comments & user profiles as JSON. No API key.
Search public Reddit posts, browse subreddit feeds, and read posts, comments, and profiles.
Real-time Reddit posts, subreddit search, comments & mentions MCP. Local npx or hosted OAuth.
Reddit MCP — public Reddit data via the Atom/RSS feeds.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides both read-only and authenticated access to Reddit content and interactions without requiring a developer API key. It enables users to browse posts, search subreddits, and perform write actions like commenting and voting by leveraging browser session cookies.812 PyPI3-
- AlicenseNot gradedqualityDmaintenanceEnables fetching and reading Reddit content such as posts, comments, and subreddit listings via the MCP protocol.18 npmMIT
- AlicenseNot gradedqualityBmaintenanceA local, read-only Reddit MCP server that provides tools for searching posts, retrieving posts/comments, subreddit information, and user content via the official Reddit Data API with caching and privacy-focused features.-
- AlicenseNot gradedqualityBmaintenanceMCP server for Reddit data — subreddits, users, search, live comments. No OAuth required.MIT