memgpt-mcp-server
A Model Context Protocol (MCP) server that provides persistent memory and multi-model LLM support.
Documentation
MemGPT MCP Server
A TypeScript-based MCP server that implements a memory system for LLMs. It provides tools for chatting with different LLM providers while maintaining conversation history.
Features
Tools
- `chat` - Send a message to the current LLM provider
- Takes a message parameter
- Supports multiple providers (OpenAI, Anthropic, OpenRouter, Ollama)
- `get_memory` - Retrieve conversation history
- Optional `limit` parameter to specify number of memories to retrieve
- Pass `limit: null` for unlimited memory retrieval
- Returns memories in chronological order with timestamps
- `clear_memory` - Clear conversation history
- Removes all stored memories
- `use_provider` - Switch between different LLM providers
- Supports OpenAI, Anthropic, OpenRouter, and Ollama
- Persists provider selection
- `use_model` - Switch to a different model for the current provider
- Supports provider-specific models:
- Anthropic Claude Models:
- Claude 3 Series:
- `claude-3-haiku`: Fastest response times, ideal for tasks like customer support and content moderation
- `claude-3-sonnet`: Balanced performance for general-purpose use
- `claude-3-opus`: Advanced model for complex reasoning and high-performance tasks
- Claude 3.5 Series:
- `claude-3.5-haiku`: Enhanced speed and cost-effectiveness
- `claude-3.5-sonnet`: Superior performance with computer interaction capabilities
- Claude 3 Series:
- OpenAI: 'gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo'
- OpenRouter: Any model in 'provider/model' format (e.g., 'openai/gpt-4', 'anthropic/claude-2')
- Ollama: Any locally available model (e.g., 'llama2', 'codellama')
- Anthropic Claude Models:
- Persists model selection
- Supports provider-specific models:
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchInstallation
To use with Claude Desktop, add the server config:
On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.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"
}
}
}
}Environment Variables
- `OPENAI_API_KEY` - Your OpenAI API key
- `ANTHROPIC_API_KEY` - Your Anthropic API key
- `OPENROUTER_API_KEY` - Your OpenRouter API key
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Recent Updates
Claude 3 and 3.5 Series Support (March 2024)
- Added support for latest Claude models:
- Claude 3 Series (Haiku, Sonnet, Opus)
- Claude 3.5 Series (Haiku, Sonnet)
Unlimited Memory Retrieval
- Added support for retrieving unlimited conversation history
- Use `{ "limit": null }` with the `get_memory` tool to retrieve all stored memories
- Use `{ "limit": n }` to retrieve the n most recent memories
- Default limit is 10 if not specified
Frequently asked questions
What is memgpt-mcp-server?
memgpt-mcp-server is A Model Context Protocol (MCP) server that provides persistent memory and multi-model LLM support.
How do I install memgpt-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is memgpt-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/Vic563/Memgpt-MCP-Server and has 27 stars.
Related MCP tools
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others. Built for the Model Context Protocol to enhance AI capabiliti
Fay是一个帮助数字人(2.5d、3d、移动、pc、网页)或大语言模型(openai兼容、deepseek)连通业务系统的mcp框架。 JavaScript-based implementation. Trusted by 12000+ developers.
CTTF: MCP integration between Cursor and Figma, allowing Cursor Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients. JavaScript-based implementation.
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities JavaScript-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP