Home/MCP/Cursor Tutorial
Cursor Tutorial

How to Add Reddit to Cursor with MCP (Step-by-Step)

Connect SubScraper's Reddit Model Context Protocol (MCP) server to Cursor IDE. Empower Cursor Composer and Chat to autonomously query subreddits, inspect full comment trees, and debug obscure software bugs with live community knowledge.

S
SubScraper Team
Published February 15, 2025
6 min read
Target: reddit mcp cursor setup

What is MCP and Why Connect Reddit to Cursor?

The Model Context Protocol (MCP) is an open standard developed by Anthropic that enables AI agents to connect securely to external tools and dynamic data sources. Instead of relying exclusively on static training data or broad web search engines that often return SEO-optimized marketing pages, MCP provides AI assistants with structured, typed functions they can invoke on demand.

When you integrate the SubScraper Reddit MCP Server into Cursor IDE, Cursor Composer transforms from an editor that only knows your local files into an autonomous research partner. Whenever you run into an undocumented runtime error, an edge case in a newly released library, or a performance regression in Next.js, Cursor can autonomously formulate queries against technical subreddits like r/webdev, r/reactjs, or r/nextjs.

Cursor reads the actual human discussions, discovers workarounds verified by other engineers, and directly applies the correct code changes to your open files—all without requiring you to leave the editor or manually scour browser tabs.

14 Agent Tools
Search, fetch posts, read comments, inspect subreddits
Zero Reddit App Setup
No OAuth keys or developer portal review required
Native Cursor Flow
Works seamlessly in Composer (Cmd+I) and Chat (Cmd+L)
Prerequisites

What You Need Before Starting

Before setting up the Reddit MCP server in Cursor, confirm that your workstation has the following three requirements:

1. Node.js 18+Runtime

The SubScraper MCP package runs via npx, which requires Node.js v18 or newer installed on your machine.

Verify: node -v
2. Cursor IDEEditor

Make sure you are running a recent version of Cursor with Model Context Protocol (MCP) features enabled in settings.

cursor.com
3. SubScraper API KeyCredentials

A SubScraper account provides you with an API key to authenticate all proxy and scraper calls without hitting Reddit rate limits.

30 free requests included
1

Step 1: Get Your SubScraper API Key

To query Reddit through the MCP server, you need a SubScraper API key. SubScraper manages residential proxy rotation, Reddit anti-bot defenses, and clean JSON formatting, saving you from having to apply for Reddit developer app credentials.

  1. Go to subscraper.dev/signup and create your free account. Every new account receives 30 free API requests immediately.
  2. Once logged in, navigate to the Developer Dashboard.
  3. Under the API Keys section, click Copy next to your default secret key. Keys follow the format:sk_live_...
Security Best Practice: Treat your SubScraper API key like a password. Never commit raw API keys to public repositories or hardcode them directly into source files.
2

Step 2: Open Cursor MCP Settings

Cursor supports MCP configuration in two ways: globally through the Cursor user settings UI, or locally per-project using a .cursor/mcp.json file.

Option A: Global Settings (Recommended)

Installs the Reddit MCP tools across all workspaces on your machine.

  • 1.Press Cmd + , (Mac) or Ctrl + , (Windows/Linux) to open Cursor Settings.
  • 2.In the left navigation sidebar, select Features, then click MCP.
  • 3.Click the + Add New MCP Server button.

Option B: Project Configuration

Binds the configuration to your specific repository, allowing team members to share the setup.

  • 1.Open your project root in Cursor.
  • 2.Create a directory named .cursor if it doesn't already exist.
  • 3.Create a file named mcp.json inside that directory.
3

Step 3: Add the SubScraper Config Block

Add the verbatim JSON configuration block below to your .cursor/mcp.json file, or input the parameters into the Cursor MCP Settings modal.

.cursor/mcp.json
JSON Config
{
  "mcpServers": {
    "subscraper-reddit": {
      "command": "npx",
      "args": ["-y", "@subscraper/mcp"],
      "env": {
        "SUBSCRAPER_API_KEY": "sk-your-subscraper-api-key"
      }
    }
  }
}

Entering in Cursor Settings GUI Modal:

Namesubscraper-reddit
Typecommand
Commandnpx -y @subscraper/mcp
Environment VariableSUBSCRAPER_API_KEY=sk_live_...

Why the -y flag? Passing -y ensures npx installs the @subscraper/mcp package on first run without prompting for interactive user confirmation, preventing Cursor from hanging during startup.

4

Step 4: Restart Cursor and Verify the 14 Tools

After saving the configuration, restart Cursor or click the reload button in the MCP settings pane. You should see a green indicator next to subscraper-reddit, confirming that Cursor successfully launched the background process via stdio.

Clicking to expand the server reveals all 14 tools ready for Cursor Composer:

reddit_search

Search posts across all of Reddit or target specific subreddits (e.g. r/nextjs, r/webdev) with sorting and time filters.

reddit_get_post

Fetch complete post body text, metadata, upvote counts, and recursively threaded comment trees for in-depth debugging.

reddit_get_community_posts

Fetch hot, new, top, rising, or controversial submissions from any developer community or tech subreddit.

reddit_get_community_details

Inspect subreddit subscriber statistics, description, active user counts, and community submission rules.

reddit_get_user_profile

Retrieve karma breakdown, account creation date, bio description, and verified profile status.

reddit_get_user_posts

Inspect all historical public submissions published by a specific Reddit user or library author.

reddit_get_user_comments

Retrieve public comment history for trusted developers, framework maintainers, or technical leads.

reddit_search_communities

Discover relevant developer communities and subreddits matching framework names or problem keywords.

reddit_search_users

Discover Reddit accounts and developers by username prefix or matching handle.

reddit_get_comment_permalink

Retrieve a specific comment alongside its exact parent comment context and immediate replies.

reddit_get_popular

Monitor currently trending technical discussions and breaking software news across r/popular.

reddit_get_leaderboard

Inspect fastest-growing programming communities and developer subreddits by category.

reddit_resolve_url_type

Automatically classify and parse any pasted Reddit URL into a post, comment, community, or user entity.

reddit_explore

Explore curated subreddits organized by tech verticals, programming languages, and industry domains.

5

Step 5: Test with an Example Cursor Composer Prompt

Now that the server is verified, open Cursor Composer (press Cmd + I on Mac or Ctrl + I on Windows). Ensure that Agent mode is selected in the Composer interface.

Example Prompt to Cursor ComposerAgent Mode

“I am hitting an error in Next.js 15: 'Hydration failed because the initial UI does not match what was rendered on the server' when using next-themes. Search Reddit for how developers resolved this issue in r/nextjs, find the verified community fix, and apply it to my root layout.”

Autonomous Cursor Agent Execution Sequence
1
Tool Invocation: reddit_search

reddit_search(query="nextjs 15 next-themes hydration mismatch", subreddit="nextjs", sort="top", time="year")

Cursor autonomously queries Reddit and receives top discussion threads with high upvotes.

2
Tool Invocation: reddit_get_post

reddit_get_post(postId="1e3k9p")

Retrieves the entire nested comment thread where developers explain that Next.js 15 requires suppressHydrationWarning on the <html> element.

3
Codebase Patch Applied

Cursor automatically patches app/layout.tsx, adding suppressHydrationWarning to <html lang="en" suppressHydrationWarning>.

Troubleshooting Common Setup Issues

Issue 1: "npx: command not found" or spawn ENOENT

Why it happens:When Cursor is launched from macOS Dock or Spotlight, it may not inherit your user shell's interactive $PATH, especially if you use Node version managers like nvm, asdf, or fnm.

Fix: Specify the absolute path to npx in your configuration:
"command": "/opt/homebrew/bin/npx"
(Run which npx in your terminal to find your exact binary path, or launch Cursor directly from terminal with cursor .).

Issue 2: Wrong API Key Format or 401 Unauthorized

Why it happens: Typo in the environment variable name or accidental whitespace inside the key string.

Fix: Ensure the environment key is named exactly SUBSCRAPER_API_KEY.

Verify that your key is copied directly from your SubScraper dashboard without surrounding quotes or trailing spaces.

Issue 3: Tools Not Appearing or Stuck on Orange / Disconnected

Why it happens: The MCP client has not reloaded, or npx is waiting for confirmation because the -y flag was omitted.

Fix: Double check that your args array includes "-y":
"args": ["-y", "@subscraper/mcp"]
Then press Cmd + Shift + P in Cursor and select Developer: Reload Window to force a clean MCP handshake.

Frequently Asked Questions

Do I need a Reddit developer account or app approval to use Reddit in Cursor?

No. SubScraper handles residential proxy rotation, Reddit anti-bot protection, rate limits, and JSON parsing behind the scenes. You do not need to register a Reddit application or request developer approval; you only need a SubScraper API key.

Should I configure MCP in Cursor Settings or in .cursor/mcp.json?

Configuring MCP via Cursor Settings > Features > MCP makes Reddit tools available globally across every project you open. Using .cursor/mcp.json in your repository root binds the configuration to that specific project and lets you share the tool configuration with your engineering team via Git.

How does Cursor Composer decide when to call Reddit tools?

Cursor inspects the Model Context Protocol tool definitions exposed by @subscraper/mcp. When your prompt asks about error messages, library comparisons, or developer consensus, the LLM in Agent mode autonomously calls tools like reddit_search or reddit_get_post to retrieve relevant Reddit threads.

Related Tools & API References

Supercharge Cursor with Real-Time Reddit Knowledge

Stop context switching between browser tabs and forum posts. Give your Cursor AI agent instant access to millions of developer solutions today.

30 free requests included • No credit card required • Setup takes under 2 minutes