使用说明
你在潮湿的地方醒来。不是湿的,确切地说是湿的。那种属于旧图书馆、地下室档案馆、教堂后室的潮湿,已经没有人去了。气味是纸和时间,还有一种你无法形容的微弱的电味。
在你想得太仔细之前,一些小东西落在了你的脚上。你往下看。
一个流浪汉。蹲下,不太可能,拿着一堆高得遮住腰部以上所有东西的纸。它再次踢你的鞋子——一次,两次——然后把整堆鞋子放在你面前的地板上,发出一声努力的咕哝,这可能是职业上的满足感。
从堆中的某个地方,它产生一张小卡并将其举起来。写在上面,用非常谨慎的字母:“它不存在,它正在建设中。
你不懂古希腊语。霍布似乎对此并不感到惊讶。它翻转卡片。对方说: 找不到知识。它已经建成。
霍布对着报纸、天花板、天花板之外的某个地方——对着“ 很多东西都需要有意义 --然后它向你做手势,具体来说,它带着一种只有在档案馆工作了很长时间的生物才能应付的巨大耐心。
然后,它盘腿坐在桩前,等待你开始。
hob_hud_mcp
一个用于语料库智能的统一MCP服务器——在三个互补的数据库层上摄取、索引、搜索和合成大量文档。
三个数据库。十个工具。一个目的:理解庞大的语料库。
建筑
两层,共十个工具。
原料层 --完全访问每个数据库。当管道工具不够时使用这些工具。
| 工具 | 数据库 | 它给你什么 |
|---|---|---|
hud_mongo |
MongoDB | 文档CRUD、聚合、文本搜索、模式推理、索引管理 |
hud_graph |
Neo4j | 任意Cypher读/写、模式自检、GDS过程 |
hud_vector |
Qdrant | 语义存储/查找、集合管理、本地快速嵌入 |
铺管船 --构建在原始层之上的高级研究工作流程。
| 工具 | 目的 |
|---|---|
hud_ingest |
将文件和目录加载到语料库中。自动检测格式(JSON对话导出、Markdown、JSONL、CSV、纯文本)。 |
hud_search |
按关键字、语义相似性或混合检索文档。按来源或日期范围筛选。 |
hud_extract |
从语料库文档中提取并编目命名实体和术语。 |
hud_relate |
构建和查询知识图——创建实体之间的关系,找到路径,探索邻域。 |
hud_order |
分配和查询时态元数据。维护两个独立的日期字段: 当一份文件被写下来时 和 它讨论的是什么时期. |
hud_annotate |
标记文档、添加注释和整理命名收藏以供导出。 |
hud_report |
统计数据、源比较和语料库的格式化导出。 |
为什么有两个日期字段?
hud_order 保持a created_date (文件制作时)和 referenced_period (文件讨论的历史时代)。这些是独立的。2019年一篇关于公元前450年事件的论文需要这两者。
工具参考
hud_mongo
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | find, find_one, insert, update, delete, aggregate, count, text_search, explain, export, schema, stats, indexes, create_collection, drop_collection, list_collections, list_databases, use_database |
database |
string |
(默认配置) | 目标数据库名称 |
collection |
string |
"" |
目标集合 |
filter |
string |
"{}" |
JSON过滤文档 |
document |
string |
"" |
用于插入/更新的JSON文档 |
pipeline |
string |
"[]" |
JSON聚合管道 |
projection |
string |
"{}" |
JSON投影 |
sort |
string |
"{}" |
JSON排序规范 |
limit |
integer |
20 |
要返回的最大文档数 |
skip |
integer |
0 |
要跳过的文档(分页) |
query_text |
string |
"" |
文本用于 text_search |
export_format |
string |
"json" |
json 或 csv |
upsert |
boolean |
false |
如果更新时没有匹配项,则插入 |
multi |
boolean |
true |
更新/删除所有匹配项 |
hud_graph
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | read_cypher, write_cypher, get_schema, list_gds |
cypher |
string |
"" |
密码查询字符串 |
params |
string |
"{}" |
JSON密码参数 |
limit |
integer |
100 |
读取查询的最大行数 |
hud_vector
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | store, find, delete, list_collections, create_collection, delete_collection, collection_info |
collection |
string |
(默认配置) | Qdrant集合名称 |
text |
string |
"" |
要嵌入和存储的文本,或查询文本 |
metadata |
string |
"{}" |
存储条目的JSON元数据 |
entry_id |
string |
(自动生成) | 存储条目的唯一ID |
limit |
integer |
10 |
最大结果 find |
score_threshold |
float |
0.0 |
最小相似性得分 |
vector_size |
integer |
384 |
矢量维度 create_collection |
hud_ingest
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | load_file, load_directory, preview, status, list_sources, remove_source |
path |
string |
"" |
文件或目录的绝对路径 |
source_label |
string |
(来自文件名) | 此来源的标签,例如。 claude, chatgpt |
collection |
string |
"corpus" |
要存储到的MongoDB集合 |
format_hint |
string |
"" |
可选: conversation, academic, notes, raw |
recursive |
boolean |
true |
进入子目录 |
overwrite |
boolean |
false |
重新摄取已存在的文件 |
hud_search
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | keyword, semantic, hybrid, by_source, by_date, context |
query |
string |
"" |
搜索查询 |
collection |
string |
"corpus" |
MongoDB集合 |
source |
string |
"" |
源标签过滤器 |
date_from |
string |
"" |
ISO日期范围开始 |
date_to |
string |
"" |
ISO日期范围结束 |
document_id |
string |
"" |
文件 _id 为了 context |
context_window |
integer |
3 |
邻居来取 context |
limit |
integer |
20 |
最大结果 |
score_threshold |
float |
0.3 |
语义/混合的最低分数 |
hud_extract
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | from_text, from_document, from_collection, get_term, list_terms, merge_terms, delete_term |
text |
string |
"" |
要提取的文本 |
document_id |
string |
"" |
MongoDB文档 _id |
collection |
string |
"corpus" |
源语料库收集 |
terms_collection |
string |
"terms" |
提取的术语存储在哪里 |
term_name |
string |
"" |
要查找或合并的术语名称 |
term_type |
string |
"" |
按类型筛选: person, place, concept, work |
merge_into |
string |
"" |
合并目标期限 |
limit |
integer |
50 |
最大条款 list_terms |
hud_relate
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | create, get, delete, find_path, neighborhood, pattern |
entity_a |
string |
"" |
源实体名称 |
entity_b |
string |
"" |
目标实体名称 |
entity_type |
string |
"Entity" |
Neo4j节点标签 |
relationship_type |
string |
"RELATED_TO" |
Neo4j关系类型 |
properties |
string |
"{}" |
JSON关系属性 |
direction |
string |
"outgoing" |
outgoing, incoming,或 both |
hops |
integer |
2 |
深度为 neighborhood 和 find_path |
pattern |
string |
"" |
定制密码图案 pattern |
limit |
integer |
50 |
最大结果 |
hud_order
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | set_created, set_referenced, get_timeline, query_by_created, query_by_referenced, list_undated |
document_id |
string |
"" |
MongoDB文档 _id |
collection |
string |
"corpus" |
目标集合 |
created_date |
string |
"" |
ISO文件编写日期 |
referenced_date_from |
string |
"" |
参考历史时期的开始 |
referenced_date_to |
string |
"" |
参考历史期结束 |
date_from |
string |
"" |
查询范围开始 |
date_to |
string |
"" |
查询范围结束 |
source |
string |
"" |
可选源过滤器 |
limit |
integer |
50 |
最大结果 |
hud_annotate
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | tag, untag, note, list_notes, create_collection, add_to_collection, remove_from_collection, list_collections, get_collection, export_collection |
document_id |
string |
"" |
目标文件 _id |
tag |
string |
"" |
添加或删除标签 |
note_text |
string |
"" |
要附加的注释文本 |
collection_name |
string |
"" |
命名集合 |
collection_description |
string |
"" |
新收藏说明 |
hud_report
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
operation |
string |
(必填) | statistics, summarize, export, compare, overview |
collection |
string |
"corpus" |
初级收藏 |
collection_a |
string |
"" |
第一个来源 compare |
collection_b |
string |
"" |
第二个来源 compare |
export_format |
string |
"json" |
json 或 markdown |
limit |
integer |
100 |
导出中的最大文档数 |
快速开始
1.安装
git clone https://github.com/Corykidios/hob_hud_mcp
cd hob_hud_mcp
pip install -e .
2.配置
copy .env.example .env
# edit .env with your values
3.启动数据库
MongoDB和Neo4j需要运行。Qdrant可以作为服务器运行,也可以在本地文件模式下运行(设置 QDRANT_LOCAL_PATH 在 .env 完全跳过服务器)。
4.在Letta或Claude桌面中配置
{
"mcpServers": {
"hob_hud": {
"command": "python",
"args": ["-m", "hob_hud_mcp.server"],
"cwd": "C:/c/apps/servers/hob_hud_mcp"
}
}
}
需求
- Python 3.11+
- MongoDB(本地或远程运行)
- 带APOC插件的Neo4j
- Qdrant(服务器或本地路径模式)
万分感谢
该服务器支撑着三个优秀的开源项目:
fury/mongodb镜头 James Furey——一个功能齐全的MongoDB MCP服务器,具有自然语言访问、模式推理、聚合管道等功能。mongodb镜头在单个文件中覆盖的广度确实令人印象深刻 hud_mongo 如果没有它作为参考,它就没有深度。
neo4j/mcp --官方Neo4j MCP服务器,内置Go,干净快捷。四种工具为您提供一切:任意Cypher、模式内省、GDS。将原始查询访问权限委托给用户,而不是将其包装在脆弱的抽象中的设计理念是完全正确的。
qdrant/mcp服务器qdrant --官方Qdrant服务器。Python、FastMCP、无需运行的本地快速嵌入。决定在默认情况下提供本地嵌入模型,而不需要外部API密钥,这是一个很小的设计选择,对于那些试图在没有预算的情况下构建的人来说,这会产生真正的不同。
这三部电影都得到了积极的维护,有据可查,本身就值得主演。如果 hob_hud_mcp 这对你很有用,请考虑给他们应得的信用。就我而言,我对我在这里聚集的东西只有非常部分的了解,我每天都很感激这些人写下了我可以学习的东西。
