MemGPT MCP Server is an MCP server that provides a persistent conversation memory system for large language models across multiple external model providers. It connects directly to APIs and endpoints for Anthropic, OpenAI, OpenRouter, and local Ollama instances, enabling client environments to preserve conversation state across disparate queries. Developers, AI engineers, and interactive assistant users employ this server to overcome standard session context limits by maintaining a structured chronological history of chat interactions. The server exposes dedicated tools to send messages through selected providers, fetch stored conversation history with configurable retrieval limits or full transcript exports, wipe memory when required, and switch both active providers and specific model identifiers dynamically. By offloading conversational persistence to a local TypeScript service over standard input and output, users can run tasks across different models—such as comparing Claude 3.5 Sonnet outputs with local Llama models—while keeping continuous session memory intact. This architecture allows client applications to coordinate interactions without manually reinjecting entire previous transcripts into every prompt.
Category: AI & LLM Tooling
Tags: context, llm, memory, persistence
npm install. 3. Build the server by executing npm run build. 4. Open the Claude Desktop configuration file located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows. 5. Add the letta-memgpt entry under mcpServers pointing to your build path: json { "mcpServers": { "letta-memgpt": { "command": "/path/to/memgpt-server/build/index.js", "env": { "OPENAI_API_KEY": "your-openai-key", "ANTHROPIC_API_KEY": "your-anthropic-key", "OPENROUTER_API_KEY": "your-openrouter-key" } } } } 6. Supply your relevant API keys and restart Claude Desktop.Part of MCP Servers
MemGPT MCP Server allows AI clients to chat with various language model providers while retaining persistent conversation histories. It provides tools to send prompts, inspect stored memories chronologically with optional limits, clear conversation logs, and dynamically switch both active model providers and target models during an ongoing session.
The server supports Anthropic, OpenAI, OpenRouter, and Ollama. Through these providers, you can access models like Claude 3.5 Sonnet, Claude 3 Opus, GPT-4o, GPT-4 Turbo, various OpenRouter routing endpoints, and locally installed models hosted through Ollama like Llama 2 and Code Llama.
MemGPT MCP Server works with Claude Desktop on macOS and Windows, as well as any other client that supports the Model Context Protocol over standard input and output streams. Configuration requires adding the built server executable path and provider API keys to the client settings file.
You retrieve stored conversations using the memory inspection tool. By default, the tool returns the ten most recent messages in chronological order with timestamps. You can provide a specific numeric limit to fetch more or fewer messages, or pass a null limit to retrieve the complete stored history.