+ Integration Guide
· Updated August 29, 2026
Connect Reddit MCP to VS Code
Add FetchLayer's Reddit MCP server to VS Code so GitHub Copilot's agent mode can search Reddit, scrape posts, and pull community data.
Written by Alex P.
- MCP
- VS Code
- GitHub Copilot
- reddit scraping
- AI agent
VS Code supports MCP servers through GitHub Copilot’s agent mode. You can add FetchLayer’s Reddit MCP server to give Copilot access to Reddit search, post scraping, subreddit browsing, and user lookups — no separate scraping library, no proxy management, just a config block.
Prerequisites
- VS Code with the GitHub Copilot extension installed
- GitHub Copilot agent mode enabled — MCP tools only surface in agent mode, not plain Ask/Edit mode
- A GitHub Copilot plan that includes agent mode (this has changed across Copilot’s tiers over time — check your current plan if the agent mode toggle isn’t visible)
- A FetchLayer API key — get one free (no credit card)
Step 1: Create the MCP config
VS Code reads MCP configuration from .vscode/mcp.json in your workspace root — note this is servers, not mcpServers like Claude Desktop and Cursor use. That naming difference is a real one, not a typo, and it’s the single most common reason a config copy-pasted from another client’s docs silently does nothing in VS Code.
Create the file .vscode/mcp.json:
{
"servers": {
"fetchlayer": {
"url": "https://mcp.fetchlayer.dev",
"headers": {
"Authorization": "Bearer ss-your-api-key"
}
}
}
}
Replace ss-your-api-key with your actual key from the FetchLayer dashboard.
Because this file lives inside your workspace (not a global user directory), it’s easy to accidentally commit an API key to source control. Either keep the key out of the committed file and rely on VS Code’s input-variable substitution for secrets, or add .vscode/mcp.json to .gitignore if you’d rather not think about it.
Step 2: Reload VS Code
Reload the window (Ctrl+Shift+P → “Reload Window”) to pick up the new MCP config. VS Code will show a small confirmation the first time it detects a new server in a workspace-level config — accept it to let the server run.
Step 3: Use it in Copilot Chat
Open Copilot Chat in agent mode and try:
Search Reddit for “VS Code extensions for Python” and show me the most upvoted recommendations.
Copilot will call the fetchlayer tool and return structured results instead of hallucinating an answer from training data.
More examples:
- “What are people saying about GitHub Copilot on r/programming?”
- “Get the latest posts from r/webdev about CSS”
- “Scrape comments from this Reddit thread and summarize the key points”
- “Search r/devops for real complaints about the tool we’re about to add as a dependency”
The first time Copilot calls the fetchlayer tool in a session, it shows an approval prompt with the exact request it’s about to send — you can allow it once, or allow it for the rest of the session so you’re not clicking through a confirmation on every single call.
Available tools
All 13 FetchLayer Reddit endpoints are available: scrape_search, scrape_post, scrape_community_posts, scrape_community_details, scrape_user_profile, scrape_user_posts, scrape_user_comments, scrape_search_communities, scrape_search_users, scrape_comment_permalink, scrape_popular, scrape_leaderboard, and scrape_explore. See the full endpoint list.
What a tool call actually returns
Reddit tools return structured JSON, not a page you have to parse. A scrape_search call for something like “self-hosted url shortener” returns an array of post objects shaped roughly like this:
{
"results": [
{
"id": "1abc23",
"subreddit": "selfhosted",
"title": "What is your favorite self-hosted URL shortener?",
"author": "u/example_user",
"score": 214,
"num_comments": 87,
"created_utc": 1735689600,
"url": "https://reddit.com/r/selfhosted/comments/1abc23/...",
"selftext": "Looking for something lightweight that supports custom domains..."
}
]
}
That structure is why an agent can reliably sort by score, filter by subreddit, or pull num_comments to decide whether a thread is worth a follow-up scrape_post call — none of which is reliable when an agent is scraping rendered HTML itself, where class names and layout change without warning.
Using it while writing code
The distinctive thing about having Reddit tools inside VS Code — rather than in a separate chat window — is that Copilot can pull real data into the code you’re currently editing. A prompt with the file open:
“Search Reddit for common complaints about our onboarding flow, then turn the top themes into a typed enum in this file.”
Copilot calls scrape_search, reads the returned posts, and writes the enum directly into the buffer. You review the diff like any other Copilot edit. The data came from a live search rather than from what the model remembers about your product, which is the entire point.
The same pattern works for test fixtures, which is where it earns its keep most often:
“Pull 10 real posts from r/webdev and use them as fixture data for the parser tests in this file.”
Real post shapes — with the emoji, the empty selftext, the 4,000-character wall of text, the deleted author — surface parsing bugs that hand-written fixtures never do, because nobody invents a fixture with a [deleted] author until production hands them one.
Agent mode vs Ask mode
Copilot Chat only calls tools in agent mode. In Ask mode it answers from the model alone, which for a question about Reddit means a confident answer assembled from training data rather than anything current.
The failure is quiet — you get a plausible-looking response with no indication that no tool ran. If an answer about “recent” discussion arrives instantly and cites nothing, check which mode you’re in before trusting it.
You can confirm a tool actually ran by looking for the tool-call block in the chat transcript. No block, no request — and no live data.
Keeping the config out of version control
If you put the MCP config in a workspace file, your API key goes with it. Reference an environment variable instead of the literal key, and keep the variable in your shell profile or a local .env that’s gitignored.
A key committed to a repo is a key you have to rotate, and the dashboard makes rotation easy — but not noticing for three months is the expensive part.
Troubleshooting
Server not showing up in Copilot’s tool list?
- Confirm you’re in agent mode, not Ask or Edit mode — MCP tools are agent-mode only
- Double-check the top-level key is
servers, notmcpServers— this is the single most common mistake when copying a config from Claude Desktop or Cursor docs - Run MCP: List Servers from the Command Palette to see what VS Code has actually loaded, including any parse errors
- Reload the window rather than just closing and reopening the chat panel
Getting 401 errors on tool calls?
- Verify your API key is correct and starts with
ss- - Make sure the
Authorizationheader includes theBearerprefix
Config works locally but breaks for teammates?
- A workspace
.vscode/mcp.jsonwith a hardcoded key means everyone on the repo shares (and can see) that key — use VS Code’s input-variable substitution to prompt each teammate for their own key instead of committing one
Using more than one platform in the same session
The fetchlayer MCP server you just connected is Reddit-specific, but the same account and API key work across FetchLayer’s other platform servers too — Twitter/X, App Store reviews, YouTube comments, Google Maps, and Google Play Store. If your workflow needs more than Reddit (comparing what people say on Reddit vs. X about the same topic, for example), you can add the Twitter MCP server alongside this one with the same API key and a different server URL. Nothing about the setup above changes — it’s the same config shape, just a second entry in your mcpServers block.
What’s Next
- Reddit MCP: All Clients Compared — every supported AI tool in one place
- Reddit MCP + Cursor
- Reddit MCP + Claude Desktop
- Reddit MCP + Claude Code
- How to Scrape Reddit in 2026