Skip to main content
Glama

Reddit MCP

许可证:MIT

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

演示

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

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

Related MCP server: systemprompt-mcp-reddit

特征

  • 使用pydantic进行详细的参数验证

  • 使用可靠的PRAW库

  • 得益于 PRAW,内置速率限制保护

注意事项

  • 目前仅支持读取功能。如果您想使用写入功能,请点赞此问题或发送 PR !🙌

  • 工具使用代币。要使用 Claude 的此功能,您可能需要成为专业用户才能使用许多工具调用。免费套餐用户只需少量使用即可。代币的使用由您自行负责。

安装

先决条件:Reddit API 凭证

如果您还没有开发者应用,请在您的 Reddit 帐户中创建一个。这将为您提供一个client_id和client_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是一个极其可靠的库 💙

Available Tools

6 tools
get_comment_by_idA
Retrieve a specific comment by ID.

Args:
    comment_id: ID of the comment to retrieve

Returns:
    Comment details with any replies

Inputs: comment_id (required).

get_comments_by_submissionA
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

Inputs: submission_id (required), replace_more.

get_submissionA
Retrieve a specific submission by ID.

Args:
    submission_id: ID of the submission to retrieve

Returns:
    Detailed information about the submission

Inputs: submission_id (required).

get_subredditB
Retrieve a subreddit by name.

Args:
    subreddit_name: Name of the subreddit to retrieve

Returns:
    Detailed information about the subreddit

Inputs: subreddit_name (required).

search_postsC
Search for posts within a subreddit.

Args:
    params: Search parameters including subreddit name, query, and filters

Returns:
    List of matching posts with their details

Inputs: params (required).

search_subredditsC
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

Inputs: by (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Reddit entities: comments, submissions, subreddits, and searches. No overlap exists between tools like get_comment_by_id and get_comments_by_submission, which serve different retrieval needs.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with underscores (e.g., get_comment_by_id, search_posts). The naming is predictable and readable throughout the set, with no deviations in style.

    Tool Count4/5

    Six tools is reasonable for a Reddit API server, covering core read operations. It's slightly lean but includes key functionalities like retrieval and search, though it lacks write operations which might be expected in a full-featured server.

    Completeness3/5

    The tool set provides good read coverage for comments, submissions, and subreddits, but there are notable gaps: no create, update, or delete operations (e.g., posting comments or submissions). This limits agents to read-only workflows, which may cause failures in interactive scenarios.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI assistants like Claude to browse and analyze Reddit content, including searching subreddits, retrieving post details with comments, and viewing trending posts.
      10
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables AI assistants to access and interact with Reddit content through features like user analysis, post retrieval, subreddit statistics, and authenticated posting capabilities.
      15
      302
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides AI agents with full Reddit API capabilities including search, browsing, reading, posting, commenting, voting, editing, and deleting.
      18
      8 npm
      MIT