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
:具有卓越的计算机交互能力
- 克劳德3系列:
- 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
环境变量
OPENAI_API_KEY
- 您的 OpenAI API 密钥ANTHROPIC_API_KEY
- 您的 Anthropic API 密钥OPENROUTER_API_KEY
- 您的 OpenRouter API 密钥
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们建议使用MCP Inspector :
检查器将提供一个 URL 来访问浏览器中的调试工具。
最近更新
Claude 3 和 3.5 系列支持(2024 年 3 月)
- 增加了对最新 Claude 模型的支持:
- 克劳德3系列(俳句、十四行诗、作品)
- 克劳德3.5系列(俳句、十四行诗)
无限记忆检索
- 增加了对检索无限对话历史记录的支持
- 使用
{ "limit": null }
和get_memory
工具来检索所有存储的记忆 - 使用
{ "limit": n }
检索最近的 n 条记忆 - 如果未指定,默认限制为 10
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
基于 TypeScript 的服务器,为大型语言模型 (LLM) 提供内存系统,允许用户与多个 LLM 提供商交互,同时保留对话历史记录并提供用于管理提供商和模型配置的工具。
Related Resources
Related MCP Servers
- -securityAlicense-qualityRuns a language server and provides tools for communicating with it. Language servers excel at tasks that LLMs often struggle with, such as precisely understanding types, understanding relationships, and providing accurate symbol references.Last updated -401GoBSD 3-Clause
- -securityFlicense-qualityA TypeScript-based MCP server that enables LLM agents to interact with Gel databases through natural language, providing tools to learn database schemas, validate and execute EdgeQL queries.Last updated -5TypeScript
- -securityFlicense-qualityA TypeScript MCP server that allows querying documents using LLMs with context from locally stored repositories and text files through a RAG (Retrieval-Augmented Generation) system.Last updated -1JavaScript
- -securityAlicense-qualityAn MCP server that enables LLMs to understand and work with TypeScript APIs they haven't been trained on by providing structured access to TypeScript type definitions and documentation.Last updated -7326TypeScriptMIT License