Cursor
Set up MemNexus memory in Cursor via MCP.
Cursor supports MCP servers, enabling persistent memory across coding sessions. MemNexus gives Cursor access to your project context, preferences, and past decisions.
Prerequisites
You must have Cursor installed and a MemNexus API key before proceeding. If you do not have an API key, get started free to create one.
- Cursor installed
- A MemNexus API key (get started free)
- Node.js 18+ installed
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 Cursor config file.
2. Configure Cursor
mx setup cursor
This writes .cursor/mcp.json in your project root with the MemNexus MCP server entry. The entry launches the MCP bridge with mx mcp serve, which forwards requests to the hosted MemNexus MCP server using your stored key. For reference, it looks like this:
{
"mcpServers": {
"memnexus": {
"type": "stdio",
"command": "mx",
"args": ["mcp", "serve"]
}
}
}
3. Restart Cursor
Close and reopen Cursor (or reload the window). MemNexus tools should now be available.
4. Verify
In Cursor's chat, ask:
"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 Cursor remembers
With MemNexus, Cursor can recall:
- Project structure — Tech stack, architecture, conventions
- Coding patterns — Error handling, API patterns, naming conventions
- Past decisions — Why you chose a particular approach or library
- Bug fixes — Root causes and solutions from previous debugging sessions
- Preferences — Formatting style, testing approach, libraries to avoid
Cursor rules integration
Add memory instructions to your .cursorrules file:
You have access to MemNexus memory tools via MCP.
Before making changes:
- Search memory for existing patterns and conventions in this project
- Check for past decisions about architecture and tooling
After significant work:
- Save key decisions, patterns, and context as memories
- Tag memories with the project name and relevant topics
Always search before asking the user to repeat information.
Cross-platform memory
Memories are shared across all platforms. Context from Claude Desktop or Claude Code is available in Cursor:
- A design decision discussed in Claude Desktop can inform Cursor's code generation
- A bug fix debugged in Claude Code can prevent Cursor from making the same mistake
- Project preferences set anywhere are accessible everywhere
Tips
- Per-project config —
mx setup cursorwrites.cursor/mcp.jsonin the current project root for project-specific setup - Safe to commit —
.cursor/mcp.jsonholds no secrets; your API key stays in~/.memnexus/config.jsonfrommx auth login - Shared with teammates — Teammates run
mx auth loginwith their own key, then use the same committed config
Troubleshooting
Tools not appearing
- Check that
.cursor/mcp.jsonexists in the project root - Verify JSON syntax (no trailing commas)
- Reload the Cursor window
- Check Cursor's MCP server logs for errors
Memory search returns no results
- Verify your API key is valid
- Create a test memory first:
mx memories create --content "test memory" --topics "test" - Try searching:
mx memories search --query "test"
Next steps
- Windsurf — Set up memory in Windsurf
- Prompt Library — Optimize memory prompts
- Platform Examples — See Cursor with memory in action