Tool type: AI-first IDE (desktop) Website: windsurf.com Transport support: stdio, SSE (legacy), Streamable HTTP
| Platform | Path |
|---|---|
| All platforms | ~/.codeium/windsurf/mcp_config.json |
Windsurf uses mcpServers as the root key. For HTTP/remote servers, the key is serverUrl (not url).
Recommended when PiecesOS and Windsurf are on the same machine.
{
"mcpServers": {
"pieces": {
"serverUrl": "http://localhost:39300/model_context_protocol/2025-03-26/mcp"
}
}
}{
"mcpServers": {
"pieces": {
"serverUrl": "http://localhost:39300/model_context_protocol/2024-11-05/sse"
}
}
}Use this when Windsurf is running on a different machine from PiecesOS. For setup, see: Connecting to PiecesOS from the Outside World via Ngrok.
{
"mcpServers": {
"pieces": {
"serverUrl": "https://YOUR_NGROK_URL.ngrok.app/model_context_protocol/2025-03-26/mcp"
}
}
}To add auth headers (not required for Pieces):
{
"mcpServers": {
"pieces": {
"serverUrl": "https://YOUR_NGROK_URL.ngrok.app/model_context_protocol/2025-03-26/mcp",
"headers": {
"Authorization": "Bearer ${env:PIECES_TOKEN}"
}
}
}
}Environment variables use the ${env:VAR_NAME} syntax.
- Open the Cascade panel in Windsurf
- Click the MCP icon to open the MCP Marketplace
- Search for Pieces, or click "Add custom" and point to your URL
Edit ~/.codeium/windsurf/mcp_config.json, update the serverUrl, then restart Windsurf.
- Open Cascade panel
- Check the MCP tools section — Pieces LTM tools should appear
- Ask Cascade: "What Pieces tools are available?"
| Issue | Solution |
|---|---|
| Config not loading | Restart Windsurf after editing mcp_config.json |
| Server not connecting | Use serverUrl (not url) — this is a Windsurf-specific key name |
| Environment variable not resolving | Use ${env:VAR_NAME} syntax (with env: prefix) |
| Need to disable a server | Add "disabled": true to the server config object |
- Pieces MCP and LTM Tools Reference — Complete reference for all 39 tools available to your agents
- Connecting to PiecesOS via Ngrok — Expose your local Pieces server for remote access
| ← Back to All Agent Setup Guides |