medxpert-library-connector
Integrates with local Ollama for embedding wiki documents and generating answers in semantic search and RAG Q&A over a local knowledge base.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@medxpert-library-connector Search my wiki for backup and restore steps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MedXpert Library Connector
Turn your own wiki (plain .md documents) into a locally searchable, RAG-capable MCP server.
Pure Python standard library (stdio JSON-RPC 2.0) — no third-party runtime dependency
Embedding and generation run on local Ollama — no API keys, works offline
The knowledge base is your own documents; only a three-page sample wiki is bundled
Everything runs on your machine; the server makes no external network call
Tool | What it does |
| Semantic search over your wiki; snippets with similarity |
| Full text of one wiki page |
| Library scope: page count, categories, index status |
| RAG answer: retrieval + local generation model, with citations |
pip install medxpert-library-connector # or: uvx medxpert-library-connector
LIBRARY_WIKI_DIR=/path/to/your/wiki medxpert-library-connectorMedXpert 图书馆(通用版)连接器
把**你自己的 wiki(.md 文档)**做成可语义检索、可 RAG 问答的本地知识库 MCP 连接器。
纯 Python 标准库实现(stdio JSON-RPC 2.0),零第三方依赖
仅依赖本地 Ollama 做嵌入/生成,零积分、断网可用
知识库为你自有文档,连接器不绑定任何预置私有数据
全部计算在本机完成,不访问任何外部网络,不上传任何数据
工具
工具 | 说明 |
| 语义检索知识库,返回相关片段 + 相似度 |
| 读取单个 wiki 页全文 |
| 库范围:页数 / 分类 / 索引状态 |
| RAG 问答:检索 + 本地生成模型,附引用 |
Related MCP server: rag-mcp
快速开始
# 1. 安装并启动 Ollama,拉取模型
ollama pull bge-m3 # 检索必备(嵌入)
ollama pull qwen2.5:7b # 问答可选(生成)
# 2. 用你自己的文档替换 wiki/(本包自带 3 个示例页)
# 把 .md 放进 wiki/ 即可,可建子目录分类
# 3. 构建向量索引
python rag_engine.py build
# 4. 启动 MCP server(stdio)
python medxpert_library_server.py接入 WorkBuddy
包内 mcp.json 已提供标准配置;在开放平台或客户端中引用本包目录即可。
也可用环境变量覆盖默认行为:
变量 | 默认值 | 说明 |
| 本包 | 知识库目录(指向你的文档) |
|
| Ollama 地址 |
|
| 嵌入模型 |
|
| 生成模型(问答) |
包结构
medxpert-library-connector/
├── medxpert_library_server.py # MCP server(stdio,纯标准库)
├── rag_engine.py # 嵌入 / 余弦 / 构建 / 检索引擎
├── wiki/ # 示例知识库(替换成你自己的 .md)
├── connector-meta.json # 开放平台元数据
├── mcp.json # MCP 启动配置
├── icon.svg # 头像
├── LICENSE # Apache-2.0
├── requirements.txt # 依赖说明(仅 Ollama)
└── README.md合规与隐私
不内嵌受版权保护的标准正文,仅索引标准号与公开要点。
所有内容在本机处理,文档与查询均不上传外部服务。
知识库为使用者自有内容,发布者不对其内容负责。
许可说明 · License Notice
代码许可:本仓库源代码以 Apache-2.0 许可发布(见根目录 LICENSE)。 © 2026 赵兴华 / Steven Zhao (ORCID 0009-0001-0512-1237). All rights reserved.
内容权属:本仓库不捆绑专有知识库;随附示例内容仅供演示,归其原始所有者所有。代码以 Apache-2.0 许可发布。
品牌状态限定:MedXpert、SynomosAI、LGD 等为相关项目标识,均未申请实体注册、未申请商标注册;出现仅作来源标识,不构成对法人实体或商标权的任何主张。
免责:本仓库内容不构成法规意见、法律意见或注册代理服务;关键数据以监管机构最新发布为准。
联系:zhaoxinghua09@gmail.com | ORCID 0009-0001-0512-1237
mcp-name: io.github.zhaoxinghua09-cell/medxpert-library-connector
Available Tools
4 toolsask_knowledgeB
RAG 问答:检索知识库片段 + 本地生成模型回答,附引用来源。零积分、离线可用。
Inputs: question (required), top_k.
get_pageA
读取知识库单个 wiki 页全文。标题可用 search_knowledge 的结果或文件名。
Inputs: title (required).
list_sourcesA
返回知识库范围:页数、分类统计、RAG 索引条目数、数据源目录。
Inputs: no named parameters.
search_knowledgeA
语义检索本地知识库(wiki .md 文档)。返回相关片段及相似度。例:'二类注册需提交哪些资料'、'ISO 13485 现行版本'。
Inputs: query (required), top_k.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
get_page and list_sources are clearly distinct (full-text read vs. collection metadata), but search_knowledge and ask_knowledge both retrieve from the same knowledge base and could be confused—one returns raw snippets, the other a generated answer with citations. The descriptions do disambiguate them adequately, but the boundary requires reading.
All four tools follow a clean verb_noun snake_case pattern: search_knowledge, get_page, list_sources, ask_knowledge. No mixed conventions or vague verbs.
Four tools is well-scoped for a read-only local wiki/RAG connector: search, fetch, enumerate sources, and answer. Each tool earns its place with no redundancy.
Covers the core read-only lifecycle (discover scope, search, read page, ask). A notable gap is the absence of a list/browse-pages operation—list_sources only returns counts and directories, so enumerating actual pages depends on search results or known filenames.
Maintenance
Related MCP Connectors
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Personal context for every AI: search, read, and write back to your private Markdown library.
A cited wiki of your GitHub repo: search, read pages, find symbols and ask, with line citations.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying a local health knowledge base with hybrid RAG (vector + FTS5) and exploring backlinks between notes.MIT
- FlicenseAqualityDmaintenanceEnables indexing local documents (PDF, Markdown, text, code) into a knowledge base and querying them via semantic search using local embeddings, all running privately on your machine.4-
- FlicenseAqualityDmaintenanceEnables retrieval-augmented question answering over Obsidian vaults and document folders, with local embeddings, vector search, and cited source paths.7-
- AlicenseAqualityCmaintenanceEnables an LLM to autonomously maintain a Markdown-based wiki with YAML frontmatter, using hybrid BM25 and local CPU vector search for fully offline retrieval without external APIs or databases.1815 npmMIT