Claude Desktop 的火山引擎知识库 MCP 服务器,可提供知识库搜索和对话功能,为用户带来便捷的知识查询与交流体验。
git clone git@github.com:suqidan/volc-kb-mcp.git
cd volc-kb-mcp
pip install -r requirements.txt
编辑Claude Desktop配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json添加以下配置:
{
"mcpServers": {
"kb": {
"command": "python",
"args": [
"/path/to/kb_mcp.py"
]
}
}
}
设置Claude MCP JSON配置后,只需告知Claude使用知识库,它将提示输入相关凭证信息,包括ak, sk, account_id以及collection_name。
await configure(
access_key="your_access_key",
secret_key="your_secret_key",
account_id=your_account_id,
collection_name="your_collection_name"
)
result = await search_knowledge("你的查询")
messages = [
{"role": "system", "content": "你是一个有帮助的助手"},
{"role": "user", "content": "你好"}
]
response = await chat_completion(messages)
配置火山引擎凭证和知识库设置。 参数:
access_key (str): 火山引擎访问密钥secret_key (str): 火山引擎安全密钥account_id (int): 火山引擎账户IDcollection_name (str): 知识库集合名称搜索知识库。 参数:
query (str): 搜索查询字符串获取对话补全响应。 参数:
messages (List[dict]): 对话消息列表stream (bool, 可选): 是否使用流式响应temperature (float, 可选): 温度参数遇到问题时:
本项目采用 MIT 许可证。
感谢以下项目和团队的支持: