Cursor
Add persistent memory and smart coding rules to Cursor with MemoAir. Your AI assistant remembers preferences, past decisions, and coding rules across every session — and only loads the rules relevant to your current task.
What You Get
MCP Server
Connects Cursor to MemoAir memory tools — search, save, update, and delete memories across sessions.
Smart Rules
Auto-retrieves only the coding rules relevant to your current task, saving 60–80% of rule tokens per request.
Project Guide
memoair.md keeps your project knowledge in sync — architecture, patterns, and conventions accessible to every session.
The Problem
Cursor rules are powerful, but they scale poorly:
A mature codebase might have 20+ rule files across backend, frontend, testing, DevOps, and security
Every LLM call sends all matching rules, even when you're only editing a React component and don't need backend API rules
This wastes thousands of tokens per request, increasing cost and slowing responses
How MemoAir Solves This
You upload your rules document to MemoAir (a single markdown file is fine)
MemoAir automatically splits it by heading sections and indexes each one independently
A single Cursor rule tells the AI to fetch relevant rules from MemoAir before making changes
Only the sections that match your current task are returned — not everything
Editing a React component returns only frontend rules. Writing tests returns only testing rules. No manual tagging required.
Setup
Four steps, five minutes.
Get Your MemoAir Credentials
Sign up at dashboard.memoair.space and grab your:
- API Key— starts with memoair_pk_
- User ID— your email or user identifier
Connect MemoAir MCP to Cursor
One-click install (recommended)
- 1.Open dashboard.memoair.space
- 2.Go to Connected Apps
- 3.Click Cursor → Install
- 4.Cursor opens automatically and configures MCP with your credentials
Or add manually — create .cursor/mcp.json in your project root:
1{2 "mcpServers": {3 "memoair": {4 "url": "https://mcp-server.memoair.space/mcp",5 "headers": {6 "X-API-Key": "YOUR_API_KEY",7 "X-User-ID": "YOUR_USER_ID"8 }9 }10 }11}Install Smart Rules & Project Guide
Run one command in your project root:
npx -p memoair-mcp memoair-initThis installs:
.cursor/rules/memoair.mdc— Smart Cursor rule — teaches the AI to fetch relevant rules from MemoAir before every code changememoair.md— Project guide — a living index of your project's architecture, patterns, and conventions.gitignore entry— Adds the .memoair/ scratch pad directory (used for cross-agent communication) to .gitignore
Existing files are never overwritten. Safe to run in any project.
Upload Your Rules & Reload
- 1.Go to the dashboard → Connectors and upload your coding rules markdown file
- 2.MemoAir automatically parses, splits by headings, and indexes each section
- 3.Back in Cursor, press Cmd+Shift+P and run "Developer: Reload Window"
That's it — you're done. Cursor now fetches only the relevant coding rules for each task.
Token Savings
Real-world numbers from a large monorepo (11 rule files, Go/Python/TypeScript/Java):
Without MemoAir
~5,250
tokens / request
With MemoAir
~1,350
tokens / request
Savings
~75%
reduction
| Setup | Without MemoAir | With MemoAir | Savings |
|---|---|---|---|
| 5 rule files | ~1,500 / req | ~1,300 / req | ~15% |
| 11 rule files | ~5,250 / req | ~1,350 / req | ~75% |
| 20+ rule files | ~10,000+ / req | ~1,350 / req | ~85%+ |
How It Works in Practice
Once set up, the flow is fully automatic:
You ask Cursor to make a code change
"Add a loading skeleton to the UserCard component"
Cursor reads the MemoAir rule and calls MemoAir
Fetches rules relevant to frontend components and the file you're editing
MemoAir returns only matching sections
"Component Architecture", "Styling", "Performance" — not all 20+ rule files
Cursor applies those rules while making the change
No manual intervention required
What the AI Sees
Instead of receiving 5,000+ tokens of every rule in your codebase, Cursor gets a focused, relevant subset:
✦ Backend API Rules (1,200 tokens)
✦ Database Rules (800 tokens)
✦ Frontend Rules (900 tokens)
✦ Testing Rules (700 tokens)
✦ Security Rules (600 tokens)
✦ DevOps Rules (500 tokens)
✦ Styling Rules (300 tokens)
... all sent every request
Found 3 relevant memories:
58% relevant — Frontend Components Rules
All components must be functional components using arrow functions...
57% relevant — Frontend Hooks Rules
All custom hooks must start with use prefix...
43% relevant — Performance
Lists with more than 50 items must use virtualization...
Updating Rules
Re-upload the markdown file from the dashboard. MemoAir detects changes and replaces the old version. All team members get the updated rules on their next Cursor request — no PRs, no config changes, no deploys.
Example Workflow
Session 1 — Debugging a performance issue
"The /users endpoint is taking 3 seconds. Help me optimize it."
→ Cursor searches MemoAir for coding rules and prior optimization memories
→ Finds N+1 query — fixes with eager loading
→ Stores: "Fixed N+1 in UserService.getAll() with eager loading"
Session 2 — Similar issue, one week later
"The /orders endpoint is slow too, same pattern as before."
→ Cursor retrieves the N+1 fix memory from Session 1
→ Immediately checks for N+1 queries and missing indexes
Tips
One file is fine
You don't need separate files per domain. A single markdown file with clear headings works best.
Use descriptive headings
MemoAir uses heading text to understand what each section is about. "Backend API Rules" works better than "Section 2".
Share across projects
The same MemoAir rules apply to any project that connects via MCP. Upload once, use everywhere.
Team consistency
Every developer on the team gets the same rules without maintaining local config files. One source of truth.
Verify Your Setup
Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux), type "MCP: List Servers", and confirm memoair appears. Then ask your AI: "Search my memories for hello" — if MemoAir responds, you're all set.
FAQ
Troubleshooting
Connection failed
Verify your API key is correct: open dashboard settings and re-copy it.
Tools not appearing
Run "Developer: Reload Window" from the Command Palette, then check "MCP: List Servers" again.
Rules not loading
Confirm .cursor/rules/memoair.mdc exists. If not, run npx -p memoair-mcp memoair-init.
Duplicate MCP entries
If you previously had a different MemoAir MCP config, remove the old entry from .cursor/mcp.json before installing.
Ready to get started?
Sign up for MemoAir and set up smart Cursor rules in under 5 minutes.