Skip to main content

Cursor Setup

Give your Cursor AI agent persistent memory across coding sessions.

What this enables

  • Cursor remembers architecture decisions made in previous sessions
  • Ask “what database are we using?” and get the right answer even in a new chat
  • Store tech choices, team assignments, and project state automatically

Step 1 — Create .cursorrules

In your project root, create .cursorrules:
You are an expert software engineer with access to a persistent memory system (Atlas). Memory tools available
Before answering questions about project architecture, tech stack, team, or past decisions, ALWAYS call atlas_search_memory first. When the user shares important decisions, stack choices, or assignments, call atlas_save_memory to remember them. For complex relationship questions (“who owns X”, “what depends on Y”), call atlas_graph_qa. Atlas configuration
API_KEY: atlas_your_key_here
BASE_URL: https://api.atlas.bsyncs.com
USER_ID: your-project-name

Step 2 — Add a memory helper script

Create scripts/memory.py in your project:
from atlas_memory import CognitiveBrain

brain = CognitiveBrain(
    api_key="atlas_your_key_here",
    base_url="https://api.atlas.bsyncs.com",
    user_id="your-project-name",
)

if __name__ == "__main__":
    import sys
    cmd = sys.argv[1]
    
    if cmd == "save":
        result = brain.add(" ".join(sys.argv[2:]))
        print(f"Saved {result.facts_ingested} facts.")
    
    elif cmd == "search":
        results = brain.search(" ".join(sys.argv[2:]))
        print(results.format())
    
    elif cmd == "ask":
        answer = brain.ask(" ".join(sys.argv[2:]))
        print(answer)
Use from Cursor’s terminal:
python scripts/memory.py save "We migrated from MySQL to PostgreSQL on March 15th."
python scripts/memory.py search "What database are we using?"

Step 3 — MCP server (advanced)

For full tool-call integration, run Atlas as an MCP server in Cursor:
// .cursor/mcp.json
{
  "mcpServers": {
    "atlas": {
      "command": "python",
      "args": ["-m", "atlas_memory.mcp"],
      "env": {
        "ATLAS_API_KEY": "atlas_your_key_here",
        "ATLAS_BASE_URL": "https://api.atlas.bsyncs.com",
        "ATLAS_USER_ID": "your-project-name"
      }
    }
  }
}
Cursor will now call Atlas tools natively when you ask it questions about your codebase.