+ Integration Guide
· Updated August 29, 2026
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.
Written by Alex P.
- 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 — instead of the agent guessing at an answer or you tabbing out to a browser.
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 — and Cursor also has a visual Settings → MCP panel that lists connected servers with a status dot, so you can confirm a connection without opening the JSON at all once it’s set up.
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. Global is the right choice for a general-purpose data source like FetchLayer that you’ll want in most projects; per-project makes more sense if you only want Reddit access scoped to, say, a specific research or content repo and don’t want it cluttering the tool list everywhere else.
Step 2: Add the FetchLayer MCP server
Paste this into your mcp.json:
{
"mcpServers": {
"fetchlayer": {
"url": "https://mcp.fetchlayer.dev",
"headers": {
"Authorization": "Bearer ss-your-api-key"
}
}
}
}
Replace ss-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 ss-your-api-key"
}
}
}
}
If both a global and a project-level mcp.json define a server with the same name, the project-level one wins for that workspace — useful if you ever need to override the global FetchLayer entry with a different key for one specific repo.
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, and in Settings → MCP with a green dot next to it. A grey or red dot there almost always means a malformed URL or header rather than an outage — mcp.fetchlayer.dev doesn’t require any special network access or allowlisting.
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:
| Prompt | What 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 |
Approving tool calls
By default, Cursor asks you to approve a tool call the first time it’s used in a session — you’ll see a confirmation showing exactly what’s about to be sent to mcp.fetchlayer.dev. If you’re doing a lot of Reddit research in one session and don’t want to click through every call, Cursor’s settings let you enable auto-run for trusted MCP tools; just be aware that’s a broader trust setting, not something scoped to fetchlayer alone, so review what else it covers before turning it on.
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
What a tool call actually returns
The agent gets structured JSON, not HTML. A scrape_search response looks roughly like:
{
"results": [
{
"id": "1abc23",
"subreddit": "rust",
"title": "Why is my async code slower than the sync version?",
"author": "u/example_user",
"score": 187,
"num_comments": 64,
"created_utc": 1735689600,
"url": "https://reddit.com/r/rust/comments/1abc23/...",
"selftext": "I rewrote a file-processing loop with tokio and..."
}
]
}
Stable field names are what let the agent chain calls reliably — sort on score, filter on subreddit, check num_comments before deciding a thread is worth a scrape_post. None of that is dependable when an agent is parsing rendered HTML whose class names rotate.
Pulling real data into the code you’re writing
Reddit tools inside the editor are most useful when the output lands in a file rather than in a chat window. Two patterns that come up repeatedly:
Test fixtures from real posts. With a test file open:
“Search r/rust for async questions, take 10 results, and write them as fixture data for the parser tests here.”
Real posts carry the things hand-written fixtures never do — [deleted] authors, empty selftext, 8,000-character bodies, emoji in titles. Most parsing bugs are found by the first fixture someone didn’t invent.
Grounding a feature in actual complaints. With a roadmap or issue file open:
“Find the most common complaints about CLI tools in r/commandline and draft them as GitHub issues in this file.”
The agent runs one search, reads what came back, and writes the issues. The content is grounded in current discussion rather than in what the model recalls about CLI ergonomics.
Keeping request count down in a long session
Cursor’s agent will happily call a tool several times while working through a multi-step task. That’s usually correct, but it’s worth knowing what drives the count:
- Each
scrape_searchis one request, regardless of how many results come back - Each
scrape_postis one request per page of comments — a deep thread withpages: 3is three - Re-reading data already in the conversation costs nothing
The practical consequence is that “search broadly, then open selectively” is much cheaper than “open everything and let the agent sort it out”. If you’re on the free tier, saying how many threads to open in your prompt is the single most effective way to keep a session inside the quota:
“Search r/rust for async complaints, then open only the top 2 threads.”
Troubleshooting
Server not appearing in Cursor?
- Make sure the
mcp.jsonfile is valid JSON (no trailing commas) - Check the file is in the right location (
.cursor/mcp.jsonor~/.cursor/mcp.json) - Restart Cursor completely (not just reload) — and check Settings → MCP for a specific error message rather than a bare disconnected state
Getting 401 errors?
- Verify your API key is correct and starts with
ss- - Make sure the
Authorizationheader includes theBearerprefix
Agent not using the tools?
- Use Agent mode (not Ask mode) in Cursor chat — Ask mode doesn’t call tools
- Be specific in your prompts — mention “Reddit” or “search Reddit” so the agent has a clear reason to reach for the tool instead of answering from memory
What’s Next
- Reddit MCP: All Clients Compared — every supported AI tool in one place
- Reddit MCP + Claude Desktop — same setup for Claude
- Reddit MCP + Claude Code — terminal-based setup
- How to Scrape Reddit in 2026 — overview of all scraping methods
- FetchLayer API Reference — full endpoint docs