LLM工具化MCP服务器
MCP(模型上下文协议)服务器为BambiSleep知识库提供RAG(检索增强生成)和CAG(上下文增强生成)功能。
特性
工具
- rag_query:对BambiSleep数据执行RAG查询
- cag_text:从知识图构建上下文增强生成
- 提取物:提取知识图的实体和关系
- 语义研究:跨内容的语义搜索
- 获取元数据:获取知识库元数据
资源
bambisleep://data/structured-全结构化JSON数据bambisleep://data/faq-常见问题解答内容bambisleep://data/sessions-会话索引bambisleep://data/triggers-触发器文档bambisleep://data/safety-安全信息
安装
cd llm-toolshed-mcp-server
npm install用法
运行服务器
npm start在Claude桌面中配置
添加到您的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):
{
"mcpServers": {
"llm-toolshed": {
"command": "node",
"args": ["/home/melkanea/llm-toolshed-mcp-server/index.js"]
}
}
}数据结构
服务器使用来自bambisleep.info的结构化JSON数据:
{
"metadata": {
"source": "bambisleep.info",
"fetched_at": "timestamp",
"type": "bambi_sleep_wiki_content",
"version": "1.0"
},
"content": {
"faq": {...},
"sessions": {...},
"triggers": {...},
"safety": {...},
"transcripts": {...}
},
"rag_vectors": {...},
"cag_context": {...}
}查询示例
RAG查询
{
"name": "rag_query",
"arguments": {
"query": "what is bambi sleep",
"section": "faq",
"max_results": 5
}
}CAG背景
{
"name": "cag_context",
"arguments": {
"entity": "Bambi",
"depth": 2
}
}提取实体
{
"name": "extract_entities",
"arguments": {
"section": "triggers"
}
}建筑
- MCP-SDK:使用@modelcontextprotocol/sdk实现服务器
- 资源:将BambiSleep数据作为MCP资源公开
- 工具:为LLM代理提供RAG/CAG工具
- 运输:基于标准的沟通
许可证
麻省理工学院
