How to Use MCP Servers in Windsurf AI (and Level Up Like a 10x Developer)
If you’re already using Windsurf AI, congrats — you’re ahead of the game. But have you tried using MCP servers yet? These powerful tools can take your Windsurf experience from “cool” to “incredible.” Imagine giving your AI assistant access to your database, browser, or GitHub — all without leaving your editor. That’s what Model Context Protocol (MCP) brings to the table.
In this guide, I’ll show you how to set up and use MCP servers in Windsurf. Let’s jump in!
🚀 Pro Tip: Supercharge Your AI Workflow with Apidog MCP Server
Before diving into MCP server setup, don’t miss out on the Apidog MCP Server — a powerful bridge between your Apidog API documentation and AI-powered IDEs like Windsurf or Cursor. It lets your AI assistant access your API docs as a live data source.
What Are MCP Servers, and Why Should You Use Them?
MCP, short for Model Context Protocol, is an open standard (thanks, Anthropic!) that lets AI tools like Windsurf talk to external systems — such as databases, APIs, or your local files.
Think of an MCP server as a bridge between your AI assistant (Cascade) and your tools. With it, Cascade can do more than just suggest code. It can actually interact with your project, pulling real-time data or running commands directly.
Why use it? Because it supercharges your workflow:
- Query databases without switching tools
- Automate browser actions
- Run GitHub commands from within your editor
Let’s see how to set it up!
Setting Up MCP Servers in Windsurf: Step-by-Step
Step 1: Install Windsurf AI
If you haven’t already, download Windsurf AI from windsurf.run. It’s a powerful, AI-enhanced IDE built on top of VS Code — so it’ll feel familiar but with a lot more magic.
Already using it? Make sure it’s updated to the latest version for full MCP support.
Step 2: Enable MCP in Settings
- Open Windsurf.
- Go to Windsurf Settings (bottom right) or hit
Cmd+Shift+P
(Mac) /Ctrl+Shift+P
(Windows/Linux), then search for “Open Windsurf Settings.” - In Advanced Settings, scroll to the Cascade section.
- Find and enable “Model Context Protocol (MCP)”.
This tells Windsurf to start listening for connected MCP servers. Choose your AI model here too — Claude 3.5 Sonnet is a great option for coding tasks.
Step 3: Add an MCP Server (e.g., PostgreSQL)
Let’s connect a real MCP server. We’ll use the PostgreSQL MCP Server from GitHub.
1 .Get the server code:
git clone https://github.com/HenkDz/postgresql-mcp-server.git
cd postgresql-mcp-server
💡 Tip: You’ll need Node.js 18+ installed to run the server.
2. Add the server in Windsurf:
You can do this in two ways:
- Open the
~/.codeium/windsurf/mcp_config.json
file and add your server config manually.
- Or go to Windsurf Settings → Cascade → Add Custom Server.
Paste the server path into the config, replacing /path/to/
with your actual folder path, like:
/home/yourname/postgresql-mcp-server
Alternatively, browse pre-made MCP server templates at windsurf.run to simplify setup.
3. Refresh: Hit the Refresh button in the Settings panel to load your new server.
Step 4: Test the Connection
Start your server locally:
node index.js
In Windsurf, open the Cascade chat panel and try a prompt like:
Analyze my PostgreSQL database at postgresql://user:password@localhost:5432/mydb
If it’s working, Cascade will respond with insights like schema structure or performance suggestions. 🎉
What Can You Do with an MCP Server?
Once connected, your AI assistant can do some pretty smart stuff:
🧠 Query Your Database
Try:
Show me the table structure for 'users'
Cascade will fetch column names, data types, and even constraints — formatted nicely.
🏗️ Create a New Table
Use a prompt like:
Create a table called 'products' with columns id, name, and price
No SQL writing needed — the MCP server handles it.
🐌 Debug Slow Queries
If your app is sluggish, ask:
Analyze performance for this slow query…
Windsurf and the MCP server will help pinpoint bottlenecks, like missing indexes.
Explore More MCP Servers
PostgreSQL is just the beginning. Head to windsurf.run to explore more MCP servers, such as:
- GitHub automation
- Browser automation via Browserbase
- Custom tools for your stack
Each server gives Cascade new capabilities — making your coding assistant more powerful and contextual.
Tips for Getting the Most Out of MCP
Only enable what you need: Too many servers can slow things down.
Use @ mentions in Cascade: For example, @postgresql-mcp
to send commands directly.
Check logs if something goes wrong: Logs are stored in ~/.codeium/windsurf/logs
.
Experiment: Try creative prompts like:
- “Monitor my database”
- “Export all user data to CSV”
Why MCP Makes Windsurf Truly Special
MCP turns Windsurf into more than just an IDE. It becomes your AI-powered command center. Users on X rave about how tools like Windsurf (with MCP) let them run their entire project from one place — without writing SQL.
Compared to tools like Cursor, Windsurf + MCP offers:
- Deeper context
- Smarter automation
- Seamless third-party integration
Final Thoughts: Your MCP Journey Starts Now
You did it! You now know how to:
- Enable MCP in Windsurf
- Set up an MCP server (like PostgreSQL)
- Use AI to query, automate, and debug
Explore more at windsurf.run and unlock new workflows. Whether you’re building, testing, or debugging, MCP servers will help you code faster, smarter, and with way less hassle.
Let the AI do the heavy lifting — you focus on the magic. 🚀