Get Started
Integrating the Pieces MCP with Windsurf brings your workflow context directly into the Cascade AI panel. With this integration, Windsurf can access your past work, similar code, and historical debugging context to provide smarter, personalized assistance.
Prerequisites
There are two prerequisites for integrating Pieces with Windsurf as an MCP—an active instance of PiecesOS and the fully-enabled Long-Term Memory engine.
If you do not have PiecesOS, you can download it alongside the [Pieces Desktop App](/products/desktop/download) or [install it standalone](/products/core-dependencies/pieces-os/manual-installation#manual-download--installation) here.
Installing PiecesOS & Configuring Permissions
Follow the instructions below for a detailed guide on setting up and configuring PiecesOS to correctly pass captured workflow context to the Pieces MCP server.
Getting the MCP Endpoint for PiecesOS
To use Pieces MCP with Windsurf, you'll need the MCP endpoint from PiecesOS:
http://localhost:39300/model_context_protocol/2025-03-26/mcp
Setting Up Windsurf
There are two ways to set up Pieces MCP for Windsurf: use the Pieces CLI for automatic configuration, or configure manually.
Method 1: CLI Install (Recommended)
The Pieces CLI can automatically configure Pieces MCP for Windsurf—no manual config editing required.
```bash
pieces mcp setup
```
Method 2: Manual Configuration
Windsurf stores its MCP configuration in a global config file. Edit ~/.codeium/windsurf/mcp_config.json:
Local Setup (Streamable HTTP — recommended)
{
"mcpServers": {
"pieces": {
"serverUrl": "http://localhost:39300/model_context_protocol/2025-03-26/mcp"
}
}
}
Adding via MCP Marketplace
Using Pieces MCP Server in Windsurf
Once integrated, you can utilize Pieces LTM directly in Windsurf through the Cascade panel.
Updating
Edit ~/.codeium/windsurf/mcp_config.json, update the serverUrl, then restart Windsurf.
Troubleshooting
If you're experiencing issues integrating Pieces MCP with Windsurf:
Verify PiecesOS Status: Ensure PiecesOS is actively running on your system.
Confirm LTM Engine Activation: Make sure the Long-Term Memory Engine (LTM-2.7) is enabled in PiecesOS.
Use serverUrl, Not url: Windsurf requires the
serverUrlkey—usingurlwill not work.Restart Windsurf: After editing
mcp_config.json, restart Windsurf for changes to take effect.Disable a Server: Add
"disabled": trueto the server config object if you need to temporarily disable Pieces MCP.
You're now set to enhance your Windsurf workflow with powerful context retrieval through Pieces MCP. Happy coding!