FetchLayer fetchlayer.dev Sign in

+ Integration Guide

How to Connect Reddit MCP to Cursor

Step-by-step guide to adding FetchLayer's Reddit MCP server to Cursor. Search Reddit, scrape posts, and pull subreddit data directly from your AI coding agent.

  • MCP
  • Cursor
  • reddit scraping
  • AI agent
  • IDE integration

Cursor is an AI-powered code editor built on VS Code. It supports the Model Context Protocol (MCP), which lets you connect external data sources as tools your AI agent can call.

FetchLayer runs an MCP server that gives your Cursor agent access to all 13 Reddit endpoints — search, posts, comments, subreddits, user profiles, and more. Setup takes about 60 seconds.


Prerequisites

  • Cursor installed (v0.40+, or any version with MCP support)
  • A FetchLayer API key — get one free (no credit card)

Step 1: Open your MCP config

Cursor reads MCP server configurations from a file called mcp.json. You can configure it globally or per-project.

Global config (applies to all projects):

~/.cursor/mcp.json

Per-project config (only this workspace):

.cursor/mcp.json

If the file doesn’t exist yet, create it.


Step 2: Add the FetchLayer MCP server

Paste this into your mcp.json:

{
  "mcpServers": {
    "fetchlayer": {
      "url": "https://mcp.fetchlayer.dev",
      "headers": {
        "Authorization": "Bearer sk-your-api-key"
      }
    }
  }
}

Replace sk-your-api-key with your actual API key from the FetchLayer dashboard.

If you already have other MCP servers configured, add the "fetchlayer" block alongside them:

{
  "mcpServers": {
    "some-other-server": { "url": "..." },
    "fetchlayer": {
      "url": "https://mcp.fetchlayer.dev",
      "headers": {
        "Authorization": "Bearer sk-your-api-key"
      }
    }
  }
}

Step 3: Restart Cursor

After saving mcp.json, restart Cursor (or reload the window with Ctrl+Shift+P → “Reload Window”). Cursor will pick up the new MCP server on startup.

You should see “fetchlayer” listed as a connected tool in the agent panel.


Step 4: Test it

Open the Cursor chat (Agent mode) and try a prompt:

Search Reddit for discussions about “best CI/CD tools 2026” and give me the top 5 posts with their scores.

The agent will call FetchLayer’s search tool and return structured results from Reddit.

More example prompts to try:

PromptWhat happens
”What are people saying about Bun vs Node on r/javascript?”Searches r/javascript for Bun-related discussions
”Get the top 10 posts from r/startups this week”Fetches community posts sorted by top, time=week
”Scrape all comments from this Reddit post: [URL]“Pulls the full comment tree for a specific post
”Find subreddits about machine learning”Uses search-communities to find relevant subs
”Get the profile for Reddit user spez”Returns karma, account age, bio

Available Tools

Once connected, Cursor’s agent has access to all FetchLayer Reddit tools:

  • scrape_search — Search posts by keyword
  • scrape_post — Get a full post with comments
  • scrape_community_posts — Browse subreddit posts
  • scrape_community_details — Get subreddit metadata
  • scrape_user_profile — User karma, bio, account age
  • scrape_user_posts — A user’s post history
  • scrape_user_comments — A user’s comment history
  • scrape_search_communities — Find subreddits by keyword
  • scrape_search_users — Find users by name
  • scrape_comment_permalink — Get a specific comment with context
  • scrape_popular — Trending posts from r/popular
  • scrape_leaderboard — Trending communities
  • scrape_explore — Discover communities by topic

Troubleshooting

Server not appearing in Cursor?

  • Make sure the mcp.json file is valid JSON (no trailing commas)
  • Check the file is in the right location (.cursor/mcp.json or ~/.cursor/mcp.json)
  • Restart Cursor completely (not just reload)

Getting 401 errors?

  • Verify your API key is correct and starts with sk-
  • Make sure the Authorization header includes the Bearer prefix

Agent not using the tools?

  • Use Agent mode (not Ask mode) in Cursor chat
  • Be specific in your prompts — mention “Reddit” or “search Reddit”

What’s Next