C14 Updated 2026-06-20
Pillar 2 - Memory in any agent via MCP

Add persistent memory to Cursor (MCP)

Paste a Cursor .cursor/mcp.json config that runs npx answer-engine-mcp, points at engine.answeragent.ai, and gives Cursor scoped persistent memory.

To add persistent memory to Cursor, create an Answer Engine key, save a .cursor/mcp.json file that runs npx answer-engine-mcp, and reload Cursor. Cursor then gets the same scoped memory server Claude Code can use, with one library id and one corrected host: https://engine.answeragent.ai.

Last updated: June 20, 2026.

What does Cursor get from this MCP setup?

Cursor gets a local MCP server entry named answer-engine. When the agent needs memory, Cursor can launch the server and call Answer Engine tools against the library you scoped in the config. The Model Context Protocol is built for this client-server pattern: an AI application connects to external data sources, tools, and workflows without every client inventing its own integration.

The MCP project also lists Cursor among development tools that support MCP, which is the no-lock-in reason to use this path instead of a Cursor-only memory workaround (MCP introduction). Cursor’s own MCP documentation is the reference for its current settings UI and client-specific behavior (Cursor MCP docs).

Answer Engine stays outside the editor. Cursor remains the agent experience; Answer Engine stores and retrieves source-linked memory. That separation keeps the memory useful if your team later uses Claude Code for repository tasks or Codex for automation.

What should you have before editing .cursor/mcp.json?

You need three pieces ready:

  • Cursor installed with MCP support enabled for the workspace.
  • Node.js available so Cursor can run npx answer-engine-mcp.
  • An Answer Engine Programmatic API key and the library id for the memory scope.

Use a production key that starts with ae_live_, but never commit the real key. If the project config is shared, use placeholders in .cursor/mcp.json and let each developer substitute local secret values. The library id should point at the memory library you want Cursor to read and write, not a tenant-wide unrestricted scope.

What should .cursor/mcp.json contain?

Create .cursor/mcp.json in the project and paste this block:

{
  "mcpServers": {
    "answer-engine": {
      "command": "npx",
      "args": ["answer-engine-mcp"],
      "env": {
        "ANSWER_ENGINE_API_KEY": "ae_live_your_key_here",
        "ANSWER_ENGINE_API_URL": "https://engine.answeragent.ai",
        "ANSWER_ENGINE_LIBRARY": "your-library-id"
      }
    }
  }
}

The install command behind the config is:

npx answer-engine-mcp

Keep the host exactly as shown. New Answer Engine install snippets should use https://engine.answeragent.ai; hosted HTTP MCP references should use https://engine.answeragent.ai/mcp. If you find an older snippet with a different host, treat it as stale.

What output should Cursor show after reload?

Reload Cursor after saving .cursor/mcp.json. Then open the MCP settings or agent tool list and look for this connection shape:

answer-engine
status: connected
command: npx answer-engine-mcp
api: https://engine.answeragent.ai
library: your-library-id
tools: search_content, get_content, list_tags, summarize_collection, ask, save_content, append_memory

If Cursor reports that the server failed to start, run the command directly in a terminal from the same project:

npx answer-engine-mcp

The stdio server should print startup status to stderr:

Answer Engine MCP server started

If the process starts in the terminal but not inside Cursor, check the JSON syntax, the path to .cursor/mcp.json, and whether Cursor inherited the expected Node.js path. If the server connects but tools fail when called, check the API key, library id, and ANSWER_ENGINE_API_URL value.

How do you test memory in Cursor?

Test with a fact that is specific enough to recognize and harmless enough to store:

Save this project memory in Answer Engine: the support escalation label for this workspace is ae-support-critical. Source: Cursor MCP setup test on June 20, 2026.

Then start a fresh Cursor agent session and ask:

Use Answer Engine memory to find the support escalation label for this workspace.

You want Cursor to call the Answer Engine MCP server and return the saved fact with a source. If it answers without using the server, explicitly ask it to use the answer-engine MCP tools. This is a wiring check, not a published evaluation claim.

Why is this better than pasting background into every Cursor chat?

Pasted background is temporary. It helps the current chat but does not create a durable source-aware memory layer. MCP gives Cursor a repeatable way to ask an external server for relevant memory, and Answer Engine scopes that memory by key and library.

The MCP architecture documentation describes hosts, clients, and servers as separate pieces in the protocol (MCP architecture). That separation is useful for memory because the host can change while the source system remains stable. Cursor can be your editor agent today, Claude Code can run repository automation tomorrow, and both can use the same memory surface.

For a broader evaluation rubric, read Agent Memory: The Complete Guide. The important questions are not just “does it retrieve?” They are whether the memory is scoped, source-linked, inspectable, portable, and honest about what has or has not been verified.

Does this lock memory into Cursor?

No. The server name and config file live in Cursor, but the memory itself lives in Answer Engine and is exposed through MCP. That means the same key and library can be represented in another MCP client with the same command and environment variables.

The same server works in Claude Code too — no lock-in. Use the sibling guide, Add persistent memory to Claude Code, when you want the .mcp.json version of this setup.

This portability matters most when teams standardize memory before they standardize agent clients. If one developer prefers Cursor and another uses Claude Code, the shared memory layer can still point at the same library instead of splitting project knowledge across tools.

What should teams avoid in a shared Cursor setup?

Do not commit secrets. A checked-in .cursor/mcp.json should show placeholders such as ae_live_your_key_here, not a real key. Treat the library id as lower risk than the key, but still document what it points to so future maintainers understand the scope.

Do not use a tenant-wide key when the agent only needs one library. Scoped memory is easier to reason about and easier to revoke.

Do not assume every saved chat line should become memory. Persistent memory is most valuable when it stores source-linked facts, decisions, instructions, and project context that will actually be useful later. The Agent Memory Glossary defines the difference between working memory, episodic memory, semantic memory, source memory, and retrieval logs.

How do you generate the Cursor config?

Use the MCP setup generator, choose Cursor, enter your library id, and copy the generated .cursor/mcp.json block. The generator emits the same config shape shown in this guide and keeps the host fixed to https://engine.answeragent.ai.

The optional site field in the generator is only framing for source setup. Actual web-page ingest still happens through the product’s Firecrawl-backed scrape and crawl flow after you connect sources. The generator’s job is narrower: produce a correct MCP client config and the matching npx answer-engine-mcp command.

Which sources support this setup?

Fig. 9 FAQPage schema / visible answers
FIG. 9

FAQ

How do I add persistent memory to Cursor?

Create a scoped Answer Engine API key, add the Answer Engine MCP server to .cursor/mcp.json with npx answer-engine-mcp, and reload Cursor so the server connects.

Does the Cursor setup use the same server as Claude Code?

Yes. Cursor and Claude Code can both launch the same Answer Engine MCP server, which keeps memory portable across agent clients.

What API host should Cursor use for Answer Engine memory?

Use https://engine.answeragent.ai in ANSWER_ENGINE_API_URL. Hosted HTTP references should use https://engine.answeragent.ai/mcp.

Should I commit .cursor/mcp.json?

Commit only placeholders or environment-variable references. Do not commit a real ae_live_ API key into a repository.

NEXT

Build memory you can inspect.

Answer Engine gives agents a persistent, tenant-isolated memory layer via MCP, with source-aware recall and roadmap-labeled inspection work.