Back to Blog

How to Post to Twitter from Windsurf IDE with MCP (2026 Guide)

OpenTweet Team10 min read
How to Post to Twitter from Windsurf IDE with MCP (2026 Guide)

How to Post to Twitter from Windsurf IDE with MCP (2026 Guide)

Windsurf's Cascade AI already helps you write, refactor, and debug code. But every time you ship something worth sharing, you have to stop, open Twitter in a browser, and compose a tweet from scratch -- losing the context of what you just built.

With the OpenTweet MCP server, Cascade can create tweets, schedule threads, and check your analytics without you ever leaving Windsurf. You stay in the editor, and Cascade handles the posting. It takes about 3 minutes to set up and works immediately.

This guide covers the full configuration process, Windsurf-specific tips, and real workflows that fit naturally into how developers already use Cascade.

Why Post to Twitter from Windsurf?

Windsurf's Cascade is one of the most capable AI coding assistants available. Adding Twitter posting to it creates a workflow that's hard to replicate in any other tool:

Cascade understands your entire codebase. When you ask it to tweet about a feature you just built, it doesn't guess -- it reads the code, understands the implementation, and writes a tweet grounded in what actually changed. That's more accurate than anything you'd write from memory in a browser tab 20 minutes later.

Zero context switching. You finish a feature, you're still in Windsurf, and you tell Cascade to share it. The mental overhead of switching to Twitter, remembering what you did, and crafting a post from scratch disappears.

Build in public becomes automatic. The build-in-public developers who actually maintain consistency are the ones who removed friction from the process. Posting from your IDE is the lowest-friction option that exists.

Cascade's conversational flow is ideal for content creation. You can iterate on tweets the same way you iterate on code -- asking Cascade to adjust tone, add technical details, or restructure a thread. It's a natural extension of how you already use the tool.

Prerequisites

You need three things before starting:

  1. Windsurf IDE installed -- download from windsurf.com if you haven't already
  2. Node.js 18+ -- run node --version in your terminal to check
  3. An OpenTweet account with a connected X/Twitter account -- sign up here (7-day free trial, no credit card required)
  4. An OpenTweet API key -- create one from your Developer Dashboard

No Twitter developer account needed. OpenTweet handles the X API connection so you don't have to deal with OAuth tokens or developer applications.

Step 1: Get Your OpenTweet API Key

If you don't have one yet:

  1. Go to opentweet.io and create an account
  2. Connect your X/Twitter account through the dashboard
  3. Go to the Developer page
  4. Click "Generate API Key"
  5. Copy the key -- it starts with ot_

This key is what connects Windsurf to your Twitter account through OpenTweet. Keep it ready for the next step.

Step 2: Configure MCP in Windsurf

Windsurf supports MCP servers through its settings UI and through a config file. Either method works.

Method A: Windsurf Settings UI

  1. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) to open the command palette
  2. Search for "Open Windsurf Settings" and select it
  3. Navigate to Cascade in the left sidebar
  4. Scroll down to the Model Context Protocol (MCP) / Plugins section
  5. Click "Add Server" (or "Add new MCP server" depending on your version)
  6. Enter the server details:
    • Name: opentweet
    • Command: npx
    • Args: -y @opentweet/mcp-server
    • Environment variable: OPENTWEET_API_KEY = ot_your_key_here
  7. Save and restart Windsurf

Method B: Config File (Recommended)

This is the more reliable method, and the config is easy to back up or share.

Create or edit the file at:

~/.codeium/windsurf/mcp_config.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 and restart Windsurf for the changes to take effect.

Note: If the ~/.codeium/windsurf/ directory doesn't exist, create it:

mkdir -p ~/.codeium/windsurf

Then create the mcp_config.json file inside it.

Step 3: Verify the Setup

Open Windsurf and start a new Cascade chat session. Ask:

"List my OpenTweet tools"

Cascade should show 18 available tools:

Category Tools
Content creation opentweet_create_tweet, opentweet_create_thread, opentweet_upload_media
Post 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

You can also verify the connection by asking:

"Show me my OpenTweet account status"

This should return your plan details, posting limits, and connected X accounts.

The MCP server also exposes 4 resources (account info, scheduled posts, drafts, analytics summary) and 4 built-in prompts (Weekly Content Plan, Review & Schedule Drafts, Content from URL, Performance Review) that Cascade can use automatically.

Step 4: Windsurf-Specific Workflows

These workflows take advantage of Cascade's strengths -- deep codebase understanding, multi-step reasoning, and conversational iteration.

1. Analyze Code Changes and Tweet About Them

You just committed something significant. Let Cascade turn it into a post.

"Look at my recent git commits from today. Create a build-in-public tweet about the most interesting change. Make it technical but accessible."

Cascade reads your git history, identifies the most noteworthy change, and writes a tweet with real details. Because it has access to the actual diff, the tweet is specific:

"Just refactored our auth middleware from 340 lines to 90. The trick: instead of checking permissions at every route, we built a decorator pattern that infers required scopes from the route's TypeScript types. Type safety does the access control work for us."

That level of specificity is impossible without code context.

2. Schedule a Technical Thread from Your Architecture

You built something with interesting design decisions. Share the thinking, not just the result.

"Read through the src/services/ directory and create a Twitter thread explaining our service architecture. Focus on the patterns we chose and why. Schedule it for Tuesday at 10am."

Cascade explores your codebase, understands the architectural patterns, and produces a thread that teaches other developers something useful. It schedules the thread automatically using opentweet_batch_schedule.

3. Tweet About a Bug Fix with the Real Story

Bug stories perform well on developer Twitter because they're relatable. Let Cascade write them while the debugging session is fresh.

"I just fixed a race condition in the WebSocket handler -- check the latest commit. Write a tweet that tells the bug story: what broke, what I tried, and the actual fix. Make it the kind of tweet developers bookmark."

Cascade reads the commit, understands the fix, and frames it as a narrative:

"Spent 3 hours debugging random WebSocket disconnects. Users in Asia hit it more. Tried everything: keep-alive intervals, reconnect logic, proxy configs. The cause: our connection map used a regular object instead of a Map, and numeric user IDs were silently converting to strings. One line fix."

4. Generate a Week of Content from Your Work

Batch content creation is the most efficient way to stay active on Twitter without daily effort.

"I've been working on this project all week. Look at the commits from the last 7 days and generate 5 tweets -- one for each weekday next week. Mix formats: one technical tip, one build update, one question for developers, one thread, and one milestone tweet. Schedule them at 9am EST."

Cascade reviews a week of work, creates varied content, and schedules it all. You get consistent posting without daily overhead.

5. Check Performance and Adjust Strategy

Use analytics to inform what you post next.

"Show me my Twitter analytics from the last 30 days. What types of tweets perform best for me? Based on that, suggest 3 tweets I should create this week."

Cascade fetches your analytics using opentweet_get_analytics, identifies patterns in your top-performing content, and generates new tweets that lean into what works. Data-driven content creation in a single conversation.

6. Build Your Evergreen Queue from Best Performers

Your best tweets should keep working for you long after the initial post.

"Find my top 5 performing tweets from the last 60 days and add them to my evergreen queue. Set a 21-day cooldown so they don't repeat too often."

Cascade queries your analytics, identifies your strongest posts, and adds each one to the evergreen queue using opentweet_add_to_evergreen. Those tweets will automatically repost on rotation, reaching new followers who missed them the first time.

Cascade and OpenTweet Tips

Cascade analyzes your entire codebase. Unlike browser-based AI tools, Cascade has deep context about your project. Use that to your advantage -- reference specific files, directories, or components when asking for tweets, and the output will be far more accurate.

Iterate like you iterate on code. Don't accept the first draft. Tell Cascade to make the tweet more concise, more technical, funnier, or more provocative. The conversational flow is the same as refining code -- multiple passes produce better results.

Use the built-in prompts. The MCP server includes 4 prompt templates designed for common workflows. Ask Cascade to use the "Weekly Content Plan" prompt for batch creation, or the "Performance Review" prompt for analytics-based strategy adjustments.

Cascade supports tool confirmations. When Cascade wants to publish or schedule a tweet, it asks for your approval first. Review every tweet before it goes live. You can also ask for drafts only and review them in the OpenTweet dashboard before scheduling.

Multi-Account Support

If you manage multiple X/Twitter accounts -- a personal account and a project account, for instance -- every OpenTweet tool supports an optional x_account_id parameter.

Start by listing your connected accounts:

"Show me my connected X accounts on OpenTweet"

Cascade calls opentweet_list_accounts and shows your accounts with their IDs. Then specify which account to use:

"Create a tweet announcing our API v2 launch and post it to my company account (ID: acc_xyz123)"

When you don't specify an account, tweets go to your primary account. For more details on managing multiple accounts, see our multi-account guide.

Troubleshooting

Tools don't appear in Cascade

Windsurf requires a full restart after changing MCP configuration. Close Windsurf completely and reopen it -- don't just reload the window.

"Cannot find module" errors

This usually means npx isn't in Windsurf's PATH. If you installed Node.js via nvm or a version manager, Windsurf might not see it. Use the absolute path to npx in your config:

{
  "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"
      }
    }
  }
}

Run which npx in your terminal to find the correct path.

Tool limit: 100 total across all MCP servers

Windsurf currently supports up to 100 MCP tools across all configured servers. The OpenTweet server uses 18 of those. If you have many MCP servers configured and hit the limit, you may need to remove less-used servers.

"OPENTWEET_API_KEY is required"

Double-check that the env section in your config file has the correct key and that the JSON is valid. The key should start with ot_. A missing comma or unclosed brace in the JSON will silently prevent the environment variable from loading.

Config file location varies by OS

  • macOS/Linux: ~/.codeium/windsurf/mcp_config.json
  • Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Make sure you're editing the right file for your operating system.

Frequently Asked Questions

Does Windsurf need to be running for scheduled tweets to post?

No. When you schedule a tweet through Cascade, it's saved on OpenTweet's servers. OpenTweet publishes the tweet at the scheduled time regardless of whether Windsurf is open. Your tweets go out even if your computer is off.

Is this the same MCP server that works with Claude Desktop and Cursor?

Yes. The @opentweet/mcp-server npm package is the same across all MCP-compatible clients. Same 18 tools, same 4 resources, same 4 prompts. The only difference is how each editor configures and connects to the server. You can use the same API key across all of them.

Can Cascade access my codebase when writing tweets?

Yes, and this is the key advantage. Cascade has deep context about your open project -- files, dependencies, git history, and architecture. When you ask it to tweet about what you just shipped, it references actual code changes instead of writing generic content.

Can I use Windsurf Flows for multi-step tweet workflows?

Yes. You can set up Cascade Flows that combine code tasks with Twitter posting. For example, a flow that runs your tests, generates a release tweet based on the test results, and schedules it -- all in sequence. The MCP tools are available in any Cascade interaction, including Flows.

Get Started

Here's the complete setup path:

  1. Sign up for OpenTweet (7-day free trial, no credit card)
  2. Connect your X/Twitter account in the dashboard
  3. Create an API key (takes 10 seconds)
  4. Add the MCP config to ~/.codeium/windsurf/mcp_config.json
  5. Restart Windsurf
  6. Open Cascade and schedule your first tweet

You're already using Cascade to build things. Now you can tell people about them without breaking your flow.


The OpenTweet MCP server is open-source and available on npm. Works with Windsurf, Cursor, Claude Desktop, Claude Code, 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.

7-day free trial
Only $11.99/mo
Cancel anytime