
How to Post to Twitter from Cursor IDE with MCP (2026 Guide)
You just finished building a feature in Cursor. The code is committed, the tests pass, and you want to tell people about it. So you open a browser tab, navigate to Twitter, stare at the compose box, and try to remember what you just shipped well enough to write something interesting about it.
That context switch is unnecessary. With the OpenTweet MCP server, you can create tweets, schedule threads, and check analytics directly from Cursor's agent mode -- without leaving your editor. Cursor already understands your codebase. Now it can tweet about it too.
This guide walks through the complete setup, three different configuration methods, and practical workflows that make posting from Cursor feel natural.
Why Post to Twitter from Cursor?
Cursor is where you build. Your code, your commits, your architecture decisions -- it all lives in the editor. When you add Twitter posting to that environment, a few things change:
You share more often. The friction of opening a browser tab and composing a tweet from scratch is just enough to make most developers skip it. When posting is a one-line prompt in agent mode, you actually do it.
Your tweets are more accurate. Cursor has full context about your codebase. When you ask it to write a tweet about what you just shipped, it can reference actual code changes, dependency updates, and architectural decisions. No more vague "just shipped a new feature!" posts.
Your build-in-public habit sticks. The developers who succeed at building in public are the ones who made it effortless. Posting from the same tool where you code is about as effortless as it gets.
You announce features right after building them. The best time to talk about a feature is when it's fresh -- when you remember the technical details, the trade-offs, and the "aha" moments. That window closes fast once you move on to the next task.
Prerequisites
Before starting, make sure you have:
- Cursor IDE installed -- the latest version supports MCP servers natively
- Node.js 18+ -- run
node --versionto check - An OpenTweet account with a connected X/Twitter account -- sign up here (7-day free trial, no credit card required)
- An OpenTweet API key -- create one from your Developer Dashboard
No Twitter developer account needed. OpenTweet handles the X API connection for you.
Step 1: Get Your OpenTweet API Key
If you don't have an OpenTweet account yet:
- Go to opentweet.io and sign up (takes 30 seconds)
- Connect your X/Twitter account in the dashboard
- Navigate to the Developer page
- Click "Generate API Key"
- Copy the key -- it starts with
ot_
Keep this key handy. You'll need it in the next step.
Step 2: Configure MCP in Cursor
Cursor supports MCP servers through three methods. Pick whichever works best for your setup.
Method A: Cursor Settings UI
This is the simplest approach and doesn't require editing any files.
- Open Cursor Settings with Cmd+, (Mac) or Ctrl+, (Windows/Linux)
- Navigate to Tools & MCP in the sidebar
- Click "Add new MCP server"
- Fill in the fields:
- Name:
opentweet - Type:
command(stdio) - Command:
npx -y @opentweet/mcp-server
- Name:
- Click Install
- Important: Completely quit Cursor (Cmd+Q, not just close the window) and reopen it
After restarting, you'll need to set the environment variable. Add this to your shell profile (~/.bashrc or ~/.zshrc):
export OPENTWEET_API_KEY="ot_your_key_here"
Then restart Cursor so it picks up the environment variable.
Method B: Global Config File (Recommended)
This method keeps your API key in the config and works across all your projects.
Create or edit the file at:
- macOS/Linux:
~/.cursor/mcp.json - Windows:
%USERPROFILE%\.cursor\mcp.json
Add this configuration:
{
"mcpServers": {
"opentweet": {
"command": "npx",
"args": ["-y", "@opentweet/mcp-server"],
"env": {
"OPENTWEET_API_KEY": "ot_your_key_here"
}
}
}
}
Replace ot_your_key_here with your actual API key from the Developer Dashboard.
Save the file, then completely quit and reopen Cursor for the changes to take effect.
Method C: Project-Level Config (For Teams)
If you want the MCP server available for a specific project -- useful when sharing a setup with your team -- create a .cursor/mcp.json file in your project root:
{
"mcpServers": {
"opentweet": {
"command": "npx",
"args": ["-y", "@opentweet/mcp-server"],
"env": {
"OPENTWEET_API_KEY": "ot_your_key_here"
}
}
}
}
This is the same config as the global method, but scoped to one project. Each team member still needs their own API key, so consider using environment variable references instead of hardcoding the key.
Important: Add .cursor/mcp.json to your .gitignore if the file contains actual API keys. Better yet, have team members use the global config and keep the project config as a template with a placeholder key.
Step 3: Verify the Setup
Open Cursor and start a new agent mode session (Cmd+I on Mac, or open the chat panel and select Agent mode).
Ask:
"What OpenTweet tools are available?"
Cursor should list 18 tools:
- Content:
opentweet_create_tweet,opentweet_create_thread,opentweet_upload_media - Management:
opentweet_list_tweets,opentweet_get_tweet,opentweet_update_tweet,opentweet_delete_tweet - Publishing:
opentweet_publish_tweet,opentweet_batch_schedule - Analytics:
opentweet_get_analytics,opentweet_get_account,opentweet_list_accounts - Evergreen queue:
opentweet_get_evergreen_settings,opentweet_update_evergreen_settings,opentweet_list_evergreen_posts,opentweet_add_to_evergreen,opentweet_update_evergreen_post,opentweet_remove_from_evergreen
If you see these tools listed, you're connected and ready to go.
You can also verify by asking:
"Show me my OpenTweet account status"
This should return your plan details, posting limits, and connected accounts.
Step 4: Practical Workflows for Developers
Here's where Cursor's codebase awareness makes Twitter posting genuinely useful. These aren't hypothetical -- they're workflows that developers use daily.
1. Tweet About What You Just Shipped
You committed a feature. You're still in Cursor. Tell it what happened.
"I just finished building a new caching layer for our API endpoints. Look at my recent git commits and create a tweet announcing this improvement. Focus on the performance gains."
Cursor reads your git log, sees the actual changes, and writes a tweet grounded in real code -- not a generic announcement. It might produce something like:
"Just shipped a Redis caching layer for our API. Response times dropped from 340ms to 45ms on our most-hit endpoints. The key insight: cache at the service layer, not the controller. Invalidation is simpler when your cache boundaries match your domain boundaries."
That tweet has specifics because Cursor had the context.
2. Schedule a Launch Thread
You're preparing a release. You want a thread that goes out when you launch.
"I'm releasing v2.0 of this project on Thursday at 10am EST. Look at the CHANGELOG.md and the recent commits. Create a 5-tweet thread covering the biggest changes and schedule it for launch time."
Cursor reads your changelog, picks the most impactful changes, structures them into a thread with a compelling opening tweet, and schedules the whole thing using opentweet_batch_schedule.
3. Turn Your Package Into a Promotion
You maintain an open-source library. Let Cursor sell it for you.
"Look at my package.json and README. Write a tweet that would make a developer want to try this library. Don't be salesy -- just explain the problem it solves and why it's good."
Cursor reads your project metadata, understands what the library does, and writes something specific and genuine. Better than anything you'd write from memory while staring at a blank compose box.
4. Plan a Week of Developer Content
Sunday evening. You want tweets queued for the work week.
"I've been working on a React component library this week. I fixed a hydration bug, added a new DatePicker component, and improved our docs site performance. Generate 5 tweets -- one for each weekday -- mixing technical insights and build updates. Schedule them at 9am EST."
One conversation, five tweets, all scheduled. Cursor creates varied content because it can reference actual work from your codebase.
5. Add Top Performers to Evergreen
Your best tweets should keep working for you.
"Show me my analytics from the last 30 days. Find my best performing tweet and add it to my evergreen queue with a 14-day cooldown."
Cursor fetches your analytics, identifies your top post, and adds it to the evergreen queue so it automatically reposts on rotation. Your best content keeps reaching new followers.
6. Create a Technical Deep-Dive Thread from Code
You implemented something interesting and want to explain it.
"Look at the src/lib/cache.ts file. Create a Twitter thread explaining our caching strategy in a way that other developers would find useful. Include the key design decisions and trade-offs."
Cursor reads the actual implementation, understands the patterns, and turns code into a teaching thread. This is content that only someone with codebase access could write accurately.
Cursor-Specific Tips
Use Agent mode, not Ask mode. Agent mode lets Cursor use MCP tools. Ask mode is for questions about your code only -- it can't interact with external services.
Cursor reads your open files. If you have a file open in a tab, Cursor has that context when composing tweets. Open your changelog before asking for a release announcement.
Combine with code generation. You can ask Cursor to update your README and then tweet about the update in the same conversation. The workflow is seamless because both actions happen in the same agent session.
Review before publishing. By default, tweets are saved as drafts. You can review them in your OpenTweet dashboard before they go live, or ask Cursor to publish immediately if you're confident in the output.
Multi-Account Support
If you manage more than one X/Twitter account -- say a personal account and a company account -- you can specify which account to post from using the x_account_id parameter.
First, ask Cursor to list your connected accounts:
"List my OpenTweet X accounts"
This returns your connected accounts with their IDs. Then specify the account when posting:
"Create a tweet about our new API launch and post it to my company account (account ID: abc123)"
All 18 tools support the optional x_account_id parameter. If you don't specify one, tweets go to your primary account. For more on multi-account setups, see our multi-account management guide.
Troubleshooting
Tools don't appear in agent mode
Fully quit Cursor (Cmd+Q on Mac, not just closing the window) and reopen it. Cursor only loads MCP server configs at startup. This is the most common issue.
"Cannot find module" or npx errors
Make sure Node.js 18+ is installed and that npx is available in your system PATH. Run which npx in your terminal to verify. If you installed Node via nvm, Cursor might not see it -- use the full absolute path to npx in your config instead:
{
"mcpServers": {
"opentweet": {
"command": "/Users/yourname/.nvm/versions/node/v20.11.0/bin/npx",
"args": ["-y", "@opentweet/mcp-server"],
"env": {
"OPENTWEET_API_KEY": "ot_your_key_here"
}
}
}
}
"OPENTWEET_API_KEY is required"
Your API key isn't reaching the MCP server. If you're using the Settings UI method, make sure the environment variable is set in your shell profile and that you restarted Cursor after adding it. The config file methods (B and C) are more reliable because the key is embedded directly in the configuration.
"API error: 401"
Your API key is invalid or expired. Generate a new one from the Developer Dashboard. Keys start with ot_.
Check MCP server status
Go to Cursor Settings > Tools & MCP and look for the OpenTweet server in the list. It should show a green status indicator. If it's red or missing, the server failed to start -- check the logs by clicking on the server name.
Frequently Asked Questions
Does Cursor need to be running for my scheduled tweets to post?
No. When you schedule a tweet through Cursor, it's stored on OpenTweet's servers. OpenTweet handles publishing at the scheduled time regardless of whether Cursor is open. You can close your editor and your tweets still go out on time.
Can Cursor read my code and write tweets about it?
Yes, and this is the main advantage of posting from Cursor. Unlike browser-based tools, Cursor has your full project context -- files, git history, dependencies, architecture. When it writes a tweet about what you shipped, it can reference actual implementation details instead of generating generic content.
Is there a limit on how many tweets I can schedule?
OpenTweet's Pro plan includes up to 1,000 API calls per day, and you can batch schedule up to 50 tweets in a single request. For developers posting 5-10 tweets per week, you'll never come close to the limit.
Can I use this alongside other MCP servers in Cursor?
Yes. Cursor supports multiple MCP servers simultaneously. The OpenTweet server coexists with any other MCP servers you have configured -- GitHub, database tools, deployment services, or anything else. Each server registers its own set of tools, and Cursor knows which to use based on your request.
Get Started
The full setup path:
- Sign up for OpenTweet (7-day free trial, no credit card)
- Connect your X/Twitter account in the dashboard
- Create an API key (takes 10 seconds)
- Add the MCP config to Cursor using any of the three methods above
- Restart Cursor completely
- Open agent mode and schedule your first tweet
You're already in Cursor building things. Now you can share what you build without ever leaving the editor.
The OpenTweet MCP server is open-source and available on npm. Works with Cursor, Claude Desktop, Claude Code, Windsurf, VS Code, and any MCP-compatible client. Learn more at opentweet.io/mcp.
Start Scheduling Your X Posts Today
Join hundreds of creators using OpenTweet to stay consistent, save time, and grow their audience.