Reddit MCP

MIT License
6
  • Apple

Integrations

  • Supports integration with LangChain agent frameworks for utilizing Reddit browsing and search capabilities.

  • Provides tools for browsing, searching, and reading Reddit content, including accessing comments, submissions, and subreddits, as well as searching posts and subreddits through the Reddit API.

Reddit MCP

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

演示

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

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

特征

  • 使用pydantic进行详细的参数验证
  • 使用可靠的PRAW
  • 得益于 PRAW,内置速率限制保护

注意事项

  • 目前仅支持读取功能。如果您想使用写入功能,请点赞此问题发送 PR !🙌
  • 工具使用代币。要使用 Claude 的此功能,您可能需要成为专业用户才能使用许多工具调用。免费套餐用户只需少量使用即可。代币的使用由您自行负责。

安装

先决条件:Reddit API 凭证

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

克劳德桌面

要安装到 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 集成的示例,请查看示例

工具

服务器将公开的工具是:

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

贡献

欢迎贡献!更多信息请参阅CONTRIBUTING.md

致谢

  • PRAW是一个极其可靠的库 💙

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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

  1. Demo
    1. Features
      1. Caveats
        1. Installation
          1. Prerequisite: Reddit API credentials
          2. Claude Desktop
          3. Using uvx (recommended)
          4. Using PIP
          5. Others
        2. Tools
          1. Contributing
            1. Acknowledgments
              ID: braoypt6vc