MemNexus
GuidesIntegrations

Windsurf

Set up MemNexus memory in Windsurf via MCP.

Windsurf supports MCP servers for extending its AI capabilities. With MemNexus, Windsurf can access persistent memory across coding sessions — recalling project context, preferences, and past decisions every time you open a session.

Prerequisites

You must have Windsurf installed and a MemNexus API key before proceeding. If you do not have an API key, get started free to create one.

Setup

1. Install the CLI and log in

npm install -g @memnexus-ai/cli
mx auth login

mx auth login stores your API key in ~/.memnexus/config.json, so it never appears in your Windsurf config file.

2. Configure MCP

mx setup does not yet write Windsurf's config directly, so add the MemNexus MCP server manually. In Windsurf, open Settings → MCP and add:

{
  "mcpServers": {
    "memnexus": {
      "command": "mx",
      "args": ["mcp", "serve"]
    }
  }
}

mx mcp serve is a stdio-to-HTTP bridge: Windsurf talks to it over stdio, and it forwards requests to the hosted MemNexus MCP server using the key from mx auth login. No API key goes in this config.

3. Restart Windsurf

Reload or restart Windsurf to pick up the new MCP configuration.

4. Verify

Ask Windsurf's AI:

"Search my memories for project context"

If MemNexus is connected, it will call search_memories and return your recent context. On first use, there's nothing to find yet — that's expected.

What Windsurf remembers

With MemNexus, Windsurf can recall:

  • Project structure — Tech stack, architecture, conventions
  • Coding patterns — Error handling, API patterns, naming conventions
  • Past decisions — Why you chose a particular library or approach
  • Bug fixes — Root causes and solutions from previous debugging sessions
  • Preferences — Code style, testing patterns, libraries to avoid

Usage patterns

Loading context at session start

At the start of a Windsurf session, ask Cascade to search for relevant context before diving in:

"Before we start, search MemNexus for any context on the payments service."

Cascade will call search_memories and load what it finds. From that point forward, it has your project history in context.

Saving important decisions

When you make an architectural decision or fix a non-obvious bug, save it:

"Save a memory: we chose Zod over Yup for validation because Zod has better TypeScript inference and we're already using it in the API layer."

Cross-session continuity

Windsurf picks up exactly where any other session left off:

Session 1 (Claude Code): Debugged a race condition in the job queue. Saved the root cause.
Session 2 (Windsurf): Search memories → finds the race condition root cause. Doesn't re-investigate.

Cross-platform memory

Memories created in any MemNexus-connected platform are available in Windsurf. Your entire memory graph — facts, topics, conversations — works seamlessly across all your tools.

A design decision you discussed in Claude Desktop is available in Windsurf. A bug fix from a Claude Code session is there too. You work across tools; your memory should too.

Troubleshooting

Tools not appearing in Cascade

  1. Verify the MCP configuration JSON is valid (no trailing commas)
  2. Check that mx is in your PATH (mx --version)
  3. Confirm you are logged in — run mx auth status (key format is cmk_live_<id>.<secret>)
  4. Restart Windsurf completely (not just reload)
  5. Check the bridge logs: mx mcp logs

Memory search returns no results

On a fresh setup, there are no memories yet. Create a test memory with the CLI:

mx memories create --conversation-id "NEW" --content "test memory from Windsurf setup"

Then ask Windsurf: "Search my memories for test memory."

Next steps