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 initThis automatically:
- Detects Cursor (looks for
.cursor/directory) - Configures MCP in
.cursor/mcp.json - Generates
.cursor/rules/memories.mdcwith your existing memories
Manual Setup
Option 1: Generated File
memories generate cursorThis 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"]
}
}
}Recommended: Use Both
Using both methods together gives the best experience:
- Generated file — Provides a static baseline that's always available
- 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 cursorThis 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 --forceThis syncs:
.cursor/mcp.json— Your MCP server configurations.cursor/rules/*.md— Your rule files.cursor/skills/**/*— Any skills you've created