MirrorYuChen
MirrorYuChen
Published on 2025-04-26 / 10 Visits
0
0

mem0-mcp工具搭建笔记

mem0-mcp工具搭建

1.安装uv工具

# 1.MacOS和Linux
# 下面两种种方式任选其一
>> curl -LsSf https://astral.sh/uv/install.sh | sh
>> wget -qO- https://astral.sh/uv/install.sh | sh
# 安装特定版本
>> curl -LsSf https://astral.sh/uv/0.6.9/install.sh | sh
# 2.Windows
>> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# 安装特定版本
>> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.6.9/install.ps1 | iex"

​ 添加系统环境变量

export LOCAL_BIN=/root/.local/bin
export PATH=$PATH:$LOCAL_BIN

2.工程源码下载

>> git clone git@github.com:mem0ai/mem0-mcp.git

3.申请mem0的api-key

​ 地址:https://app.mem0.ai/

4.启动mem0-mcp服务

# 1.进入工程路径
>> cd mem0-mcp
# 2.初始化uv环境
>> uv venv
# 3.激活虚拟环境
>> source .venv/bin/activate
# 4.使用uv安装依赖
>> uv pip install -e .
# 5.更新环境配置文件.env中的key
MEM0_API_KEY=your_api_key_here
# 6.启动服务,默认运行端口为0.0.0.0:8080
uv run main.py
# 7.也可以通过以下指令来指定端口
uv run main.py --host <your host> --port <your port>

参考资料


Comment