
Tekmeria
io.github.PedroMarkovicz由 GitHub 帳號 PedroMarkovicz 發布v0.1.1更新於 Oct 27, 2026
Biomedical evidence from PubMed, trials and FDA labels, with citations an audit can check.
概覽
生物醫學證據 MCP 伺服器:檢索 PubMed、Europe PMC、臨床試驗與 FDA 藥品標籤,並為每段文字簽發可核驗的引用代碼。
- 可以做什麼
- 檢索 PubMed 與 Europe PMC 文獻,可依日期、研究設計、同儕審查、開放取用與撤稿篩選
- 檢索 ClinicalTrials.gov 臨床試驗與 openFDA 藥品標籤
- 取得紀錄與段落,附帶伺服器簽發的代碼、實體資訊與撤稿狀態
- 解析代碼,判斷某筆引用是否真實
- 稽核答案中的引用並回傳報告,含判定、標記與指標,在支援的宿主中以稽核檢視呈現
- 說明引用契約、代碼語法與引用寫法
- 適用情境
- 適合建置或評估需要可核驗引用的生物醫學問答代理,也適合在對話中讓模型引用 PubMed、臨床試驗或藥品標籤中的真實段落,並檢查引用是否偽造、誤引或指向撤稿文獻。
- 執行需求
- 透過 uvx 以 stdio 在本機執行(uv 會視需要安裝 Python),不需 API 金鑰。選用環境變數 NCBI_API_KEY、NCBI_EMAIL、OPENFDA_API_KEY 與 CROSSREF_MAILTO 可提高速率限制或標明呼叫者。除示範模式外需要連線至上游 API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Tekmeria,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Citations that can be checked: server-issued handles and a deterministic audit for biomedical evidence
[Open the audit view demo: pedromarkovicz.github.io/tekmeria]
[CI] [PyPI] [DOI] [Python 3.12] [MCP Python SDK 2.3] [Pydantic 2] [React 19] [TypeScript 7] [Contract 0.1.0] [License: Apache 2.0]
Overview • Quickstart • Results • How a citation works • Architecture • Evaluation • Usage • Citing
[The audit view showing the offline demo's report]
The audit view on the offline demo: each sentence with its status, each citation with its verdict. The answer fails on a forged and a malformed citation.
Overview
Tekmeria is a Model Context Protocol server for biomedical evidence from PubMed, Europe PMC, ClinicalTrials.gov and openFDA. Every passage it returns carries a short handle such as pmid:30831578/abstract.7~ae2tc, which ends in a check code that only this installation can compute. A model cites those handles, and a deterministic audit then shows which citations are genuine, which point to text that no longer exists, and which quotes are not verbatim. It is meant for people who build or evaluate biomedical question-answering agents, and for developers of MCP hosts who want citations their users can check.
Language models that answer biomedical questions with citations can cite papers that do not exist, misquote the ones that do, and cite retracted work. The problem now reaches the literature itself: an audit of 2.5 million open-access articles found fabricated references in 1 in 2,828 papers in 2023 and in 1 in 277 in early 2026 (Topaz et al., The Lancet, 2026). Checks that run after the answer is written must judge whether an imperfect bibliographic match is the right work. Tekmeria moves the guarantee into the tool server. The server that hands out a passage also issues its citation, so a citation is checked against what was issued, not searched for.
The audit checks provenance and quotation, not support. Whether a passage actually backs its claim is reported as
not_checked: tekmeria narrows that question to genuine, correctly quoted passages, and leaves it open. A verbatim quote does not settle it: across twelve models, verbatim quotes often failed to support their claims fully (Zhang et al.).
The project stays out of the race for coverage. BioMCP already reaches about 70 biomedical sources, and retrieval itself helps little: biomedical RAG typically improves on no retrieval by 1 to 2 points (Nourbakhsh et al.). Citations are where models fail:
- when asked to cite, the best model in Ahmed et al. gave 15.3% relevant PMIDs, most of the rest resolving to real papers in unrelated fields;
- in Chen et al., citation fabrication by a medical agent rose from 16.5% to 31.8% when reinforcement learning rewarded only correct answers.
The protocol points the same way: the 2026-07-28 MCP revision says that servers needing state across calls use "explicit, server-minted handles passed as ordinary tool arguments".
Others also put trust in the tool rather than the model. An agent runtime can sign a receipt for each tool call and check the claims that cite it (Basu); a renderer can mark a number verified only when it matches the record it names (Solatorio); and a genome-writing tool layer reachable over MCP requires every quantity to come from a validated tool (Ali et al.). Tekmeria applies the idea to citations of biomedical passages: the handle the model writes is itself authenticated, so the server that issued it can check it with its key alone, whichever model or MCP host wrote the answer.
Status. Research software, version 0.1.1. The citation contract is versioned separately, at 0.1.0; while it is 0.x, a breaking change raises its minor version. Changes are listed in CHANGELOG.md. A technical note describes the design and the evaluation: 10.5281/zenodo.23374728.
Quickstart
You need uv (it installs a suitable Python if needed). No API keys are required. One command runs the offline demo on recorded responses and opens its audit in your browser:
To use tekmeria in a chat, add it to an MCP host such as Claude Desktop or VS Code: see Usage. The command installs the released package from PyPI. To run the development version instead, use uvx --from git+https://github.com/PedroMarkovicz/tekmeria tekmeria, or point --from at a local clone.
Results
The evaluation is a conformance test: it plants citations whose correct verdict is known in advance and checks that the audit decides as its specification says. With seed 0 and 25 cases per category:
None of this measures how often models fabricate citations, or whether a cited passage supports its sentence. The reference oracle was written by the same author, from the specification and separately from the audit, so it is not independent; whole answers are built from templates; and the faults are chosen by the author. How models cite when they are given handles is left to a later study. The full evaluation, with its output, is below.
How a citation works
The scheme is one of pmid, pmcid, ppr, nct and setid; registries that serve only their current version (trials and labels) carry the version that was cited. The model writes [handle] after a claim, or [handle "exact words"] for numbers and doses. The audit then gives each citation one verdict, from the first check that fails:
The answer as a whole is fail if anything in a configurable fail_on list occurs (by default, a forged or malformed citation), otherwise incomplete if a source could not be reached, otherwise warn if any sentence is uncited, any citation is not ok or a cited source is retracted, and otherwise pass. Each sentence also gets a status: cited, uncited, or invalid_only when none of its citations is ok. The report adds metrics, among them citation validity, sentence coverage, quote accuracy and the number of fabricated citations. The full rules are in docs/CONTRACT.md.
Design choices
Architecture
The server is a thin MCP layer over an evidence service and a pure citation contract.
Layer responsibilities
The design is in docs/specs, with the decisions made while building it, and their reasons, in its section 16. docs/DESIGN.md draws the path from a question to an audited answer, the evaluation, and the path from a push to a release.
The demo
tekmeria demo runs offline on recorded responses. It searches, fetches two papers, and audits an answer with six planted cases: a correct quote, a misquote, a forged check code, a malformed handle, a citation of a retracted paper and an uncited sentence. This is its audit:
In a chat
Claude Desktop shows the result of audit_answer as the audit view, here for an answer citing a handle this server never issued. The screenshot was taken under the project's first name, which the widget's header shows.
[The audit view rendered inside Claude Desktop]
A real run
On 2026-10-07, a model in Claude Desktop answered "Does MMR vaccination cause autism?" with the cite_by_handle instructions, then audited its own answer:
Every citation was genuine and every quote verbatim. The result is a warning, not a pass, because some sentences had no citation. A first run failed on one forged citation, which turned out to be an example handle in the server's own instructions; it has been removed. Both transcripts, with the full audit output, are in docs/live-run.md.
Evaluation
tekmeria evaluate measures the audit's decisions. It plants citations whose correct verdict is known in advance, in 34 categories:
- genuine citations, with verbatim quotes and with quotes written in typographic variants the comparison must accept: spacing, decomposed accents, every dash, apostrophe and quote mark it folds, and the invisible characters it removes;
- quotes with one detail changed: a number, a decimal point, a comparison sign, a unit, a minus sign, a letter's case, an added accent, a superscript digit, a removed space, an inserted "not" or a swapped word;
- forged check codes, paths and record IDs, a forged handle written outside brackets, malformed handles, and a note written inside the citation;
- passages and records that do not exist, and a source that is down;
- retracted papers, preprints and older record versions;
- a forged handle hidden inside an unclosed quote;
- a misquote or a withdrawn record cited beside a genuine citation in the same sentence.
How the cases are built.
- They rest on 7 real records (213 passages) from the demo's recorded responses.
- The withdrawn and unavailable cases cite made-up paths, made-up records, and a record treated as unreachable.
- What each case plants is decided by a reference oracle, written from the spec and sharing no code with the audit. It is not independent: the same author wrote both.
How they are scored.
- Each case is audited as structured claims and as answer text in one of the citation styles a model might write. The bare-handle and hidden-handle cases run on answer text only, and the two categories that put quote marks inside a quote on structured claims only. The two audits of a case use the same planted citations, so they are not independent observations.
- A case passes only when every citation gets its planted verdict and exactly its planted flags.
- The cases are also written into whole answers of several sentences. A whole answer passes only when every sentence's status, every citation, every metric and the overall verdict come out as planted. Faults in claim status, metrics or the overall verdict leave every citation right, so only whole answers catch them. There are three kinds:
- mixed: every case, four at a time, with a heading, bold lead-ins and uncited sentences;
- clean: genuine citations only, which pass;
- paired: the first case of each category that can be written as answer text (32 of 34) between two sentences that each carry a genuine citation, so its own effect on the overall verdict is scored. A mismatched or withdrawn citation gives
warn, alone in its sentence or beside a genuine one.
- CI runs the evaluation on pushes to
mainand on pull requests.
Its output, for seed 0 and 25 cases per category:
The evaluation's full output: every category, verdict, whole answer and record
planted cases: 1600/1600 correct (seed 0, 25 per category; 7 records, 213 passages) whole answers: 257/257 correct
Options. --seed (default 0) and --per-category (default 25) choose the cases, and --json-out writes the full report, with the confusion matrix.
How to read it.
- Small pools are drawn from more than once: see "Distinct cases".
- The drug label and the trial supply most planted citations: see the last table.
- The evaluation shows that the audit decides correctly on these planted errors. It does not show how often models make such errors: that takes runs with real models, like the one above.
Injected faults. python -m tekmeria.evaluation.faults breaks one decision of the audit at a time, as a real bug would, and reruns the evaluation. Its 38 faults are chosen by hand:
- lenient comparators: case, punctuation, accents, whitespace, NFKC, or only the first 40 characters;
- each of 19 folds of the contract removed in turn, and a no-break space not read as whitespace (deleting that fold entry itself changes nothing, since whitespace normalization already reads it as a space);
- each of the 4 invisible characters no longer removed;
- a check code that ignores the path, dropped flags, and wrong rules for claim status, coverage, validity and the overall verdict, among them the two earlier rules under which a sentence cited only by invalid citations, or an invalid citation beside a valid one, did not warn.
It catches 37 of them. The one it misses is listed with its reason: no passage of the snapshot contains an ellipsis, so the ellipsis fold cannot be planted. CI runs it with 10 cases per category, enough for every dash and quote mark to appear.
Mutation score. python -m tekmeria.evaluation.mutants is less selective. It makes one small change at a time in the audit's code (the citation parser, the handle codec, the quote comparison and the audit itself) and runs the evaluation against each one. A change negates a comparison or moves it across its boundary, swaps and and or, removes a not, flips a boolean, or adds one to an integer. String and regular-expression constants are not changed, so the score says little about the citation grammar or the fold table: the injected faults cover those.
- The evaluation kills 71 of 78 changes: 52 by a wrong result and 19 by a crash.
- One more change stops the snapshot from loading, so the evaluation never judges it, and it is left out of the score.
- Three of the seven survivors change nothing for any record the current source parsers can build: two in the
preprintrule, whose two signals the parsers always set together, and one in the handling of bold lead-ins, whose effect a later step removes. - The remaining four are faults it misses:
checked_against, which it does not score; an empty quote (two changes); and the text of a plain[1]bracket. - Outside its scope, so never changed: the diagnostic
closest_match, thecheck_handlestool, the key-length check, the cursor signature, and the record-ID parsing and passage addressing that only the evidence service uses.
Some categories rest on few passages: one passage has an accented letter, so the decomposed-accent category tests a single character.
Usage
The quickstart runs the offline demo. To use tekmeria in a chat, add it to an MCP host:
Claude Desktop, VS Code and MCP Inspector
Claude Desktop
Add this to claude_desktop_config.json (Settings, Developer, Edit Config) and restart:
Then start a chat with the cite_by_handle prompt. audit_answer also declares the audit view (ui://tekmeria/audit-view) as an MCP App, for hosts that support MCP Apps.
VS Code
Add this to .vscode/mcp.json:
MCP Inspector
Commands
Configuration
Everything is optional and read from environment variables; a .env file is not read.
The eight environment variables
Tools
There is also a prompt, cite_by_handle, and two resource templates, evidence://record/{+record_id} and evidence://passage/{+handle} (the + lets the slashes in a handle through).
Development
How it is checked
The audit view:
After changing the report models, run uv run python -m tekmeria.contract.schemas. To re-record the fixtures from the live APIs, delete src/tekmeria/demo/fixtures/*.json and run uv run tekmeria record-fixtures (with no email or API keys set). The recorder keeps third-party text to what the demo, the tests and the evaluation use: it records a CC BY open-access article, removes from search results every abstract that is not CC BY or CC0, and keeps PubMed abstracts only for the records the demo, the tests and the evaluation fetch and for search results Europe PMC lists as CC BY or CC0 (see NOTICE).
Publishing a GitHub release runs .github/workflows/release.yml: it checks that CI passed on the tagged commit, that the tag names the package version, that server.json is valid and that the demo page this README links to is live, runs the tests and builds the package. Once the maintainer approves it in the pypi environment, it publishes the package to PyPI by trusted publishing and then lists the new version in the MCP Registry; both sign in with the workflow's GitHub identity, so no token is stored anywhere.
The repository
What it cannot tell you
- Whether a passage supports its sentence. The audit checks that a citation was issued by this server, that its passage still exists, and that any quote is verbatim (in the text as issued or as it is now). Support is not checked.
- Medical advice. Tekmeria retrieves and audits evidence; it does not judge it, and nothing it returns is clinical guidance. It queries public biomedical APIs and is not built for patient data.
- Old versions of registries. ClinicalTrials.gov and openFDA serve only the current version of a record; an older cited version is flagged
version_changed, but its old text can come only from tekmeria's cache. - A handle from another installation. A handle verifies only on the installation (key) that issued it.
- PubMed book chapters. Records such as StatPearls or GeneReviews chapters are left out of searches, and fetching one reports it as not found.
- A deduplicated stream across pages.
search_literaturenever shows the same record twice on one page, but a record can reappear on a later page.
Contributing and support
- A problem or a question: open an issue. For a wrong verdict, include the answer text you audited and the report; a handle verifies only on the installation that issued it, so say whether you used the demo key.
- A vulnerability: report it privately, through the repository's Security tab, as SECURITY.md describes.
- A change: pull requests are welcome. CONTRIBUTING.md lists the checks to run and what a change needs; a change to what the audit decides needs a case in the evaluation.
- A rights holder who wants a recorded item removed can open an issue, as NOTICE says.
Citing
To cite tekmeria, use the metadata in CITATION.cff; GitHub's "Cite this repository" button formats it. Releases are archived on Zenodo: 10.5281/zenodo.23353865 always resolves to the latest release, and version 0.1.1 is 10.5281/zenodo.23376855. Software Heritage archives the full history; release 0.1.0 is swh:1:rel:9d852cbc58c0adc8919be14723b074d6dd5b7b45. Changes between releases are in CHANGELOG.md.
To cite the design or the evaluation, cite the technical note. It is archived on Zenodo as a preprint: 10.5281/zenodo.23374728 always resolves to its latest version, and version 1 is 10.5281/zenodo.23374729.
Data and licence
Code: Apache License 2.0; see LICENSE and NOTICE.
The recorded API responses under src/tekmeria/demo/fixtures/ keep the terms of their sources, listed in NOTICE: United States government data from ClinicalTrials.gov and openFDA, bibliographic records from PubMed, Europe PMC and Crossref, a CC BY 4.0 full-text article and a CC BY 4.0 preprint, both credited there.
Tekmeria relies on the public APIs of the National Library of Medicine (PubMed, PubTator3 and ClinicalTrials.gov), Europe PMC, the Food and Drug Administration (openFDA) and Crossref. It is not affiliated with or endorsed by any of them.
Built with ☕ and a healthy distrust of unverifiable citations
來源:README.md,提交 4b6af09
工具
0版本歷史
1- v0.1.1最新Oct 14, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分