Skip to main content
Glama
MufanQiu

reddit-readonly-mcp

by MufanQiu

reddit-readonly-mcp

A small, policy-conscious Model Context Protocol (MCP) server for approved, read-only access to public Reddit discussions.

IMPORTANT

This project does not bypass Reddit access controls. Obtain explicit Reddit approval and OAuth credentials before using it. It provides no anonymous scraping or unauthenticated JSON fallback.

Design

  • Four read-only tools: list posts, search within one community, get a post, and get its comments.

  • App-only OAuth authentication against Reddit's official API.

  • Access to publicly viewable subreddits, with an optional operator allowlist and conservative result and comment limits.

  • Serialized requests with a configurable minimum interval.

  • A bounded in-memory cache with a hard one-hour maximum lifetime.

  • No write operations, user-history tools, telemetry, persistent database, or recovery of removed content.

Related MCP server: Reddit MCP Tool

Tools

Tool

Purpose

list_subreddit

List hot, new, rising, top, or controversial posts from one public subreddit.

search_posts

Search public posts inside one public subreddit.

get_post

Retrieve one public post from a Reddit permalink.

get_comments

Retrieve a bounded public comment tree from a Reddit permalink.

Configuration

Copy .env.example into your secret manager or MCP client configuration. Do not commit an .env file.

Variable

Required

Notes

REDDIT_CLIENT_ID

Yes

Approved OAuth client ID.

REDDIT_CLIENT_SECRET

Yes

Approved OAuth client secret.

REDDIT_USERNAME

Yes

Used in Reddit's required descriptive User-Agent.

REDDIT_ALLOWED_SUBREDDITS

No

* by default, or a comma-separated allowlist.

REDDIT_CACHE_TTL_SECONDS

No

Defaults to 900; capped at 3600.

REDDIT_REQUEST_INTERVAL_MS

No

Defaults to 1100; cannot be below 1000.

Install from source

npm ci
npm run check
npm run build

Codex

codex mcp add reddit-readonly \
  --env REDDIT_CLIENT_ID=... \
  --env REDDIT_CLIENT_SECRET=... \
  --env REDDIT_USERNAME=... \
  --env REDDIT_ALLOWED_SUBREDDITS='*' \
  -- node /absolute/path/to/reddit-readonly-mcp/dist/index.js

Claude Code

claude mcp add --transport stdio reddit-readonly -s user \
  --env REDDIT_CLIENT_ID=... \
  --env REDDIT_CLIENT_SECRET=... \
  --env REDDIT_USERNAME=... \
  --env REDDIT_ALLOWED_SUBREDDITS='*' \
  -- node /absolute/path/to/reddit-readonly-mcp/dist/index.js

Docker

docker build -t reddit-readonly-mcp .
docker run --rm -i \
  --env-file /path/to/private/reddit.env \
  reddit-readonly-mcp

Development

npm run typecheck
npm test
npm run build

Network integration tests are intentionally absent until approved Reddit credentials are available. Unit tests cover policy boundaries such as URL parsing, optional allowlists, cache limits, and response shaping.

Prior art

The tool naming and local MCP ergonomics were informed by the MIT-licensed reddit-mcp-buddy. This project uses an independent implementation and deliberately omits anonymous access, password grants, user analysis, and all write functionality.

License

MIT

Available Tools

4 tools
get_commentsB

Get a bounded public comment tree from an approved Reddit permalink.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoconfidence
depthNo
limitNo
post_urlYes

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It adds useful behavioral hints ('bounded', 'public', 'approved') but does not disclose default sort/depth/limit behavior, rate limits, or error responses. It provides some value but is 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?

A single, front-loaded sentence that directly states the tool's purpose. No filler or redundancy, fitting for a straightforward tool.

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?

For a 4-parameter tool with no output schema and no annotations, the description is too sparse. It does not clarify what 'bounded' means in practice (the schema shows depth/limit limits but not how they affect results), what 'approved' implies for eligibility, or what the return structure looks like. The description leaves significant gaps.

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

Parameters1/5

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

Schema description coverage is 0%, and the description only alludes to post_url ('from an approved Reddit permalink'). It does not explain the meaning or effect of sort, depth, or limit parameters, leaving the agent to infer from the schema alone. This fails to compensate for the lack of schema-level descriptions.

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 ('Get') and resource ('public comment tree from an approved Reddit permalink'), clearly distinguishing it from siblings like get_post (which would fetch the post itself). It also mentions key scoping constraints (bounded, public, approved).

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 explicit guidance is given on when to use this tool versus alternatives such as get_post, search_posts, or list_subreddit. The description implies it is for comment trees on a specific post, but does not state exclusions or prerequisites beyond needing a permalink.

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

get_postA

Get one public post from an approved Reddit permalink.

ParametersJSON Schema
NameRequiredDescriptionDefault
post_urlYes

TDQS

A3.5/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 mentions 'public post' and 'approved permalink' but does not explain what 'approved' means, what happens for unapproved or deleted posts, or what the response includes. The behavioral disclosure is minimal.

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, concise sentence that is front-loaded with the main action. It contains no unnecessary words or filler.

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?

The tool is simple with one parameter and no output schema, but the description omits details about the approval concept, return format, or error behavior. It is adequate for a basic getter but leaves important context undefined.

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 schema has zero description coverage for the parameter 'post_url'. The description adds the term 'permalink' and qualifiers 'approved' and 'public', which provide some context beyond the raw schema, but it does not define what constitutes an approved permalink. Partial compensation for the low schema coverage.

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 action ('Get'), the resource ('one public post'), and the source ('approved Reddit permalink'), which distinguishes it from sibling tools like list_subreddit, search_posts, and get_comments. It precisely identifies what this tool does and its scope.

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 usage when you have an approved Reddit permalink, but it does not explicitly state when to use this tool versus alternatives or provide exclusion criteria. No alternatives are mentioned, though sibling names give some context.

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

list_subredditC

List public posts from one approved subreddit.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNohot
limitNo
subredditYes
time_filterNoweek

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states 'public posts' implying read-only scope, but does not explain pagination, default sorting, rate limits, or the meaning of 'approved.' No output format or side effects are described, leaving significant ambiguity.

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, focused sentence with no redundant words. It conveys the essential purpose immediately and does not bury key information.

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?

Given the tool has four parameters, no annotations, no output schema, and sibling tools, the description is too minimal. It fails to explain what the return value is, how parameters interact, or when to choose this over search_posts. The description alone is insufficient for correct tool invocation.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must compensate. It only mentions 'subreddit' indirectly and gives no insight into 'sort', 'limit', or 'time_filter' semantics. The schema itself is detailed, but the description adds no value to parameter understanding.

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 'List public posts from one approved subreddit' uses a specific verb (List) and resource (public posts) and clearly distinguishes this tool from siblings (search_posts, get_post, get_comments). It is concise and unambiguous about the tool's core function.

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 explicit usage guidance is provided. The description implies when to use it (to list posts from a subreddit) but does not mention alternatives or exclusions. Sibling tools like search_posts could be confused for this use case, yet there is no differentiation.

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

search_postsC

Search public posts inside one approved subreddit.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNorelevance
limitNo
queryYes
subredditYes
time_filterNoyear

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full behavioral burden. It mentions 'public posts' and 'approved subreddit' as constraints, but does not disclose rate limits, authentication needs, pagination, sorting behavior, or what constitutes 'approved'.

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 efficient sentence with no fluff. It front-loads the core purpose directly. However, it is under-specified, but that is a completeness issue rather than a conciseness issue.

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 being a search tool with 5 parameters, enums, and no output schema or annotations, the description offers only a terse purpose statement and scope constraint. It does not cover return format, parameter semantics, or operational details, making it incomplete for reliable use.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for parameter meaning. It implicitly hints at 'query' and 'subreddit' by saying 'search posts inside a subreddit', but provides no details about sort, limit, or time_filter, leaving most parameters unexplained.

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 'Search' and clearly specifies the resource ('public posts') and scope ('inside one approved subreddit'). It distinguishes itself from siblings (list_subreddit, get_post, get_comments) which serve different purposes.

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 explicit guidance on when to use this tool versus alternatives, nor any exclusions. The phrase 'approved subreddit' implies a prerequisite, but the description does not elaborate on when to choose search_posts over list_subreddit or get_post.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedget_comments
    • First observedget_post
    • First observedlist_subreddit
    • First observedsearch_posts

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: listing subreddit posts, searching posts, fetching a single post, and fetching comments. No two tools overlap in function, and the descriptions make the boundaries unambiguous.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: list_subreddit, search_posts, get_post, get_comments. While nouns are singular or plural, the pattern is uniform across the set.

Tool Count5/5

4 tools is well-scoped for a read-only Reddit interface, covering the essential browsing actions without unnecessary bloat. The count fits perfectly within the typical range for a focused server.

Completeness4/5

The core read-only workflows are covered: list, search, get post, and get comments. Minor gaps exist, such as no subreddit metadata or user post retrieval, but these are not critical for the stated purpose of browsing public posts and comments.

Maintenance

ActivitySlowing
ResponsivenessNo issues

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
    B
    quality
    D
    maintenance
    Provides access to Reddit's API for retrieving posts, comments, user information, and search functionality. Supports multiple authentication methods and comprehensive Reddit data operations including subreddit browsing, post retrieval, and user profile access.
    9
    583
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables browsing and searching Reddit content through read-only tools that access Reddit's official API. Supports searching posts, retrieving subreddit information, fetching hot posts, and getting detailed post information.
    5
    4
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables interaction with Reddit through a comprehensive API interface supporting both read-only operations (browsing posts, comments, user profiles) and authenticated actions (posting, commenting, voting) via OAuth2 authentication.
    7
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides AI assistants with read-only access to Reddit's API for browsing subreddits, reading posts and comments, searching Reddit, and retrieving user/subreddit information. Enables safe exploration of Reddit content without posting capabilities through natural language interactions.
    -

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/MufanQiu/reddit-readonly-mcp'

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