# Shared Memory Graph for Claude & ChatGPT Over MCP

> Source: <https://dev.to/felipejac/shared-memory-graph-for-claude-chatgpt-over-mcp-27km>
> Published: 2026-08-19 13:36:46+00:00

The community released a shared memory graph for [Claude](https://dev.to/go/claude) and [ChatGPT](https://dev.to/go/chatgpt) that runs over the MCP (Message‑Centric Protocol). The graph is a lightweight, in‑memory structure that holds conversation history, task state, and contextual data. Any participating AI model can query it, eliminating the need to ship large context strings. This speeds responses and keeps multi‑model interactions coherent.

The implementation is open‑source and plugs into existing AI stacks. It offers a simple API that [n8n](https://dev.to/go/n8n) workflows, custom agents, or any microservice can call to read or write to the graph. Early adopters report noticeable performance gains when coordinating Claude and ChatGPT in a single task pipeline.

**Q: Does this require a new infrastructure stack?**

A: No. The graph runs in memory on the same host that runs your agents. It can be embedded in a container or a serverless function that already hosts your n8n instance.

**Q: Can I use the graph with other LLMs beyond Claude and ChatGPT?**

A: The API is generic. As long as the model can accept a structured context payload, you can plug it in. The community is already experimenting with [Gemini](https://dev.to/go/gemini) and [Llama](https://dev.to/go/llama)‑2.

**Q: How do I handle persistence if my service restarts?**

A: The graph can be serialized to a lightweight store (e.g., Redis or a JSON file) on shutdown and rehydrated on startup. This keeps the in‑memory state fast while providing durability.

*Originally published on Automations Cookbook.*
