
phylokit-mcp
io.github.musharna由 GitHub 帳號 musharna 發布v0.9.0更新於 Nov 7, 2026
Phylogenetic inference via IQ-TREE 3 — never returns a topology without its support
概覽
透過 IQ-TREE 3 進行最大似然親緣樹推論,並以 MAFFT 比對序列,一律回傳各分支的 bootstrap 支持度。
- 可以做什麼
- 推論最大似然樹並提供各分支 bootstrap 支持度、衝突分支與解析比例
- 依 AIC/AICc/BIC 排序 100 多種取代模型並指出準則分歧
- 以 Robinson–Foulds 距離比較兩棵樹並列出相異分支
- 沿指定樹模擬序列,作為陽性對照
- 以 MAFFT 比對未比對的 FASTA,並將殘基對應到比對欄位
- 回報引擎版本、模型數量與各項限制
- 適用情境
- 適合需要從序列資料建立或檢核親緣樹、且重視支持度的情境,也適合想省去自行架設 IQ-TREE、piqtree 與 MAFFT 環境、直接取得可重現樹與比對結果的情況。
- 執行需求
- 本機 stdio 程序,通常以 uvx 從 PyPI 套件 phylokit-mcp 啟動;需要 Python 3.12 以上版本。IQ-TREE 3 隨 piqtree 一併提供。序列比對以及未比對輸入的位置對應需要 PATH 中有 MAFFT 執行檔。無需驗證或 API 金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 phylokit-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
phylokit-mcp
phylokit-mcp is an MCP server that lets AI agents build maximum-likelihood trees with IQ-TREE 3 and align sequences with MAFFT.
[CI] [PyPI] [Python] [License] [DOI] [Glama]
A topology without support is not a result. infer_tree always runs a
bootstrap and returns per-clade support. There is no flag to skip it.
Why the rule
A maximum-likelihood tree looks the same whether or not the data support it. Measured on alignments simulated from a known 7-taxon tree (JC, 100 replicates, seed 1):
At 60 sites the tree contains a clade (C,D,G) that does not exist and omits
one that does (E,F,G). Both runs return a fully resolved Newick string of the
same shape. Only the support values tell them apart, and the false clade is the
lowest-supported one in the tree.
What it reports that a Newick string cannot
- Conflicting clades: groupings the data support at ≥0.70 that are absent from the reported tree. A support-annotated Newick string has nowhere to put them.
fraction_resolved: the share of clades clearing 0.70. The headline number, before any single grouping is repeated as fact.- Model runners-up with ΔAIC, not just a winner. On the 300-site alignment
above, simulated under JC, the AIC winner is not JC (TPM2u and TPM2
tie), and several models, JC among them at ΔAIC 0.7, sit inside the
conventional ±2 margin (
seed=1, piqtree 0.8.3). - Length versus evidence:
n_parsimony_informativealongsiden_sites. A 10,000-site alignment of near-identical sequences supports nothing.
Tools
Tools that take FASTA or Newick also take a file path (fasta_path, or
trees_path for two trees), read by the server; a relative path resolves
against the server's working directory.
The tests run real IQ-TREE and real MAFFT (no mocked engine), with 23 mutation checks and a real-process JSON-RPC handshake test.
Install
Requires Python 3.12+. IQ-TREE 3 comes through
piqtree 0.8, which builds it into its
wheel. align_sequences also needs the
MAFFT binary on PATH, as does
map_positions on unaligned input; the other tools work without it. Details: docs/INSTALL.md.
Configure your MCP client
If uvx picks a Python older than 3.12, use
"args": ["--python", "3.12", "phylokit-mcp"].
What the benchmark shows
Claude with the server was compared with Claude writing Python in an environment we set up with piqtree, cogent3 and MAFFT, on 38 phylogenetics questions, 3 runs each. A tie means the server matches that result without you building the environment. Questions right in every run, server against Python: Claude Haiku 5.5 34 against 37, Sonnet 5.5 37 against 35, Opus 5.5 36 against 35 (on the commit that takes file paths). None is separated (pre-registered; Holm-adjusted McNemar p = 0.75 on both Haiku and Sonnet). The server cost about the same as Python on Haiku and more on Sonnet (1.23×) and Opus (1.26×).
The chart is the first Opus 5.5 run, on a release that took the data as text. Counting answers, the server got 110 of 114 right and Python 113; counting questions, 36 of 38 were right in every run against 37 (sign test p = 1). Per question the server took 6.0 times as long (95% CI 4.4 to 8.3) and cost 14.4 times as much (9.9 to 20.2), each a geometric mean of per-question ratios. Most of that cost was the model pasting the data file into tool calls; taking file paths (pre-registered re-run, 2026-10-18) brought it down to 1.26 times (1.04 to 1.55).
We wrote the questions and ran the benchmark ourselves; an outside re-run is welcome. The benchmark does not score support values; method, controls and other limitations are in benchmarks/agent_qa; the Haiku and Sonnet runs: 2026-10-20 re-run.
Reproducibility
Not bit-exact, in any setting: IQ-TREE reads the wall clock during its search,
so the same request and seed can differ in the trailing digits of branch
lengths and log-likelihood, and a support value can move: by about 0.05 (a
replicate flipping) for the nonparametric bootstrap, and by no fixed bound for
UFBoot2, whose replicates IQ-TREE draws inside the search (one clade moved 0.16
across six calls on one machine). The server reports
deterministic_across_processes: false and the drift bound for the method
used, null for UFBoot2. Compare
trees with compare_trees and numbers with a tolerance, never by string
equality. Measurements: docs/REPRODUCIBILITY.md.
Limitations
- Nucleotide and protein, no codon models. Pass
sequence_type="protein"and a protein model (LG,WAG, …). The molecule type is declared, never sniffed: an A/C/G/T-only alignment is also valid protein (Ala/Cys/Gly/Thr), and a wrong guess returns a wrong tree, likelihood and support with no warning. - Two bootstraps, no aLRT or approximate Bayes. The default is the
nonparametric bootstrap (Felsenstein 1985), computed here, clades supported
at 0.70; it is the only one that reports well-supported clades missing from
the ML tree.
support_method="ufboot"is IQ-TREE's UFBoot2 (Hoang et al. 2018), clades supported at 0.95. - Nonparametric cost is linear in replicates, each a full ML search: on 89 taxa x 435 sites one replicate took 25-93 s, and 1000 UFBoot2 replicates 83 s. Capped at 200 taxa, 1000 nonparametric and 10000 UFBoot2 replicates. Every tool sends a progress notification every 15 s, so a client idle timeout does not abort a long call.
- Alignment is MAFFT
--auto, single-threaded, and nothing else: no strategy choice, profile alignment or trimming; at most 200 sequences of 100,000 residues and 600 s. Gapped input is refused, not degapped. The tree tools refuse ragged input rather than align it. - Unrooted trees. No rooting, dating or ancestral reconstruction.
License
GPL-2.0-only, because piqtree is GPL-2.0-only, which is incompatible
with GPL-3.0. cogent3 is BSD.
If you publish results from this server, cite IQ-TREE 3, piqtree and (when it made the alignment) MAFFT, not this wrapper. The references are in CITATION.cff, and licensing and affiliation are in NOTICE.
來源:README.md,提交 0c4330b
工具
0版本歷史
8- v0.9.0最新Nov 7, 2026
- v0.8.1Nov 6, 2026
- v0.8.0Oct 29, 2026
- v0.7.0Oct 20, 2026
- v0.6.0Sep 26, 2026
- v0.5.1Sep 23, 2026
- v0.5.0Sep 19, 2026
- v0.4.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分