phylokit-mcp
Phylogenetic inference server driving IQ-TREE 2, always returning per-clade bootstrap support plus model selection, tree comparison, and alignment simulation, with detailed diagnostics like conflicting clades and model uncertainty.
README
phylokit-mcp
Phylogenetic inference over MCP, driving IQ-TREE 2 through piqtree.
A topology without support is not a result. infer_tree always runs a
bootstrap and always returns per-clade support. There is no flag to skip it.
5 tools, 62 tests against real IQ-TREE (no mocked engine), 10 mutation checks, and a real-process JSON-RPC handshake test.
Why the rule
A maximum-likelihood tree looks identical whether or not the data support it. Measured here, on alignments simulated from a known 7-taxon tree so the right answer is not in doubt:
| sites | informative sites | recovered the true tree? | lowest clade support |
|---|---|---|---|
| 300 | 51 | yes, exactly | 1.00 |
| 60 | 11 | no — RF 2 | 0.57 |
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; nothing about the topology itself distinguishes them. The support
values do — and the false clade is the lowest-supported one in the tree.
That is the entire argument for this server. Returning a bare tree returns a result the caller cannot evaluate.
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 attach these, so the standard format silently drops them.
fraction_resolved— the share of clades clearing 0.70. The headline number, before any individual 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 F81, with several models inside the conventional ±2 indistinguishability margin. A winner without its margin is a claim the numbers do not support.
- Length versus evidence —
n_parsimony_informativealongsiden_sites. A 10,000-site alignment of near-identical sequences supports nothing.
Tools
| tool | what it does |
|---|---|
infer_tree |
ML tree plus bootstrap support, per clade. Never one without the other. |
select_substitution_model |
Ranks 100+ models with ΔAIC/AICc/BIC, and says when the criteria disagree. |
compare_trees |
Robinson–Foulds distance and the clades that differ. Compares splits, not strings. |
simulate_alignment |
Generates sequences along a tree you specify — the positive control. |
capabilities |
Engine version, 215 substitution models, enforced limits. |
Install
pip install phylokit-mcp
piqtree ships prebuilt wheels, so there is no compiler, no R and no conda step — but it requires Python 3.12+, and so does this package.
Reproducibility, stated precisely
Measured, not assumed:
- Across fresh processes: exact. Three runs of an identical 30-replicate bootstrap returned byte-identical support.
- Within one long-lived process: not bit-exact. Passing the same
rand_seeddoes not fully reset IQ-TREE's internal state — building the same tree three times gave call 1 == call 2 but call 3 different.
The practical size: over six repeated 50-replicate calls, three of four clades were bit-identical and one moved 0.02 — a single replicate flipping, well inside the bootstrap's own sampling error (~0.07 at 50 replicates). The topology and every conclusion were unchanged. This is reported in every response rather than papered over, because an MCP server is long-lived by design and that is exactly the condition which exposes it.
Threads are pinned to 1 before piqtree is imported: likelihood sums accumulate in thread-completion order, floating-point addition is not associative, and near-tied topologies can flip on the last bits.
Limitations
- Nucleotide alignments only. Protein and codon models are not exposed.
- Bootstrap only — no aLRT, no approximate Bayes, no UFBoot. Support is the
nonparametric bootstrap (Felsenstein 1985), computed here rather than read back
from IQ-TREE, because piqtree 0.8.3 runs
bootstrap_replicatesbut does not expose the resulting values. - Cost is linear in replicates. ~130 ms per replicate at 7 taxa / 300 sites, and it grows with taxon count. Capped at 200 taxa and 1000 replicates.
- It does not align sequences. Ragged input is refused, not guessed at.
- Unrooted trees. No rooting, no dating, no ancestral reconstruction.
Licence
GPL-2.0-only. The "only" is load-bearing: piqtree declares GPL-2.0-only,
which is incompatible with GPL-3.0, so the distributed combination cannot be
GPL-3. cogent3 is BSD and imposes nothing.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。