Apidog

All-in-one Collaborative API Development Platform

API Design

API Documentation

API Debugging

API Mocking

API Automated Testing

How to Use MCP Servers in Windsurf AI (Becoming 10x Developer)

Unlock MCP servers in Windsurf AI with this 2025 tutorial—step-by-step setup, real-world uses, and pro tips for seamless coding flow!

Ashley Goolam

Ashley Goolam

Updated on April 12, 2025

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!

💡
Before we dive into using MCP servers in Windsurf AI, let’s toss a quick shoutout to Apidog—a total lifesaver for API enthusiasts! This smooth tool simplifies designing, testing, and documenting APIs with an interface so easy even beginners can nail it. If you’re crafting apps while exploring Windsurf, give it a spin at apidog.com—it’s a dev’s dream come true!
button
Apidog Ui image

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!

How to Build an MCP (Model Context Protocol) Server: A Beginner’s Guide
Learn to build an MCP server with the MCP Framework. This guide includes CLI setup, weather tool creation, and testing with MCP Inspector.

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.

windsurf download

Step 2: Open Settings and Enable MCP

Let’s flip the MCP switch:

  1. Launch Windsurf.
  2. Click the “Windsurf - Settings” button (bottom right) or hit Cmd+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux) and type “Open Windsurf Settings.”
  3. Scroll to the “Cascade” section in Advanced Settings.
  4. 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.

cascade settings

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.

  1. 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).
  2. 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:
add mcp server
  • Then select "Add custom server":
custom mcp 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.
mcp server templates

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

view windsurfs available tools

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?

cascade mcp server tools

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.

windsurf.run web page

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

windsurf.run learn

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.

button

Skywork-OR1-32B: Open Source SOTA Model Better Than Deepseek R1Viewpoint

Skywork-OR1-32B: Open Source SOTA Model Better Than Deepseek R1

On April 13, 2025, SkyworkAI released the Skywork-OR1 (Open Reasoner 1) series, comprising three models: Skywork-OR1-Math-7B, Skywork-OR1-7B-Preview, and Skywork-OR1-32B-Preview. * These models are trained using large-scale rule-based reinforcement learning specifically targeting mathematical and code reasoning capabilities. * The models are built upon DeepSeek's distilled architectures: the 7B variants use DeepSeek-R1-Distill-Qwen-7B as their base, while the 32B model builds upon DeepSeek-R1

Ashley Innocent

April 13, 2025

What Is Soap API? (And How Is It Different from REST API)Viewpoint

What Is Soap API? (And How Is It Different from REST API)

This article provides a deep dive into SOAP APIs. We will explore what they are, how they function, their common applications, and how they compare to other approaches like REST APIs

INEZA FELIN-MICHEL

April 13, 2025

Is the Mysterious Optimus Alpha Model OpenAI's o4-mini?Viewpoint

Is the Mysterious Optimus Alpha Model OpenAI's o4-mini?

Is the Mysterious Optimus Alpha Model OpenAI's o4-mini? How to Use the Optimus Alpha Model in Cursor via Openrouter API? Read this article to find out!

Mark Ponomarev

April 12, 2025