memories.sh logomemories.sh
Integrations

Cursor

Integrate memories.sh with Cursor.

Cursor reads project rules from .cursor/rules/ and supports MCP servers. memories.sh integrates with both.

Quick Setup

The fastest way to set up memories.sh with Cursor:

cd your-project
memories init

This automatically:

  1. Detects Cursor (looks for .cursor/ directory)
  2. Configures MCP in .cursor/mcp.json
  3. Generates .cursor/rules/memories.mdc with your existing memories

Manual Setup

Option 1: Generated File

memories generate cursor

This creates .cursor/rules/memories.mdc — an MDC (Markdown Components) file with YAML frontmatter that Cursor reads as a project rule.

The generated file includes:

  • All your rules, decisions, and facts
  • Instructions for Cursor to save new memories via MCP

Option 2: MCP Server

Add memories.sh to Cursor's MCP configuration.

Project-level (.cursor/mcp.json):

{
  "mcpServers": {
    "memories": {
      "command": "npx",
      "args": ["-y", "@memories.sh/cli", "serve"]
    }
  }
}

Global (~/.cursor/mcp.json):

{
  "mcpServers": {
    "memories": {
      "command": "npx",
      "args": ["-y", "@memories.sh/cli", "serve"]
    }
  }
}

Using both methods together gives the best experience:

  1. Generated file — Provides a static baseline that's always available
  2. MCP server — Gives Cursor live access to search and add memories

Migrating Existing Rules

If you have existing rules in .cursorrules or .cursor/rules/, you can import them:

memories ingest cursor

This extracts individual rules from your existing Cursor config and stores them as memories. You can then manage them with memories.sh and generate updated files for all your tools.

Syncing Cursor Config

To sync your Cursor configuration (MCP config, rules) across machines:

# On your main machine
memories files ingest

# On a new machine
memories files apply --global --force

This syncs:

  • .cursor/mcp.json — Your MCP server configurations
  • .cursor/rules/*.md — Your rule files
  • .cursor/skills/**/* — Any skills you've created

On this page