+ Integration Guide
How to Connect Twitter MCP to Cursor
Step-by-step guide to adding FetchLayer's Twitter/X MCP server to Cursor. Search tweets, get profiles, and pull follower data directly from your AI coding agent.
Written by Alex P.
- MCP
- Cursor
- twitter scraping
- X 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 10 Twitter/X endpoints — search, tweet detail, replies, profiles, followers, 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 X/Twitter for discussions about “best CI/CD tools 2026” and give me the top 5 tweets with engagement stats.
The agent will call FetchLayer’s twitter_search tool and return structured results from Twitter/X.
More example prompts to try:
| Prompt | What happens |
|---|---|
| ”What are people saying about Bun vs Node on X/Twitter?” | Searches Twitter for Bun-related discussions |
| ”Get me the profile and recent tweets from @rauchg” | Fetches profile + user tweets |
| ”Scrape all replies to this tweet: [URL]“ | Pulls replies for a specific tweet |
| ”Find verified followers of @openai” | Returns verified follower accounts |
| ”Get the top tweets from @levelsio this month” | Fetches recent user tweets sorted by engagement |
Available Tools
Once connected, Cursor’s agent has access to all FetchLayer Twitter/X tools:
- twitter_search — Search tweets by keyword (Top, Latest, People, Media, Lists)
- twitter_tweet_detail — Get a specific tweet by ID
- twitter_tweet_replies — Fetch replies to a tweet
- twitter_user_profile_details — Get user profile by handle
- twitter_about_profile — Extended profile metadata
- twitter_user_tweets — A user’s recent tweets
- twitter_user_replies — A user’s recent replies
- twitter_following — Accounts a user follows
- twitter_followers — Accounts following a user
- twitter_verified_followers — Verified accounts following a user
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)
Getting 401 errors?
- Verify your API key is correct and starts with
sk- - Make sure the
Authorizationheader includes theBearerprefix
Agent not using the tools?
- Use Agent mode (not Ask mode) in Cursor chat
- Be specific in your prompts — mention “Twitter” or “search X/Twitter”
What’s Next
- Twitter MCP + Claude Desktop — same setup for Claude
- Twitter MCP + Claude Code — terminal-based setup
- Twitter MCP + VS Code — VS Code Copilot setup
- How to Scrape Twitter/X in 2026 — all scraping methods
- FetchLayer API Reference — full endpoint docs