
Pubtator
io.github.pipeworx-iov0.1.0更新於 Oct 8, 2026
PubTator 3 MCP — biomedical entity search, literature search with entity
概覽
檢索生物醫學文獻,以及 PubTator 3 從 PubMed 和 PMC 機器擷取的基因、疾病、化學物質與變異關係。
- 功能
- 透過工具介接 PubTator 3:把實體名稱解析為正規化 id,依自由文字或實體 id 檢索文章,並回傳已擷取的關係,例如哪些藥物可治療某種疾病、某種疾病與哪些基因相關。每筆結果都帶有符合的句子、PMID、PMCID、DOI、期刊與日期,關係證據可逐段稽核。也可取得最多 20 個 PMID 的註釋,包含正規化 id 與字元位移。
- 適用情境
- 適合助理需要查詢生物醫學實體、尋找提及這些實體的文獻,或搭配支撐句子探索基因—疾病—化學物質—變異關係時使用。適用於研究與文獻回顧流程,不適合臨床決策。
- 執行需求
- 以遠端 streamable HTTP 端點形式執行於 Pipeworx 閘道;最初幾次呼叫不需要帳號或 API 金鑰。也可透過 npx 以本機 stdio 方式執行,需要 Node.js。需要能連線至閘道以及 NCBI/NLM 的 PubTator 3 資料。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Pubtator,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"pubtator": {
"type": "http",
"url": "https://gateway.pipeworx.io/pubtator/mcp"
}
}
}README
@pipeworx/pubtator
Biomedical literature search by entity, plus the gene–disease–chemical–variant relations PubTator 3 has extracted from ~36M PubMed abstracts and PMC open-access full text — every relation labelled machine-extracted and carrying the sentences it was read from. Sourced from the PubTator 3 API run by NCBI / NLM. Connects gene-level lookups (mygene-info, pubmed) to the literature that mentions them.
Part of Pipeworx — an MCP gateway connecting AI agents to 1715+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
Tools
pubtator_find_entity(query, concept?, limit?)— resolve a gene, disease, chemical, variant, species or cell-line name to its normalized PubTator id (@GENE_BRCA1/ NCBI Gene 672,@DISEASE_Breast_Neoplasms/ MeSH D001943). Answers "what is the id for X so I can query by it".pubtator_search(query, page?)— literature search by free text, by entity ids joined withAND/OR, or by a relation query (relations:treat|@CHEMICAL_Doxorubicin|@DISEASE_Breast_Neoplasms). Each hit carries the matched sentence with its entity mentions decoded (text,entity, normalizedids,matched_query), PMID, PMCID, DOI, journal and date. 10 per page;total_resultsandtotal_pagesreturned.pubtator_relations(entity, type?, target?, limit?, evidence_for?)— the relations PubTator 3 extracted for an entity (which drugs treat a disease, which genes a disease is associated with …), ranked bysupporting_publications. The topevidence_forrelations (default 3, max 5) carry up to 3 supporting passages each. Accepts a PubTator id or a plain name (resolved via autocomplete; the match is reported inresolved_from).pubtator_relation_evidence(type, entity1, entity2, page?)— every passage supporting one specific relation, 10 per page, with PMIDs. Use it to audit a relationpubtator_relationsreturned.pubtator_annotations(pmids, full_text?)— entity annotations for up to 20 PMIDs: every mention in title + abstract (or PMC full text whenfull_text: true), normalized to NCBI Gene / MeSH / dbSNP / Taxonomy with character offsets, plus the relations extracted within each article.
Auth
Keyless.
Data sources
- https://www.ncbi.nlm.nih.gov/research/pubtator3-api/entity/autocomplete/?query=BRCA1&concept=gene&limit=10
— entity name →
@TYPE_Nameid, with the backing database id. - https://www.ncbi.nlm.nih.gov/research/pubtator3-api/search/?text=...&page=1
— article search;
text_hlis the matched sentence in PubTator's inline entity encoding, decoded by this pack. - https://www.ncbi.nlm.nih.gov/research/pubtator3-api/relations?e1=@GENE_BRCA1&type=associate&e2=... — extracted relations with supporting-publication counts.
- https://www.ncbi.nlm.nih.gov/research/pubtator3-api/publications/export/biocjson?pmids=31022191&full=true — BioC JSON with every annotation and in-article relation.
Things the next person would otherwise rediscover:
- Entity ids are name-based and case-sensitive. The API wants
@GENE_BRCA1,@DISEASE_Breast_Neoplasms,@CHEMICAL_Doxorubicin— not@GENE_672or@DISEASE_MESH_D001943. A search for the database-id form returns HTTP 200 withcount: 0and no error, which is why every entity argument in this pack goes through autocomplete when it does not start with@. - Everything is a text-mining prediction. PubTator 3's relations come from
a neural relation-extraction model and its annotations from entity
recognizers (GNormPlus, TaggerOne, tmVar…). Nothing is human-curated. Each
relation and the annotations envelope carry an
extractionfield saying so;supporting_publicationsis the model's evidence count, not a curation status. - Relation queries ignore entity order.
relations:associate|A|Bandrelations:associate|B|Areturn the same count. Twelve relation types: associate, cause, compare, cotreat, drug_interact, inhibit, interact, negative_correlate, positive_correlate, prevent, stimulate, treat. text_hlencoding.@<m>GENE_BRCA1</m> @GENE_672 @@@BRCA1@@@-mutatedmeans: id tokens (query matches wrapped in<m>), then the surface mention wrapped in@@@. An id token is@not followed by@@— the first cut of the decoder treated@@@BRCA@@@as an id and merged two mentions into one.- Autocomplete concepts.
gene,disease,chemicalandvariantare dense;speciesandcelllinereturn[]for common names ("mouse", "HeLa"). Drop the concept filter rather than concluding the entity is absent. - Full text is large.
full=trueon a PMC open-access article returns 100+ passages (119 for PMID 31022191) and the document id becomes the PMC number; the PMID is recovered from the first passage'sarticle-id_pmid. Passages are truncated to 1,500 characters withtruncated: true. - Page size is fixed at 10 by the upstream; there is no
sizeparameter.
Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
What this endpoint actually serves
tools/list at https://gateway.pipeworx.io/pubtator/mcp returns the tools in the table
above plus the shared Pipeworx meta-tools — ask_pipeworx,
discover_tools, search_within, remember/recall and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's initialize response states its exact scope, and
is the authoritative answer for a given day.
This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
ask_pipeworx, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.
Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:
Both URLs reach the same gateway and the same 1715+ data sources. The
only difference is which pack's tools are listed directly; ask_pipeworx
reaches all of them from either one.
No MCP client? Call it over HTTP
No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/pubtator_find_entity. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.
Standalone (no gateway account)
This package also runs as a local stdio MCP server — no Pipeworx account, no gateway round-trip:
Or run it directly to confirm it starts:
It speaks MCP over stdin/stdout and answers initialize/tools/list/tools/call
for only this pack's tools — none of the shared meta-tools the gateway
connection above adds. Same source, same tools, no ask_pipeworx routing.
Using with ask_pipeworx
Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:
The gateway picks the right tool and fills the arguments automatically.
More
License
MIT
來源:README.md,提交 91d440f
工具
0版本歷史
1- v0.1.0最新Oct 8, 2026
