MedXpert 图书馆连接器(通用版)

io.github.zhaoxinghua09-cellPublished by GitHub account zhaoxinghua09-cellv1.0.0Updated Nov 10, 2026

Local RAG MCP server for your own .md knowledge base: BM25 + local Ollama, offline, zero egress.

VerifiedSTDIODesktop onlyKnowledge & MemoryAI & ML

Overview

AI-generated overview

Turns your own Markdown wiki into a local, offline knowledge base that an assistant can search semantically and query with RAG answers plus citations.

What you can do
  • Search the knowledge base semantically and get relevant snippets with similarity scores
  • Read the full text of a single wiki page by title
  • List library scope: page count, categories and index status
  • Ask questions answered by a local generation model, with citations back to the source pages
When to use it
Useful when you keep documentation, notes or standards as Markdown files and want an assistant to retrieve and answer from them without sending content to an external service. Suited to offline or privacy-sensitive setups where a local model is acceptable.
Requirements
Runs as a local stdio process on desktop, pure Python standard library with no third-party packages. Needs a local Ollama instance with an embedding model (default bge-m3) and, for question answering, a generation model (default qwen2.5:7b). A vector index must be built first. Optional environment variables: LIBRARY_WIKI_DIR, OLLAMA_BASE_URL, LIBRARY_EMBED_MODEL, LIBRARY_GEN_MODEL.
Before you install
The bundled wiki folder holds only sample pages; you must point it at your own documents and rebuild the index. Answer quality depends on the local models you pull. The publisher states it is not responsible for the content of your knowledge base, so review what you index.

Installation

In SourceWeft

  1. Open MedXpert 图书馆连接器(通用版) in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

MedXpert 图书馆(通用版)连接器

把**你自己的 wiki(.md 文档)**做成可语义检索、可 RAG 问答的本地知识库 MCP 连接器。

  • 纯 Python 标准库实现(stdio JSON-RPC 2.0),零第三方依赖
  • 仅依赖本地 Ollama 做嵌入/生成,零积分、断网可用
  • 知识库为你自有文档,连接器不绑定任何预置私有数据
  • 全部计算在本机完成,不访问任何外部网络,不上传任何数据

工具

工具说明
search_knowledge(query, top_k?)语义检索知识库,返回相关片段 + 相似度
get_page(title)读取单个 wiki 页全文
list_sources()库范围:页数 / 分类 / 索引状态
ask_knowledge(question, top_k?)RAG 问答:检索 + 本地生成模型,附引用

快速开始

bash
# 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 已提供标准配置;在开放平台或客户端中引用本包目录即可。 也可用环境变量覆盖默认行为:

变量默认值说明
LIBRARY_WIKI_DIR本包 wiki/知识库目录(指向你的文档)
OLLAMA_BASE_URLhttp://127.0.0.1:11434Ollama 地址
LIBRARY_EMBED_MODELbge-m3嵌入模型
LIBRARY_GEN_MODELqwen2.5:7b生成模型(问答)

包结构

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 等为相关项目标识,均未申请实体注册、未申请商标注册;出现仅作来源标识,不构成对法人实体或商标权的任何主张。
  • 免责:本仓库内容不构成法规意见、法律意见或注册代理服务;关键数据以监管机构最新发布为准。
  • 联系:[email protected] | ORCID 0009-0001-0512-1237

mcp-name: io.github.zhaoxinghua09-cell/medxpert-library-connector

Source: README.md at commit 878c504

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.0LatestSep 28, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.