DEV Community

Abdeljabbar Elassali
Abdeljabbar Elassali

Posted on Originally published at vilix.ai

How to set up an MCP memory server for ChatGPT, Claude & Cursor

#ai

How to set up an MCP memory server for ChatGPT, Claude & Cursor

An MCP memory server stores context such as decisions, preferences, and project facts, and exposes tools for reading and writing it through the Model Context Protocol. Configure and authenticate each compatible client, then instruct it to use those tools. Connected ChatGPT, Claude, and Cursor clients can access the same saved store.

This guide goes over what the server actually is, common authentication options, the high-level steps per tool, and the pitfalls that make memory look connected when it is not.

What is an MCP memory server, exactly?

It is an MCP server whose job is persistence. Whereas a typical MCP server might expose tools to query a database or edit files, a memory server exposes tools to store and retrieve context. The model itself remains stateless; MCP is just the wiring to get it to reach a system that remembers. If the protocol itself is new to you, What is MCP (Model Context Protocol)? is the prerequisite read.

A memory server generally offers a small set of capabilities:

  • Write, save a memory: a decision, a constraint, a preference, a fact about the current project.
  • Search, retrieve the memories most relevant to the current conversation, using semantic search, keyword search, or a combination.
  • List or read, pull back stored records so you can inspect or correct them.

The point of doing this through MCP rather than a tool-specific plugin is reach: one server, many clients. The same memory is addressable from supported clients such as ChatGPT, Claude, Cursor, and Codex after each is configured. The Gemini app is not currently a supported Vilix AI custom-MCP client.

OAuth or bearer tokens: how does authentication work?

OAuth and bearer-token configuration are two common authentication options for remote MCP servers. The client still needs a server entry in its settings or configuration file.

  • OAuth connection, you click connect, authorise in a browser, and the client and server exchange tokens automatically. This can reduce manual credential handling. A compatible client can refresh tokens when supported, though revocation or expired refresh credentials may require sign-in.
  • Bearer-token configuration, you configure the server URL and token using the format your client supports. Use secure credential storage or environment variables where supported, and keep real tokens out of shared or committed configuration.

For clients that use an mcpServers JSON structure with header support, a generic example looks like this. It is not a universal configuration; check your client's schema and store real credentials securely:

{
  "mcpServers": {
    "memory": {
      "url": "https://your-memory-server.example.com/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

With either method, successful authentication lets the client call the server's tools. OAuth can reduce manual credential handling, but the connection still needs to be configured and tested.

How do you connect an MCP memory server to Claude?

Claude supports remote MCP servers through its connectors interface. At a high level:

  1. Open settings and find the connectors or MCP section.
  2. Add the server. If it supports OAuth, you authorise in a browser tab and return connected. Use the authentication methods supported by that client and server. For Vilix AI, follow the current setup guide for the client you are using.
  3. Confirm the server's tools appear as available, then test by asking Claude to save and recall a memory.

The verification step is not optional. A server can be listed and still fail silently on its first real call.

Wondering what Claude already remembers before you connect anything? See Does Claude Fable 5 have memory across chats? for where the native memory stops and what the MCP layer adds.

How do you connect an MCP memory server to ChatGPT and Cursor?

The shape is the same; the surface differs. In ChatGPT, use the current MCP or plugin setup supported by your plan and interface, including its authentication options. In Cursor, MCP servers are configured in the MCP settings, often via the same JSON structure shown above. Cursor is editor-centric; the value of shared memory is highest when the decisions you made in chat are visible while you code. See Keep context between Claude and Cursor for why that handoff is the part that usually breaks.

Whichever tool you start with, the goal is one logical memory store reachable from all of them, not three separate stores that happen to be named the same thing.

What are the common pitfalls?

  • Per-tool silos. Connecting a different memory server to each tool gives you the illusion of memory with none of the portability. The store must be shared, not just the pattern.
  • Expired tokens. A configured bearer token stops working if it expires, is revoked, or is replaced. OAuth clients can refresh tokens automatically, but revocation, expired refresh credentials, or changed permissions may still require sign-in.
  • No write discipline. A connected server that nothing ever writes to stays empty. Memory needs a habit, not just a connection.
  • Unfiltered retrieval. A growing archive needs ranking and useful summaries so important decisions are not buried in unrelated history.
  • No way to inspect or delete. If you cannot read back what is stored, you cannot correct a wrong memory, and an incorrect memory can mislead later responses.

How does Vilix AI provide hosted memory?

Vilix AI is a persistent memory layer delivered as a single MCP connection. The hosted service handles memory storage while you connect and authenticate each supported client to the same account. OAuth works in clients that support it; headless setups can use the supported API-key/Bearer configuration. Add the Vilix AI instructions and verify get_context with the latest message, reply composition, save_turn with the exact exchange, then return of the saved reply. Reuse chat_id within a conversation. It stores the exchanges sent by your clients and returns relevant available context. History and search features depend on your plan; you can inspect, export, or delete saved memories through your account controls. It is not the only way to get an MCP memory server; it is the version where the hosted service handles memory storage while you configure each client.

If you would rather skip the server-maintenance work entirely, you can try Vilix AI free. The Free plan has no time limit, and Pro includes a 7-day trial.

Frequently asked questions

Do I have to build my own MCP memory server?

No. You can run an open-source or self-hosted server if you want full control, or use a hosted memory layer that exposes itself as an MCP server so you only connect, not operate.

Does one MCP memory server really work across ChatGPT, Claude, and Cursor?

A single server can serve multiple clients when they support its transport, authentication, and tools. Connect each client to the same store, configure the memory workflow, and test a successful save and retrieval.

Is OAuth or manual config more secure?

OAuth can reduce manual handling of long-lived API tokens, but its safety still depends on the client's credential storage and the server's authorization controls. Bearer tokens also need secure storage and appropriate permissions. Manual configuration is a setup method and can be used with either authentication approach.

Why isn't my MCP memory server remembering anything?

First check whether a write call succeeded and whether the read uses the same account and store. A connection exposes the tools, but your client still needs instructions or orchestration that saves exchanges and retrieves them.

Can I delete what an MCP memory server has stored?

You should be able to. Inspect-and-delete is a baseline requirement for trustworthy memory. If a memory system does not let you read back and remove records, treat that as a reason not to rely on it.

Originally published on Vilix AI.

Top comments (0)