Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

MCP Memory Server: Do VS Code and Cursor Share Data?

· 5 min read · Home Tech

In this article
  1. What Is an MCP Memory Server?
  2. How VS Code and Cursor Handle MCP Differently
  3. Why You Might Want Them to Share Data
  4. How to Make VS Code and Cursor Use the Same Memory Server
  5. Common Problems and Misconceptions
  6. Alternative Approaches to Shared Memory
  7. Frequently Asked Questions

No, by default VS Code and Cursor do not share the same MCP memory server data. Each editor runs its own MCP client, and unless you explicitly configure both to point to the same memory server file or database, they will maintain separate memory stores. This article explains how MCP memory servers work, why the data differs, and how you can unify them if needed.

What Is an MCP Memory Server?

MCP (Model Context Protocol) is an open standard that lets AI assistants, like those in VS Code and Cursor, access external tools and data. A memory server is a specific MCP server that stores and retrieves information about the user, their projects, or their preferences. It acts like a persistent note-taking system for the AI, allowing it to remember facts across sessions.

When you install an MCP memory server, you typically configure it in your editor's settings. The server itself can be a local file (like a JSON or SQLite database) or a remote service. The key point is that the editor sends requests to the server, but the server doesn't know which editor is calling it—it just stores whatever data it receives.

How VS Code and Cursor Handle MCP Differently

VS Code and Cursor are both built on the same underlying technology (Electron and the VS Code extension API), but they are separate applications. Each has its own configuration files, extension folders, and user settings. When you add an MCP server to VS Code, you edit a JSON file in your VS Code user directory. When you add one to Cursor, you edit a different JSON file in Cursor's directory.

Unless you manually set the same storage path in both configurations, each editor will create its own memory file. For example, if you use the common @modelcontextprotocol/server-memory server, VS Code might store data in ~/.mcp-memory/vscode-memory.json and Cursor in ~/.mcp-memory/cursor-memory.json. They are separate files, so the AI in VS Code won't know what the AI in Cursor learned.

Why You Might Want Them to Share Data

If you switch between VS Code and Cursor frequently, you might want the AI in both to remember the same project conventions, coding style, or frequently used commands. For instance, if you tell the AI in Cursor that your team uses tabs instead of spaces, you'd want VS Code to know that too. Sharing the memory server would avoid repeating yourself.

However, sharing also has downsides. If you use different AI models or different extension setups in each editor, the memory might contain conflicting information. Also, if you share a single file, both editors need to handle concurrent writes properly—most memory servers are not designed for multi-client access, which can lead to data corruption.

How to Make VS Code and Cursor Use the Same Memory Server

To share data, you need to configure both editors to point to the exact same server endpoint or file path. Here are the general steps:

  1. Decide on a storage location. For a local file, choose a path that both editors can access, like C:\shared\mcp-memory on Windows or /Users/you/shared-memory on macOS.
  2. In VS Code, open your MCP settings file (usually .mcp.json in your project or the user-level mcp.json) and set the args to point to that path.
  3. In Cursor, go to Settings > MCP and add a new server with the same command and arguments, again pointing to the same path.
  4. Restart both editors and test by asking the AI to remember something in one, then asking the other if it knows it.

If you use a remote MCP server (like a hosted memory service), you just need to use the same URL and any required API key in both editors. That's often simpler and avoids file-locking issues.

Common Problems and Misconceptions

One common misconception is that MCP servers are automatically shared because they use the same protocol. That’s not true—the protocol just defines how to talk, not where to store data. Another issue is that some users think Cursor is a fork of VS Code and therefore shares settings. While Cursor is based on VS Code, it maintains separate user data directories to avoid conflicts.

If you try to share a local file, you might encounter permission errors or file locking. On Windows, two processes can often read the same file, but writing simultaneously can cause issues. Some memory servers use SQLite, which supports multiple readers but only one writer at a time. If both editors try to write at once, you might get a “database is locked” error.

Alternative Approaches to Shared Memory

If you don't want to deal with shared MCP servers, there are other ways to give both editors similar context:

  • Use a project-level .mcp.json file that is committed to your repository. Both VS Code and Cursor can be configured to read this file, so anyone on the team gets the same server setup.
  • Use a cloud-based memory service that both editors connect to, but be aware of privacy implications.
  • Manually copy the memory file between editors if you only need occasional sharing.

Frequently Asked Questions

Can I use the same MCP server in VS Code and Cursor at the same time?

Yes, you can configure both to connect to the same server. However, if the server is a local file, you might run into write conflicts. A remote server or a database that supports concurrent access is safer.

Do I need to install the MCP server twice?

No, you only need to install the server once on your system. But you need to configure each editor to launch it with the same arguments. The server runs as a separate process, so both editors can start their own instance of it.

Will my memory data be visible to other people?

If you use a local file, only you and anyone with access to your computer can see it. If you use a remote server, the data is stored on that server, so its privacy policy applies. Always check what data you're sending.

What if I only want to share memory for one project?

You can use a project-level .mcp.json file that defines the server for that project only. Both editors will read that file, and the memory will be scoped to that project.

Is there a risk of data corruption when sharing?

Yes, if two editors write to the same file simultaneously, the file can become corrupted. Using a server that handles concurrent writes (like a SQLite database with WAL mode) reduces this risk, but it's still not recommended for heavy simultaneous use.