使用说明
MCP研究助理服务器
由 BINATI A分析
一种模型上下文协议(MCP)服务器,使用向量嵌入和语义搜索提供智能研究数据管理。此服务器使您能够使用ChromaDB和OpenAI嵌入来保存、组织和检索研究内容。
特性
- 矢量存储器:使用ChromaDB进行高效存储和检索
- 主题组织:按主题组织研究内容
- 去重:使用哈希进行自动重复数据删除
- 语义搜索:使用自然语言查询研究内容
- 多个主题:同时管理多个研究主题
- OpenAI嵌入:使用OpenAI的文本嵌入3-small模型
安装
使用uvx(推荐)
uvx mcp-research-assistant
使用紫外线
uv pip install mcp-research-assistant
使用pip
pip install mcp-research-assistant
来源
git clone https://github.com/CyprianFusi/mcp-research-assistant.git
cd mcp-research-assistant
uv pip install -e .
配置
环境变量
必修的:
OPENAI_API_KEY-用于嵌入的OpenAI API密钥RESEARCH_DB_PATH-存储研究数据库的基本路径- A.
research_chroma_dbs将在此路径内创建目录 - 例子:
/path/to/data(将创建/path/to/data/research_chroma_dbs) - 例子:
~/.research_assistant_mcp(将创建~/.research_assistant_mcp/research_chroma_dbs)
- A.
创建 .env 使用您的配置文件:
OPENAI_API_KEY=your-api-key-here
RESEARCH_DB_PATH=/path/to/data
Claude桌面配置
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"research-assistant": {
"command": "uvx",
"args": ["mcp-research-assistant"],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"RESEARCH_DB_PATH": "/path/to/data"
}
}
}
}
注:两者 OPENAI_API_KEY 和 RESEARCH_DB_PATH 是必需的。数据库将存储在 RESEARCH_DB_PATH/research_chroma_dbs/.
可用工具
1.保存_研究_数据
将研究内容保存到矢量数据库以供将来检索。
参数:
content(List[str]):要保存的文本内容列表topic(str):用于组织数据的主题名称(创建单独的数据库)
例子:
Save these research findings about AI to the "artificial-intelligence" topic
2.查询_搜索_数据
使用自然语言查询保存的研究内容。
参数:
query(str):自然语言查询topic(str):要搜索的主题(默认值:“default”)k(int):要返回的结果数(默认值:5)
例子:
Query the "artificial-intelligence" topic for information about transformers
3.列表主题
列出所有可用的研究主题及其文档数量。
例子:
List all available research topics
4.删除主题
删除研究主题及其所有相关数据。
参数:
topic(str):要删除的主题名称
例子:
Delete the "old-research" topic
5.get_topic_info
获取特定主题的详细信息。
参数:
topic(str):主题名称
例子:
Get information about the "artificial-intelligence" topic
使用示例
一旦配置了Claude Desktop或其他MCP客户端,您就可以:
- “将这篇关于机器学习的文章保存到我的‘ml研究’主题中”
- “查询我的‘ml研究’以获取有关神经网络的信息”
- “列出我的所有研究主题”
- “获取有关‘量子计算’主题的信息”
- “删除‘旧笔记’主题”
技术细节
- 协议:模型上下文协议(MCP)
- 运输标准: stdio
- 矢量数据库:ChromaDB
- 嵌入:OpenAI文本嵌入3-small
- 存储:本地文件系统位于
RESEARCH_DB_PATH/research_chroma_dbs/
需求
- Python 3.11或更高版本
- OpenAI API密钥
- 依赖项:chromadb、langchain、fastmcp、openai
发展
设置开发环境
# Clone the repository
git clone https://github.com/CyprianFusi/mcp-research-assistant.git
cd mcp-research-assistant
# Install with development dependencies
uv pip install -e .
许可证
此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。
作者
塞浦路斯福西
- 电子邮件:info@binati-ai.com
- github:https://github.com/CyprianFusi/