If you’re vibing with Windsurf AI, you’re already on the cutting edge of AI-powered development. But have you tapped into the magic of MCP servers yet? These little powerhouses can transform your Windsurf experience from “pretty cool” to “mind-blowingly awesome.” Imagine giving your AI assistant the keys to your database, browser, or even GitHub—all without leaving your editor. That’s what the Model Context Protocol (MCP) brings to the table, and today, I’m walking you through how to hook it up in Windsurf. Ready to level up? Let’s dive in!

Now, let’s get rolling with that MCP magic…
What Are MCP Servers and Why Use Them in Windsurf?
So, what’s the deal with MCP? Short for Model Context Protocol, it’s an open standard (thanks, Anthropic!) that lets AI tools like Windsurf chat with external systems—think databases, APIs, or even your local files. An MCP server is like a trusty sidekick that exposes tools and data to your AI, making it smarter and more connected. In Windsurf, this means your Cascade (that snazzy AI assistant) can do more than just suggest code—it can act on your project, fetching data or running commands in real time.
Why bother? Because Windsurf with MCP is like giving your coding brain a turbo boost. Need to query a PostgreSQL database? There’s an MCP server for that (check out postgresql-mcp-server). Want to automate browser tasks? There’s one for that too. It’s all about staying in the flow—no more app-switching or manual grunt work. Let’s get it set up!

Setting Up MCP Servers in Windsurf: Your Step-by-Step Guide
Getting MCP servers rolling in Windsurf is easier than you might think. Whether you’re a newbie or a seasoned dev, here’s how to make it happen.
Step 1: Install Windsurf AI
First things first—grab Windsurf if you haven’t already. Head to windsurf website download it for Mac, Windows, or Linux, and install it. It’s a souped-up IDE built on VS Code’s bones, so it’ll feel familiar but way more magical. Already got it? Make sure it’s updated—MCP support shines in the latest versions.

Step 2: Open Settings and Enable MCP
Let’s flip the MCP switch:
- Launch Windsurf.
- Click the “Windsurf - Settings” button (bottom right) or hit
Cmd+Shift+P
(Mac) /Ctrl+Shift+P
(Windows/Linux) and type “Open Windsurf Settings.” - Scroll to the “Cascade” section in Advanced Settings.
- Look for the MCP option—it’s labeled something like “Model Context Protocol.” Enable it!
This tells Windsurf to start listening for MCP servers. You’ll also pick an AI model here—Claude 3.5 Sonnet is a solid choice for coding tasks.

Step 3: Add an MCP Server
Now, let’s plug in an MCP server. Windsurf supports two types: stdio
(local command-line stuff) and sse
(remote servers over HTTP). For this tutorial, we’ll use the PostgreSQL MCP Server from GitHub—perfect for database lovers.
- Grab the Server: Head to postgresql-mcp-server (recommended: head to windsurf.run to find more mcp servers), clone it (
git clone https://github.com/HenkDz/postgresql-mcp-server.git
), and hop into the folder (cd postgresql-mcp-server
). - Install It: You’ll need Node.js 18+. Run:
npm install
npm run build
3. Configure It: Open your Windsurf settings again, hit “Add Server” under Cascade, and paste this into the mcp_config.json
file (found at ~/.codeium/windsurf/mcp_config.json
):
- Or accessed directly in the windsurf settings:

- Then select "Add custom server":

{
"mcpServers": {
"postgresql-mcp": {
"command": "node",
"args": ["/path/to/postgresql-mcp-server/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
Swap /path/to/
with your actual folder path (e.g., /home/user/postgresql-mcp-server
).
- Alternatively, you could browse the list of available mcp server templates which make mcp configuration and installation easier when using windsurf.

4. Refresh: Hit the refresh button in settings to load it up.

Step 4: Test the Connection
Start the server locally with:
npm run dev
Then, in Windsurf, open the Cascade panel (chat interface) and type something like, “Analyze my PostgreSQL database at postgresql://user:password@localhost:5432/mydb
.” If it’s working, Cascade will chat back with performance insights or schema details—cool, right?

Using MCP Servers in Windsurf: Real-World Fun
Now that your MCP server is humming, let’s play with it in Windsurf. The PostgreSQL MCP Server is loaded with tricks—here’s how to use a few.
Querying Your Database
In Cascade, try:
>> Get schema info for postgresql://user:password@localhost:5432/mydb
The MCP server will fetch table names, columns, and constraints, and Windsurf’s AI will format it nicely. Need specifics? Add “for table users” to zoom in.
Creating a Table
Tell Cascade:
>> Create a table called 'tasks' with columns id (SERIAL), name (VARCHAR), and done (BOOLEAN) in postgresql://user:password@localhost:5432/mydb
The MCP server executes it, and Windsurf shows you the result. No manual SQL needed!
Debugging Slow Queries
If your app’s lagging, ask:
>> Debug performance issues on postgresql://user:password@localhost:5432/mydb
The server digs into bottlenecks—maybe a missing index—and Windsurf suggests fixes. It’s like having a DBA on speed dial!
Exploring More MCP Servers in Windsurf
The PostgreSQL MCP Server is just the start. Windsurf users can head windsurf.run to discover more MCP servers, Windsurf rules, tutorials, and heaps of goodies. Want to automate GitHub? There’s a server for that. Need browser control? Check out Browserbase’s MCP offering.

The Windsurf Docs page is your treasure map—dig in and find what fits your project!

Tips for Mastering MCP in Windsurf
Here’s how to rock MCP in Windsurf like a pro:
- Keep It Relevant: Only enable MCP servers you need—too many can confuse Cascade.
- Use @ Mentions: In Cascade, type
@postgresql-mcp
to target your server directly. - Check Logs: If something’s off, peek at
~/.codeium/windsurf/logs
for clues. - Experiment: Try prompts like “Monitor my database” or “Export table data”—the PostgreSQL MCP Server has tons of hidden powers.
Why MCP Servers Make Windsurf Shine
Here’s the kicker: MCP turns Windsurf into more than an editor—it’s a command center. Posts on X rave about how MCP servers (like Neon’s database integration) let you “manage projects without writing SQL.” That’s the vibe—less grunt work, more flow. Compared to tools like Cursor, Windsurf with MCP offers deeper context awareness and seamless tool integration, keeping you locked in your groove.
Conclusion: Your Windsurf MCP Adventure Awaits
There you go—you’re now an MCP maestro in Windsurf! From hooking up the PostgreSQL MCP Server to querying databases with a few words, you’ve unlocked a whole new level of coding swagger. Head windsurf.run for more MCP servers, Windsurf tips, and tutorials to keep the momentum going.