Skip to main content
Glama
ajaaysrinivaas

reddit_mcp

Reddit MCP Server

A Model Context Protocol server for reading Reddit data from public JSON endpoints.

What It Does

This codebase currently implements a read-only Reddit server with five MCP tools:

  • search_subreddit

  • get_subreddit_posts

  • get_post_thread

  • get_user_profile

  • get_user_activity

The server does not require Reddit authentication for the implemented tools.

Related MCP server: MCP Reddit Server

How It Works

  • Uses aiohttp for async HTTP requests to Reddit's public .json endpoints.

  • Reuses one shared client session and rotates User-Agent strings per request.

  • Normalizes Reddit responses into compact post, comment, profile, and activity objects.

  • Validates subreddit names, usernames, post IDs, sort values, and limits before making a request.

Installation

pip install -e .

Requires Python 3.12 or newer.

Run

reddit-mcp-server

Optional transports:

reddit-mcp-server --transport http
reddit-mcp-server --transport sse
reddit-mcp-server --transport streamable-http
reddit-mcp-server --log-level DEBUG
reddit-mcp-server --version

Default transport is stdio, which is the recommended mode for MCP clients.

MCP Client Configuration

Example configuration:

{
  "mcpServers": {
    "reddit": {
      "command": "reddit-mcp-server",
      "args": ["--transport", "stdio"]
    }
  }
}

Tool Summary

Tool

Purpose

search_subreddit

Search posts within a subreddit by keyword

get_subreddit_posts

Fetch hot/new/top/rising posts from a subreddit

get_post_thread

Fetch a post and its top-level comments

get_user_profile

Fetch a user's public profile metadata

get_user_activity

Fetch a user's recent posts and/or comments

Repository Layout

reddit_mcp_server/
├── server.py
├── cli_main.py
├── http_client.py
└── tools/
    └── read/
        ├── __init__.py
        ├── common.py
        ├── search_subreddit.py
        ├── get_subreddit_posts.py
        ├── get_post_thread.py
        ├── get_user_profile.py
        └── get_user_activity.py

Documentation

  • API.md contains the parameter and response reference for the implemented tools.

Notes

  • The server trims long post bodies and comment bodies to keep responses compact for LLM usage.

Available Tools

6 tools
get_post_threadA

Fetch a specific post's text and its top comments.

ParametersJSON Schema
NameRequiredDescriptionDefault
post_idYesReddit post ID (e.g. "1qd9z8x") — the alphanumeric part of the URL
comment_limitNoNumber of top-level comments to retrieve
sortNoComment sort order — "confidence", "top", "new", or "old"confidence

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool fetches text and top comments, but does not mention read-only nature, authentication needs, rate limits, or error handling. More context is needed for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with 9 words, no fluff, perfectly concise while conveying the core purpose. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with an output schema, the description covers the essential inputs and output expectations. It lacks some behavioral context but is adequate for selection. Could mention pagination or error scenarios, but schema fills gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters adequately. The description adds no extra meaning beyond the schema for the parameters, maintaining the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly specifies the action (fetch) and resource (specific post's text and top comments). It distinguishes from siblings like get_subreddit_posts which lists multiple posts, and get_user_activity which is user-centric.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use (to get a single post's content) but does not explicitly state when not to use or provide alternatives. The purpose is clear enough, but no direct guidance on exclusion or comparison with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_subreddit_postsB

Fetch the front-page posts of a subreddit to surface active discussions.

ParametersJSON Schema
NameRequiredDescriptionDefault
subredditYesThe subreddit name (e.g. "python", "MachineLearning")
categoryNoFeed type — "hot", "new", "top", or "rising"hot
limitNoNumber of posts to return (max 100)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility for disclosing behavioral traits. It only states it fetches posts, but does not mention whether it is read-only, authentication needs, rate limits, or any side effects. The term 'front-page' may conflict with the 'category' parameter that allows other feeds.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, no redundancy, front-loaded with the core action. Every word contributes to understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description lacks completeness: it omits details about default behavior (front-page may imply 'hot' but category allows others), error cases, or pagination. With no annotations, more context is needed for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the schema; it does not elaborate on parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Fetch' and resource 'front-page posts of a subreddit' with a clear purpose 'to surface active discussions'. It distinguishes from siblings like search_subreddit (which searches across Reddit) and get_user_activity (user-specific).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no when-not-to-use conditions, and no exclusions. It simply states what it does without any contextual use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_activityB

Fetch a Reddit user's recent posts and/or comments.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYesThe Reddit username (without u/ prefix)
activity_typeNoWhat to fetch — "overview" (posts + comments), "submitted" (posts only), or "comments" (comments only)overview
limitNoNumber of items to return (max 100)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It merely states the action but does not disclose important behaviors such as error handling (e.g., nonexistent user), rate limits, ordering of results, or pagination beyond the 'limit' parameter. This lack of detail limits an agent's ability to predict tool behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 8 words, making it extremely concise. However, it could be better structured to include additional context without becoming verbose. The brevity is a strength, but it sacrifices some necessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists (not shown here), the description need not detail return values. However, the tool has 3 parameters and no annotations, and the description fails to cover behavioral aspects like error states or default ordering. It provides the minimum viable context to understand the tool's primary function but leaves gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage, with each parameter described. The description adds the word 'recent', implying chronological ordering, which is not in the schema. However, it does not elaborate on parameter interactions or constraints beyond what the schema provides. Overall, the description adds marginal value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches a user's recent posts and/or comments, which distinguishes it from siblings like 'get_subreddit_posts' and 'get_user_profile'. The verb 'Fetch' and resource 'posts and/or comments' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives. While the purpose is clear, there is no mention of when it should be preferred over sibling tools like 'get_user_profile' or 'get_subreddit_posts'. The context of recent activity is implied but not explicitly contrasted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_profileA

Fetch a Reddit user's public profile: karma, account age, and metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYesThe Reddit username (without u/ prefix)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of disclosing behavioral traits. It states the tool fetches a 'public profile', implying read-only and no authentication needed, but provides no information about error cases, rate limits, or data freshness. Some transparency is present but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one concise sentence that clearly states the action and data included. Every word serves a purpose with no fluff or redundancy. The structure is front-loaded and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple parameter structure and the presence of an output schema, the description adequately covers the tool's purpose and basic return data. It explicitly mentions 'public profile' which is useful context. However, it could mention that the username must be for an existing Reddit user and what happens if not found.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage and already describes the 'username' parameter including the note about the 'u/' prefix. The tool description does not add any additional meaning beyond what is in the schema, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses 'Fetch' as a clear action verb and specifies the resource as 'Reddit user's public profile' with specific data included (karma, account age, metadata). This distinguishes it from sibling tools like get_post_thread and get_user_activity which target different resources or data types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention when not to use it, nor does it reference sibling tools or specific contexts. The only usage context implied is that it fetches a public profile.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

post_replyA

Post a reply to a Reddit thread or comment using an authenticated browser session.

The browser must already be authenticated. If the session has expired, this tool will fail immediately with a descriptive error rather than waiting for a timeout.

ParametersJSON Schema
NameRequiredDescriptionDefault
url_or_idYesFull Reddit URL or a bare post/comment ID (e.g. "1qd9z8x")
contentYesThe text content of the reply to post

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavioral traits. It covers authentication requirement and error handling but omits side effects (e.g., that a new comment is created and becomes visible) or rate limits. Adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, each essential. Front-loaded with the main action, followed by crucial prerequisites and error behavior. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, straightforward action) and existence of an output schema, the description covers key aspects: authentication, failure mode, and the action itself. Missing minor details like success behavior, but still complete enough for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and descriptions are already present in the schema. The tool description adds no new parameter meaning beyond what the schema provides, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: 'Post a reply to a Reddit thread or comment.' It directly distinguishes from sibling tools (all get-oriented) by being the only write operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the prerequisite of an authenticated browser session and describes failure behavior ('fail immediately with a descriptive error'). Does not compare to alternatives, but siblings are clearly read-only, so usage context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_subredditB

Run highly targeted keyword searches within a specific subreddit community.

ParametersJSON Schema
NameRequiredDescriptionDefault
subredditYesThe subreddit name to search within (e.g. "saas", "entrepreneur")
queryYesSearch keywords
sortNoRanking — "relevance", "hot", "top", or "new"relevance
time_filterNoTime window — "day", "week", "month", "year", or "all"all
limitNoNumber of results to return (max 100)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey behavioral traits. It only states 'keyword search' without disclosing whether the operation is read-only, requires authentication, or has rate limits. The absence of such details leaves the agent underinformed about safety or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no redundancy. It is front-loaded with the core action and resource, making it highly efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. However, the description omits details about search behavior (e.g., whether it matches titles, bodies, or both). Given the schema richness and sibling context, a middle score reflects adequate but not thorough completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already fully describes all 5 parameters (100% coverage). The description adds no extra meaning beyond what the schema provides, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: running targeted keyword searches within a specific subreddit. It uses a specific verb ('run... searches') and resource ('subreddit community'). While it distinguishes from listing-focused siblings like get_subreddit_posts, it doesn't explicitly contrast with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like get_subreddit_posts. The description only implies usage for keyword searches but offers no exclusions or context about prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct Reddit resource or action: fetching a post thread, subreddit posts, user activity, user profile, posting a reply, and searching a subreddit. No two tools have overlapping functionality.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (get_*, post_*, search_*) with snake_case. The naming is predictable and clear.

Tool Count5/5

6 tools is well-scoped for a Reddit interaction server, covering reading, searching, and posting without being overwhelming or too sparse.

Completeness4/5

The tool set covers core read and post operations, but lacks ability to create new posts (only replies), vote, or retrieve full comment trees. These are minor gaps for its scope.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A server allowing interaction with Reddit via the public API, enabling browsing frontpage posts, retrieving subreddit details, and reading post comments through a Model Context Protocol.
    8
    184
    MIT
  • 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.
    9
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that enables AI assistants to fetch Reddit content including consensus on topics, top posts, helpful links, and related subreddits.
    2

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajaaysrinivaas/reddit_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server