Windsurf Cascade Agent: Native State vs. Memoreal MCP Persistence
| Feature / Dimension | Vanilla Windsurf Cascade | Cascade + Memoreal MCP Server | Engineering Advantage |
|---|---|---|---|
| Memory Longevity | Lost when active chat closes | Preserved across IDE restarts and chats | Cascade remembers past refactorings and user decisions |
| Namespace Resolution | Local folder context only | Deterministic git remote & repo hash | Shared workspace memory across multiple branch checkouts |
| Session Initialization | Cascade cold-starts each time | Proactive build_context trigger at start | Instant context grounding without manual reprompting |
| Architectural Guardrails | Relies on system prompt instructions | Automated encode_memory and recall_memories | Prevents re-introducing previously fixed regressions |
Understanding Cascade Architecture and MCP Integration
Codeium Windsurf introduced Cascade, an agentic coding assistant capable of multi-file refactoring, terminal execution, and deep codebase navigation. While Cascade possesses exceptional real-time flow state awareness, its native memory is bounded by the active session tab.
Once a chat thread is archived or closed, Cascade forgets earlier architectural decisions, rationale behind specific regex patterns, and unique team conventions. By integrating with Model Context Protocol servers, Cascade bridges this gap, establishing a permanent conduit to external knowledge graphs.
- Cascade communicates with registered MCP servers over standard JSON-RPC 2.0 protocols.
- Server tools appear natively in Cascade tool pallet and can be executed autonomously.
- Cross-session state persists cleanly without cluttering your Git working tree with temporary notes.
Configuring mcp_config.json for Windsurf in Under 60 Seconds
Windsurf maintains its MCP server registry in a dedicated JSON file located at ~/.codeium/windsurf/mcp_config.json. To configure Memoreal, create or open this file and insert the standard server descriptor.
The configuration defines npx -y @kolivri/memoreal-mcp@latest as the execution command, passing your API key through the env object. Alternatively, running npx -y @kolivri/memoreal-mcp setup --windsurf automatically detects Windsurf paths across macOS, Linux, and Windows and updates mcp_config.json seamlessly.
- Locate mcp_config.json under ~/.codeium/windsurf/ (or AppData/Roaming/Codeium/windsurf on Windows).
- Use the 1-command installer (npx -y @kolivri/memoreal-mcp setup) for zero-friction setup.
- Verify that the green connection indicator displays next to Memoreal in Windsurf MCP settings.
Deterministic Workspace Namespaces and Proactive Context Triggers
A key advantage of Memoreal is its automatic workspace namespace derivation. When Cascade opens a repository, Memoreal inspects package.json, Cargo.toml, go.mod, or the origin Git remote to generate a deterministic workspace identifier.
This guarantees that regardless of whether an engineer checks out the repository in ~/Projects/app or a colleague checks it out in /var/workspace/app, both Cascade agents query and update the exact same persistent memory namespace. When Cascade starts a session, it triggers build_context to ground its reasoning in verified project facts.
- Deterministic hashing guarantees consistent namespace resolution across diverse developer paths.
- Proactive build_context loads relevant Core and Semantic memories within the first turn.
- Cascade can invoke encode_memory at the end of a refactoring session to preserve key takeaways.
Windsurf Cascade Configuration in ~/.codeium/windsurf/mcp_config.json
json{
"mcpServers": {
"memoreal": {
"command": "npx",
"args": ["-y", "@kolivri/memoreal-mcp@latest", "--harness=windsurf"],
"env": {
"MEMOREAL_API_KEY": "mem_live_YOUR_API_KEY",
"MEMOREAL_PERSISTENCE": "cloud"
}
}
}
}
Frequently Asked Questions
Where do I find Windsurf MCP logs to debug connection issues?
You can inspect Windsurf MCP connection logs by opening the Cascade output channel in the bottom panel or by checking the log files located under ~/.codeium/windsurf/logs/.
Can Cascade autonomously save memories without user intervention?
Yes, when running in full Agent mode, Cascade can evaluate architectural findings and autonomously call encode_memory to save important patterns, bug root causes, and user preferences.
Does Windsurf support remote MCP servers over HTTP in addition to stdio?
Yes, modern versions of Windsurf support both local stdio command processes and remote Streamable HTTP MCP endpoints configured with authorization headers.
Install Persistent Memory for Your Coding Agent
Sub-15ms deterministic recall, AST symbol navigation, and 70%+ token savings across Claude Code, Cursor, Codex CLI, and Windsurf.
npx -y @kolivri/memoreal-mcp setup