Integration
Long-term memory for Cursor
Cursor's Composer is great inside a single thread but loses everything between them. Each new conversation in the same project starts from zero, and you end up re-explaining the architecture and your conventions over and over. With Engram in `~/.cursor/mcp.json`, Cursor remembers across every chat, every session, and every machine you sign into.
Install
Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into Cursor.
Three steps to memory in your agent
- Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
- Add your LLM key. Engram is BYOK. Paste an OpenAI / Anthropic / Groq / Together / Fireworks key and we'll route every extraction and query call through your provider. You pay your provider directly. We never see your inference.
- Paste the snippet below into your agent and restart it. Use
Authorization: Bearer <api-key>with the API key from your portal.
engram-cursor: desktop editor + cursor-agent CLI
Same MCP config covers both the Cursor desktop editor and the cursor-agent CLI. Source: github.com/lumetra-io/engram-cursor.
- Global (all projects + CLI): edit
~/.cursor/mcp.json(includes required header) - Per-project: create
.cursor/mcp.jsonat your project root (overrides global for that project) - Restart Cursor and verify in Settings → MCP Servers.
engramshould show with a green dot. For the CLI, runcursor-agent mcp list+cursor-agent mcp list-tools engram. - Note: Cursor doesn't currently support
${env:VAR}interpolation in headers; the key sits inmcp.jsonas plaintext. For project-scoped configs, add.cursor/mcp.jsonto.gitignore.
{
"mcpServers": {
"engram": {
"url": "https://mcp.lumetra.io/mcp/sse",
"headers": {
"Authorization": "Bearer <api-key>"
}
}
}
}{
"mcpServers": {
"engram": {
"url": "https://mcp.lumetra.io/mcp/sse",
"headers": {
"Authorization": "Bearer <api-key>"
}
}
}
}What you can do once memory's wired in
- Recall the decisions from last week's auth-library shootout
- Avoid suggesting libraries you've already rejected, and remember why
- Remember your preferred testing approach for this project (integration vs unit, mocked vs real)
- Pull up the migration notes from the rename we did across 47 files
FAQ
Does this work in the cursor-agent CLI too?
Yes. Cursor reads the same `~/.cursor/mcp.json` for both desktop and CLI, so one config covers both surfaces.
Can I keep the API key out of `mcp.json`?
Yes. Cursor 2.6.21+ (March 2026) resolves `${env:VAR}` interpolation in `mcp.json` headers. Export `ENGRAM_API_KEY` in your shell environment and use `"Authorization": "Bearer ${env:ENGRAM_API_KEY}"` in the config. On older Cursor versions the key sits in plaintext in `mcp.json`; if you go that route with a project-scoped `.cursor/mcp.json`, add it to `.gitignore`.
Can I scope memory per project?
Yes. Put a `.cursor/mcp.json` in the project root with a project-specific bucket arg. Cursor uses the project config when present and falls back to global otherwise.
Related integrations
Ship durable memory in Cursor today
Free tier: 10K memories and 50K retrievals per month. No credit card. Same Engram backend powers all 41 integrations, so memories you write from one client are immediately queryable from the rest.