GuidesIntegrations
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
Setup
1. Create the MCP config
Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"memnexus": {
"command": "npx",
"args": ["@memnexus-ai/mcp-server"],
"env": {
"MEMNEXUS_API_KEY": "cmk_live_xxx.yyy"
}
}
}
}
2. Restart Cursor
Close and reopen Cursor (or reload the window). MemNexus tools should now be available.
3. Verify
In Cursor's chat, ask:
"Search my memories for project context"
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 — Put
.cursor/mcp.jsonin each project root for project-specific setup - Global config — Or configure globally in Cursor settings for all projects
- Add to .gitignore — Don't commit
.cursor/mcp.jsonif it contains your API key - Use environment variables — Reference
$MX_API_KEYif supported by your Cursor version
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