Reddit MCP

Reddit MCP

一个即插即用的 MCP 服务器,它使 AI 助手能够通过 PRAW 库浏览、搜索和阅读 Reddit 内容。

Category
访问服务器

Tools

get_submission

Retrieve a specific submission by ID. Args: submission_id: ID of the submission to retrieve Returns: Detailed information about the submission

get_subreddit

Retrieve a subreddit by name. Args: subreddit_name: Name of the subreddit to retrieve Returns: Detailed information about the subreddit

get_comments_by_submission

Retrieve comments from a specific submission. Args: submission_id: ID of the submission to get comments from replace_more: Whether to replace MoreComments objects with actual comments Returns: List of comments with their replies

get_comment_by_id

Retrieve a specific comment by ID. Args: comment_id: ID of the comment to retrieve Returns: Comment details with any replies

search_posts

Search for posts within a subreddit. Args: params: Search parameters including subreddit name, query, and filters Returns: List of matching posts with their details

search_subreddits

Search for subreddits using either name-based or description-based search. Args: by: Search parameters, either SearchByName or SearchByDescription Returns: List of matching subreddits with their details

README

Reddit MCP

License: MIT

一个即插即用的 MCP 服务器,用于浏览、搜索和阅读 Reddit。

演示

这是一个简短的视频,展示了如何在 Claude Desktop 中使用它:

https://github.com/user-attachments/assets/a2e9f2dd-a9ac-453f-acd9-1791380ebdad

特性

  • 使用 pydantic 进行详细的参数验证
  • 底层使用可靠的 PRAW
  • 内置速率限制保护,这要归功于 PRAW

注意事项

  • 目前仅支持读取功能。 如果您想使用写入功能,请为 issue 投票或 发送 PR! 🙌
  • 工具使用 tokens。 要将此与 Claude 一起使用,您可能需要成为 Pro 用户才能使用许多工具调用。 免费套餐用户使用较轻的工具应该没问题。 您的 token 使用情况由您负责。

安装

前提条件:Reddit API 凭据

如果您还没有,请在您的 Reddit 帐户中创建一个 开发者应用程序。 这将为您提供一个 client_idclient_secret,以便在以下步骤中使用。 如果您已经拥有这些,则可以跳过此步骤。

Claude Desktop

要安装到 Claude Desktop 中:

  • 按照 此处 的说明操作,直到“在任何文本编辑器中打开配置文件”部分。
  • 根据您喜欢的安装方法,将以下内容添加到文件中:

使用 uvx (推荐)

"mcpServers": {
  "reddit": {
    "command": "uvx",
    "args": ["reddit-mcp"],
    "env": {
      "REDDIT_CLIENT_ID": "<client_id>",
      "REDDIT_CLIENT_SECRET": "<client_secret>"
    }
  }
}

使用 PIP

首先安装软件包:

pip install reddit-mcp

然后将以下内容添加到配置文件中:

"mcpServers": {
  "reddit": {
    "command": "python",
    "args": ["-m", "reddit_mcp"],
    "env": {
      "REDDIT_CLIENT_ID": "<client_id>",
      "REDDIT_CLIENT_SECRET": "<client_secret>"
    }
  }
}

其他

您可以将此服务器与任何 MCP 客户端 一起使用,包括代理框架(LangChain、LlamaIndex、AutoGen 等)。 有关 AutoGen 集成的示例,请查看 example

工具

服务器将公开的工具是:

名称 描述
get_comment 访问评论
get_comments_by_submission 访问提交的评论
get_submission 访问提交
get_subreddit 按名称访问 subreddit
search_posts 在 subreddit 中搜索帖子
search_subreddits 按名称或描述搜索 subreddits

贡献

欢迎贡献! 有关更多信息,请参见 CONTRIBUTING.md

致谢

  • PRAW 提供了一个非常可靠的库 💙

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选