Skip to main content
Glama
jhartum

reddit-research-mcp

by jhartum

reddit-research-mcp

reddit-research-mcp is a fork/remake of the pi-reddit-research Pi extension by SaintNeronagithub.com/SaintNerona/pi-reddit-research. It was converted from a Pi extension into a standalone MCP Server, with the core logic minimally changed.

MCP server for compact Reddit research packs.

Features

Registers these tools:

  • reddit_url_extract — parse Reddit URLs, permalinks, post IDs, and comment IDs.

  • reddit_resolve_subreddits — find and rank subreddit candidates for a topic.

  • reddit_pack — build a compact evidence pack from posts and top comments.

  • reddit_search — search Reddit posts without fetching full comment threads.

  • reddit_thread — fetch one thread and top comments.

  • reddit_subreddits — raw subreddit search.

  • reddit_trends — inspect hot/top/new posts in one or more subreddits.

Related MCP server: Reddit MCP Server

Install

{
  "mcpServers": {
    "reddit-research": {
      "command": "npx",
      "args": [
        "-y",
        "git+https://github.com/jhartum/reddit-research-mcp.git"
      ],
      "env": {
        "REDDIT_SESSION": "${REDDIT_SESSION}",
        "REDDIT_TOKEN_V2": "${REDDIT_TOKEN_V2}"
      }
    }
  }
}

For local development:

git clone https://github.com/jhartum/reddit-research-mcp.git
cd reddit-research-mcp
npm install
npm run build

Then point your MCP client at node /path/to/reddit-research-mcp/dist/index.js.

Usage

Ask questions like:

  • "What does Reddit think about Claude Code vs OpenCode?"

  • "Find Reddit fixes for this error: ..."

  • "What settings do ComfyUI users recommend for ...?"

Configuration

Since mid-2026, Reddit requires authentication for .json access. Create ~/.pi/agent/reddit-research.json:

{
  "cookie": "reddit_session=abc123; token_v2=def456"
}

Or reference a separate cookie file:

{
  "cookieFile": "/home/user/.config/pi-reddit-research/cookie.txt"
}

Advantages:

  • No env vars to manage

  • The server re-reads the config before requests, so you can update the cookie without restarting

  • cookieFile keeps the secret outside the JSON config and shell startup files

Security: your Reddit cookie is a secret. Do not commit it to git or public dotfiles.

2. Environment variables (alternative)

Variable

Default

Description

REDDIT_CACHE_DIR

~/.cache/reddit-research-mcp

Cache directory.

REDDIT_SQLITE_PATH

$REDDIT_CACHE_DIR/reddit.sqlite

SQLite cache path.

REDDIT_USER_AGENT

reddit-research-mcp/1.0 (https://github.com/jhartum/reddit-research-mcp)

User-Agent for Reddit JSON requests.

REDDIT_DELAY_MS

1200

Minimum delay between Reddit requests.

REDDIT_CACHE_TTL_MS

3600000

Search/request cache TTL.

REDDIT_THREAD_TTL_MS

21600000

Thread cache TTL.

REDDIT_SUBREDDIT_TTL_MS

604800000

Subreddit cache TTL.

REDDIT_TOPIC_TTL_MS

2592000000

Topic-to-subreddit cache TTL.

REDDIT_MAX_OUTPUT_CHARS

14000

Max compact output size.

REDDIT_COOKIE

Reddit session cookie value. Overrides config file.

REDDIT_COOKIE_FILE

Path to a file with the Cookie header value. Overrides config file.

REDDIT_CONFIG_PATH

~/.pi/agent/reddit-research.json

Path to JSON config file.

Cookie source priority (highest to lowest):

  1. REDDIT_COOKIE env var

  2. REDDIT_COOKIE_FILE env var → reads file

  3. cookie field in JSON config

  4. cookieFile field in JSON config → reads file

Notes

This server uses Reddit's .json endpoints with local SQLite caching. Since mid-2026, Reddit requires authentication for .json access. Set your cookie in ~/.pi/agent/reddit-research.json, via cookieFile, or via env vars to restore functionality.

Treat Reddit posts and comments as anecdotal evidence, not verified facts.

  1. Open a private/incognito browser window (to avoid unrelated cookies).

  2. Go to https://www.reddit.com/login and sign in.

  3. F12 → Application → Cookies → reddit.com.

  4. Method A (full Cookie header): Click any cookie → Ctrl+A → Ctrl+C, then pick "Copy as string" (Chrome) or paste into an editor and join with ; .

  5. Method B (only reddit_session): Copy the value of the reddit_session cookie and use:

    # Via config file:
    echo '{"cookie": "reddit_session=YOUR_VALUE"}' > ~/.pi/agent/reddit-research.json
    
    # Or keep the secret in a separate file:
    mkdir -p ~/.config/reddit-research-mcp
    printf '%s\n' 'reddit_session=YOUR_VALUE' > ~/.config/reddit-research-mcp/cookie.txt
    printf '{"cookieFile":"%s/.config/reddit-research-mcp/cookie.txt"}\n' "$HOME" > ~/.pi/agent/reddit-research.json
    
    # Or via env:
    export REDDIT_COOKIE="reddit_session=YOUR_VALUE"

Important: Avoid cookies with JSON values (like g_state={"i_l":1,...}) — they break the JSON config file. If you copy the full Cookie header, remove entries like g_state, eu_cookie, and seeker_session. Only reddit_session and token_v2 are needed for authentication.

The cookie expires after a few days. When that happens, just update it in the config or cookie file — the server will pick up the change automatically.

License

MIT

Available Tools

7 tools
reddit_packReddit PackC

Build a compact Reddit research pack for opinions, bugs, fixes, comparisons, settings, alternatives, trends, guides, hardware, or general research.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoReddit search sort. Default relevance.
timeNoReddit time window. Default year.
depthNoHow much evidence to collect: quick, normal, deep. Default normal.
topicYesSearch topic, product, error string, repo URL/name, or comparison query.
intentNoResearch intent. Default general.
max_postsNoMaximum posts to return. Capped by depth.
subredditsNoOptional comma-separated subreddit names, for example: LocalLLaMA, LocalLLM, ClaudeCode. Do not pass a JSON list.
comments_per_postNoTop comments per fetched thread. Default depends on depth.

TDQS

C2.9/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 carry full behavioral burden. It mentions 'compact' but does not explain output size, performance constraints, or what happens internally. Lacks detail on how the pack is built.

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?

Single-sentence description is concise and front-loads the core verb ('Build') and resource ('compact Reddit research pack'). However, listing 10 intents inline clutters slightly; a bulleted list would improve scannability. Still, no wasted words.

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?

With 8 parameters, no output schema, and no annotations, the description is too brief. It fails to explain what the 'pack' includes (e.g., summary, posts, comments) or how results are structured. Incomplete for the complexity involved.

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?

Input schema has 100% coverage with descriptions for all parameters, so the schema does most of the work. The description adds no extra meaning beyond the schema (e.g., for 'depth' or 'intent'), so baseline 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 it builds a compact Reddit research pack and lists specific intents (opinions, bugs, etc.). This distinguishes it from siblings like reddit_search or reddit_trends, though not explicitly. It is specific and actionable.

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 on when to use this tool vs. alternatives such as reddit_search or reddit_thread. It does not clarify when not to use it or provide context for selecting among the intents.

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

reddit_resolve_subredditsReddit Resolve SubredditsB

Resolve a topic into ranked subreddit candidates using Reddit subreddit search, post search, SQLite cache, and subreddit priority hints.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum subreddit candidates. Default 10, max 25.
topicYesTopic, product, repo, tool, or community to resolve into subreddits.
refreshNoBypass cached topic_subreddit_scores. Default false.

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description must fully disclose behavior. It mentions multiple data sources (search, cache, hints) and caching via SQLite, but does not detail output format, side effects, authentication needs, or rate limits. The description is moderately transparent but lacks important operational details.

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, concise sentence that efficiently communicates the tool's purpose and methodology. It avoids unnecessary words, though the use of technical terms like 'SQLite cache' and 'priority hints' could be slightly confusing without further context.

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 three parameters and no output schema, the description does not specify the return format (e.g., list of strings, objects with scores). It adequately covers the input and method but leaves the agent to infer what the response looks like, which is a notable gap for a tool with no explicit output schema.

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?

All three parameters have schema descriptions (100% coverage), so the baseline is 3. The overall description adds context about ranking and ranking methods but does not provide additional semantic detail for individual parameters beyond what the schema already offers.

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 resolves a topic into ranked subreddit candidates, which is a specific verb+resource combination. It distinguishes itself from sibling tools like reddit_search (general search) and reddit_subreddits (likely listing subreddits) by focusing on resolving a topic into a ranked list of candidates.

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 explicit guidance on when to use this tool versus siblings like reddit_search or reddit_subreddits. It does not state prerequisites, exclusions, or scenarios where another tool would be more appropriate. The usage context is only implied by the tool's purpose.

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

reddit_subredditsReddit SubredditsC

Find subreddit candidates for a topic.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum communities. Default 10, max 25.
queryYesTopic or community query.

TDQS

C2.9/5.0
Behavior2/5

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

The description lacks behavioral details beyond the basic function. No annotations are provided, and the description does not disclose whether it is a read-only operation, what the response contains, or any potential side effects. The minimal information only implies a search 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 with no extraneous text. It is concise and front-loaded, but it may be too terse for a tool that has sibling tools without differentiation.

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 lack of output schema and annotations, the description should explain what 'subreddit candidates' means (e.g., returns subreddit names, counts, descriptions). It also does not clarify how this tool differs from similar sibling tools like 'reddit_search', leaving the agent underinformed.

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?

Both parameters (query and limit) are described in the input schema with 100% coverage. The description adds no additional meaning (e.g., format, constraints) beyond what the schema already provides, 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.

Purpose4/5

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

The description 'Find subreddit candidates for a topic' clearly states the action (find) and resource (subreddit candidates), but the term 'candidates' is somewhat vague and doesn't explicitly differentiate from sibling tools like 'reddit_search' or 'reddit_resolve_subreddits'.

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 on when to use this tool versus alternatives (e.g., reddit_search, reddit_resolve_subreddits). There is no mention of prerequisites, exclusions, or context for optimal use.

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

reddit_threadReddit ThreadA

Fetch one Reddit thread by URL or post id and return compact post details plus top comments.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoComment sort. Default top.
url_or_idYesReddit post URL, permalink, or post id.
top_commentsNoTop comments to show in compact output. Default 12, max 40.
comment_limitNoComments requested from Reddit. Default 50, max 200.

TDQS

A3.5/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It states the tool fetches and returns 'compact post details plus top comments,' which is basic behavioral info. However, it omits critical details like authentication needs, rate limits, or side effects. Adequate but minimal.

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 that efficiently conveys the main action and result. It is front-loaded with the verb and resource. Could be slightly more structured but effective.

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 absence of an output schema, the description should fully explain the return format. 'Compact post details plus top comments' is vague—what details? In what format? Also, with 4 parameters, the description does not clarify parameter behaviors or interactions. Incomplete for a fetch tool.

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% with parameter descriptions. The description does not add additional meaning beyond the schema. For example, it doesn't explain the relationship between 'top_comments' and 'comment_limit' or clarify defaults. Baseline score 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 verb 'Fetch' and the resource 'one Reddit thread' with specific identification methods (URL or post id). It distinguishes from sibling tools like reddit_search (search) and reddit_subreddits (subreddit info) by focusing on a single thread.

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 needing details of a specific thread but provides no explicit guidance on when to use or avoid this tool versus alternatives. No comparisons to siblings, leaving the agent to infer context.

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

reddit_url_extractReddit URL ExtractA

Parse a Reddit URL, permalink, t3 post id, or t1 comment id into normalized identifiers.

ParametersJSON Schema
NameRequiredDescriptionDefault
url_or_idYesReddit URL, permalink, t3 post id, or t1 comment id.

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 full burden. It fails to disclose whether the tool is read-only, what 'normalized identifiers' means, or any side effects. The behavioral context 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?

One sentence that is perfectly concise and front-loaded with the core action.

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?

For a simple parsing tool with one parameter, the description is adequate but does not explain what the 'normalized identifiers' output looks like. Without an output schema, the description should provide more details on the return format.

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 single parameter's schema description already explains its purpose. The tool description essentially restates the schema, adding no new semantic value. Baseline 3 due to 100% 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 it parses Reddit URLs, permalinks, t3 post IDs, or t1 comment IDs into normalized identifiers. It distinguishes from siblings like reddit_thread (fetches content) and reddit_search (searches).

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 a Reddit identifier and need normalized identifiers, but it does not explicitly state when to use this tool versus alternatives, nor does it mention when not to use it.

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.

  1. 7 tool updatesv0.1.0
    • First observedreddit_pack
    • First observedreddit_resolve_subreddits
    • First observedreddit_search
    • First observedreddit_subreddits
    • First observedreddit_thread
    • First observedreddit_trends
    • First observedreddit_url_extract

TDQS

B3.2/5.0

Scored across 7 tools

Disambiguation3/5

Reddit_subreddits and reddit_resolve_subreddits both find subreddits for a topic, creating potential confusion. Reddit_search and reddit_trends both return posts but differ in scope and parameters, though still somewhat distinct. The remaining tools are well-differentiated.

Naming Consistency2/5

Tool names lack a consistent pattern; some are nouns (reddit_pack, reddit_subreddits, reddit_thread, reddit_trends) while others are verbs (reddit_search) or verb-noun phrases (reddit_resolve_subreddits, reddit_url_extract). This mixed convention reduces predictability.

Tool Count5/5

With 7 tools, the server covers essential Reddit research capabilities without being bloated or sparse. Each tool serves a distinct purpose within the domain, and the count feels well-scoped for a research-oriented MCP server.

Completeness4/5

The tool set covers major research workflows: finding subreddits, searching posts, fetching threads, and getting trends. Minor gaps exist, such as lacking a dedicated tool for subreddit-specific search or comment-only extraction, but these can be worked around.

Maintenance

ActivitySlowing
ResponsivenessSyncing

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.
    9
    MIT
  • A
    license
    A
    quality
    F
    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
    301
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A multi-purpose MCP server that enables Reddit research for market validation, data visualization with charts, medicine information lookup, user preference management, and task management tools. Provides comprehensive utilities for research, data analysis, and personal productivity through natural language interactions.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A read-only MCP server that connects to the Reddit Data API to search posts, browse subreddits, read comments, view user profiles, and check trending content through the Model Context Protocol.
    6 npm
    1
    MIT