
MEM-agent MCP 服务器
概览
这是我们模型driaforall/mem-agent的MCP服务器,可以连接到Claude Desktop或Lm Studio等应用,与类似黑曜石的内存系统交互。 - macOS(金属后端)- Linux(配备GPU,vLLM后端) - 在 ARM64 Linux 上,默认不安装 vLLM,以避免构建失败(没有稳定轮子和源代码构建会失败)。- 安装在没有 vLLM 的情况下会成功;你可以:- 使用默认的 OpenRouter/OpenAI 路径(无需本地 vLLM),或者- 在兼容的 x86_64 主机上运行 vLLM,并指向客户端(参见代理/程序 model.py create_vllm_client)。 - 如果你有本地运行的LiteLLM代理(例如4000端口),请通过.env配置客户端: - 然后使用以下任一:- CLI: make chat-cli - MCP over STDIO: make serve-mcp - MCP over HTTP: make serve-mcp-http 注意:在 ARM64 Linux 上,推荐采用这个配置,而不是 vLLM。 1. 做 check-uv(如果你已经安装了 UV,可以跳过这一步)。2. 让安装:在 MacOS 上安装 LmStudio。3.
概述(AI 翻译)
这是我们模型driaforall/mem-agent的MCP服务器,可以连接到Claude Desktop或Lm Studio等应用,与类似黑曜石的内存系统交互。
支持平台
- macOS(金属后端)
- Linux(配备GPU,vLLM后端)
平台说明:aarch64(ARM64) Linux
- 在 ARM64 Linux 上,默认不安装 vLLM,以避免构建失败(任何稳定轮子和源代码构建都不会失败)。
- 安装无需 vLLM 也能成功;你可以:
- 使用默认的OpenRouter/OpenAI路径(无需本地vLLM),或
- 在兼容的x86_64主机上运行vLLM,并指向客户端(参见agent/model.py create_vllm_client)。
运行指令
使用 LiteLLM 代理(兼容 OpenAI)
-
如果你有本地运行的LiteLLM代理(例如4000端口),请通过.env配置客户端:
-
验证连接性:
-
然后使用以下任一:
-
CLI:
make chat-cli -
MCP通过STDIO:
make serve-mcp -
通过HTTP的MCP:
make serve-mcp-http
注意:在 ARM64 Linux 上,推荐采用这个配置,而不是 vLLM。
make check-uv)(如果你已经安装了UV,跳过这一步)。make install:在 MacOS 上安装 LmStudio。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mem-agent-mcp
This is an MCP server for our model driaforall/mem-agent, which can be connected to apps like Claude Desktop or Lm Studio to interact with an obsidian-like memory system.
Supported Platforms
- macOS (Metal backend)
- Linux (with GPU, vLLM backend)
Platform note: aarch64 (ARM64) Linux
- On ARM64 Linux, vLLM is not installed by default to avoid build failures (no stable wheels and source builds can fail).
- Installation will succeed without vLLM; you can:
- Use the default OpenRouter/OpenAI path (no local vLLM needed), or
- Run vLLM on a compatible x86_64 host and point the client at it (see agent/model.py create_vllm_client).
Running Instructions
Using a LiteLLM proxy (OpenAI-compatible)
- If you have a LiteLLM proxy running locally (e.g., on port 4000), configure the client via .env:
VLLM_HOST=localhost
VLLM_PORT=4000
- Verify connectivity:
curl http://localhost:4000/v1/models
- Then use either of these:
- CLI:
make chat-cli - MCP over STDIO:
make serve-mcp - MCP over HTTP:
make serve-mcp-http
- CLI:
Note: On ARM64 Linux, this is the recommended setup instead of vLLM.
make check-uv(if you have uv installed, skip this step).make install: Installs LmStudio on MacOS.make setup: This will open a file selector and ask you to select the directory where you want to store the memory.make run-agent: If you’re on macOS, this will prompt you to select the precision of the model you want to use. 4-bit is very usable as tested, and higher precision models are more reliable but slower.make generate-mcp-json: Generates themcp.jsonfile. That will be used in the next step.- Instructions per app/provider:
- Claude Desktop:
- Copy the generated
mcp.jsonto the where yourclaude_desktop.jsonis located, then, quit and restart Claude Desktop. Check this guide for detailed instructions.
- Copy the generated
- Lm Studio:
- Copy the generated
mcp.jsonto themcp.jsonof Lm Studio. Check this guide for detailed instructions. If there are problems, change the name of the model in .mlx_model_name (found in the root of this repo) frommem-agent-mlx-4bitormem-agent-mlx-8bittomem-agent-mlx@4bitormem-agent-mlx@8bitrespectively.
- Copy the generated
- Claude Desktop:
Memory Instructions
- Each memory directory should follow the structure below:
memory/
├── user.md
└── entities/
└── [entity_name_1].md
└── [entity_name_2].md
└── ...
user.mdis the main file that contains information about the user and their relationships, accompanied by links to the enity file in the format of[[entities/[entity_name].md]]per relationship. The link format should be followed strictly.entities/is the directory that contains the entity files.- Each entity file follows the same structure as
user.md.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →