MemNexus
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

  • Cursor installed
  • A MemNexus API key (sign up)
  • Node.js 18+ installed

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.json in 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.json if it contains your API key
  • Use environment variables — Reference $MX_API_KEY if supported by your Cursor version

Troubleshooting

Tools not appearing

  1. Check that .cursor/mcp.json exists in the project root
  2. Verify JSON syntax (no trailing commas)
  3. Reload the Cursor window
  4. Check Cursor's MCP server logs for errors

Memory search returns no results

  1. Verify your API key is valid
  2. Create a test memory first: mx memories create --content "test memory" --topics "test"
  3. Try searching: mx memories search --query "test"

Next steps