Vic563_Memgpt MCP Server

Vic563_Memgpt MCP Server

🚀 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:切换到当前提供商的其他模型。
    • 支持特定于提供商的模型:
      • Anthropic Claude 模型
        • Claude 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')。
    • 持久化模型选择。

📦 安装指南

与 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"
}
}
}
}

💻 使用示例

基础用法

# 安装依赖
npm install

# 构建服务器
npm run build

# 带有自动重建功能的开发
npm run watch
  • 0 关注
  • 0 收藏,8 浏览
  • system 提出于 2025-09-20 12:18

相似服务问题