MemGPT MCP Server

by Vic563

Integrations

  • Allows communication with locally available Ollama models (like llama2, codellama) while maintaining persistent conversation history.

  • Enables messaging with OpenAI models including gpt-4o, gpt-4o-mini, and gpt-4-turbo while preserving conversation memory across sessions.

MemGPT MCP 服务器

一个基于 TypeScript 的 MCP 服务器,实现了 LLM 的记忆系统。它提供了与不同 LLM 提供商聊天的工具,同时保留了对话历史记录。

特征

工具

  • chat - 向当前 LLM 提供商发送消息
    • 接受消息参数
    • 支持多个提供商(OpenAI、Anthropic、OpenRouter、Ollama)
  • get_memory - 检索对话历史记录
    • 可选的limit参数用于指定要检索的记忆数量
    • 通行证limit: null无限制内存检索
    • 按时间顺序返回带有时间戳的记忆
  • clear_memory - 清除对话历史记录
    • 删除所有存储的记忆
  • use_provider - 在不同的 LLM 提供商之间切换
    • 支持 OpenAI、Anthropic、OpenRouter 和 Ollama
    • 坚持提供商选择
  • use_model - 为当前提供程序切换到不同的模型
    • 支持特定于提供商的模型:
      • 人择克劳德模型:
        • 克劳德3系列:
          • claude-3-haiku :响应时间最快,非常适合客户支持和内容审核等任务
          • claude-3-sonnet :均衡的通用性能
          • claude-3-opus :用于复杂推理和高性能任务的高级模型
        • Claude 3.5系列:
          • claude-3.5-haiku :提高速度和成本效益
          • claude-3.5-sonnet :具有卓越的计算机交互能力
      • OpenAI:“gpt-4o”、“gpt-4o-mini”、“gpt-4-turbo”
      • OpenRouter:任何“提供者/模型”格式的模型(例如,“openai/gpt-4”、“anthropic/claude-2”)
      • Ollama:任何本地可用的模型(例如“llama2”、“codellama”)
    • 保留模型选择

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run watch

安装

要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 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" } } } }

环境变量

  • OPENAI_API_KEY - 您的 OpenAI API 密钥
  • ANTHROPIC_API_KEY - 您的 Anthropic API 密钥
  • OPENROUTER_API_KEY - 您的 OpenRouter API 密钥

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们建议使用MCP Inspector

npm run inspector

检查器将提供一个 URL 来访问浏览器中的调试工具。

最近更新

Claude 3 和 3.5 系列支持(2024 年 3 月)

  • 增加了对最新 Claude 模型的支持:
    • 克劳德3系列(俳句、十四行诗、作品)
    • 克劳德3.5系列(俳句、十四行诗)

无限记忆检索

  • 增加了对检索无限对话历史记录的支持
  • 使用{ "limit": null }get_memory工具来检索所有存储的记忆
  • 使用{ "limit": n }检索最近的 n 条记忆
  • 如果未指定,默认限制为 10
-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

基于 TypeScript 的服务器,为大型语言模型 (LLM) 提供内存系统,允许用户与多个 LLM 提供商交互,同时保留对话历史记录并提供用于管理提供商和模型配置的工具。

  1. Features
    1. Tools
  2. Development
    1. Installation
      1. Environment Variables
      2. Debugging
    2. Recent Updates
      1. Claude 3 and 3.5 Series Support (March 2024)
      2. Unlimited Memory Retrieval
    ID: 3cynbzxe8h