ou-usei/usei-mcp-server
3.1
If you are the rightful owner of usei-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project is a Model-Client Protocol (MCP) server implemented in Python, designed to facilitate tool extensions and memory systems using vector databases.
Tools
3
Resources
0
Prompts
0
MCP Server (Python)
Model-Client Protocol (MCP) 服务器的学习项目。
目前主要采用Python进行“工具”扩展。
功能
功能1:基于Python脚本的计算器
calculator.add,一个简单的加法器,
功能2:基于向量数据库的记忆系统-实现带状态的MCP服务
memory.save 和 memory.recall,分别实现保存和提取记忆。实现了基本的用户隔离。
技术栈: sentence-transformers + LanceDB
快速开始
1. 环境与安装
需要 Python 3.9+。推荐使用 uv 进行包管理。
# 克隆项目
git clone <your-repository-url>
cd usei-mcp-server
# (推荐) 创建虚拟环境并激活
python -m venv .venv && source .venv/bin/activate
# 安装依赖
uv pip install -r requirements.txt
2. 配置
在项目根目录创建一个 .env 文件,用于配置 LanceDB 数据库的路径。可实现任意mcp客户端,访问指定数据库。
# .env
LANCEDB_PATH="./lancedb_memory"
3. 运行
python src/server.py
服务器启动后,将开始监听来自客户端的请求。
4.MCP客户端使用方法(win)
这是一个示例配置,你需要将路径修改为你自己环境中的绝对路径。
command: 指向你虚拟环境中的python.exe。args: 指向项目中的src/server.py。
{
"mcpServers": {
"usei-mcp": {
"command": "C:/path/to/your/project/usei-mcp-server/.venv/Scripts/python.exe",
"args": [
"C:/path/to/your/project/usei-mcp-server/src/server.py"
]
}
}
}