FigTreeKit-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| -q | No | Only log ERROR messages. | |
| -v | No | Enable INFO logging. | |
| -vv | No | Enable DEBUG logging. | |
| --jar | No | Path to figtree_patched.jar. Auto-detected if omitted. | |
| --host | No | Host to bind for SSE/HTTP transport. | 127.0.0.1 |
| --port | No | Port to bind for SSE/HTTP transport. | 8777 |
| --log-file | No | Append logs to the specified file. | |
| --keep-runs | No | Number of run directories to retain. | 50 |
| --transport | No | Transport type: stdio (default), sse, or http. | stdio |
| --cli-timeout | No | Timeout in seconds for passthrough CLI calls. | 300 |
| --setup-timeout | No | Timeout in seconds for setup_figtree download/build. | 600 |
| --file-max-bytes | No | Maximum size in bytes for whitelisted files (default 200 MiB). | 209715200 |
| --render-timeout | No | Timeout in seconds for JVM rendering when the call does not provide timeout. | 180 |
| --workspace-root | No | Writable workspace root. | ./figtreekit-mcp-workspace |
| --allow-read-root | No | Read-only allowed root. May be repeated for multiple roots. | |
| --allow-remote-bind | No | Allow binding to non-loopback addresses. The server has no built-in authentication or TLS. | false |
| --content-max-bytes | No | Maximum size in bytes for tree_content (default 10 MiB). | 10485760 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| analyze_taxonomyA | Analyze monophyly of all groups at a given taxonomic rank. Equivalent to Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. rank: Taxonomic rank to analyze (domain..species). taxonomy_mapping_file: Optional CSV/TSV mapping (whitelisted). taxonomy_levels: prefix:rank list. group_size_min: Only report groups with at least this many taxa. |
| apply_configA | Apply a FigTree JSON config (figtree-block keys) plus an ordered operations list and export Nexus. Leaner than style_tree for agent-driven advanced tweaks. All accepted parameters are validated before execution ( Args:
config: Any figtree-block key → value mapping (dot-separated keys).
operations: Ordered clade operations (same schema as style_tree).
taxonomy_levels: Custom rank prefixes ( |
| check_figtreeB | Check Java 8+ and the figtree_patched.jar; return actionable hints. Args: jar_path: Optional explicit JAR path to check instead of auto-detection. |
| check_monophylyA | Check whether one or more taxonomic groups are monophyletic. Supports special identifiers LUCA / LACA / LBCA / root, and exact taxon
lists. Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. groups: List of group names (str) or exact taxon lists (list[str]). taxonomy_levels: prefix:rank list (e.g. "d:domain,p:phylum"). strict: Fail on any non-monophyletic group. |
| clear_annotationsA | Clear highlight and collapse annotations, including embedded ones. Both pending annotations and Args:
clear_hilights: Clear background highlights (default true).
clear_collapses: Clear collapses/cartoons (default true).
strip_annotations: Also strip generic |
| collapse_cladeC | Collapse clades by exact taxon names into Args: collapses: [{"taxa": ["A","B","C"], "label": "Clade1", "collapse_type": "collapse|cartoon"}]. |
| collapse_groupA | Collapse clades by taxonomic group name with a monophyly pre-check (supports LUCA / LACA / LBCA / root). A group whose lookup fails (unknown name / unresolvable taxonomy) is
recorded as a per-group Args:
groups: [{"group": "Cyanobacteriota", "label": "...",
"collapse_type": "collapse"}].
strict: Fail with |
| collapse_rankB | Collapse all monophyletic groups at a rank (optionally auto-coloring at
a rank first) — reproduces Args: rank: Rank to collapse (class, phylum, ...). collapse_style: collapse | cartoon. auto_color_rank: Rank for the pre-collapse palette coloring (defaults to phylum, matching the CLI). strict: Fail when a monophyletic group cannot be collapsed. taxonomy_mapping_file: Optional taxonomy mapping table (whitelisted), for trees whose taxonomy is not embedded in tip labels. |
| color_cladeC | Color a clade's MRCA branch ( Args: colors: [{"taxa": ["A","B"], "color": "#2196F3", "all": false}]. |
| cross_validateA | Cross-validate tree tip labels against sequence IDs (FASTA/FASTQ). Args:
tree_content: Newick/Nexus content.
tree_file: Path to a tree file inside an allowed read root.
sequences_file: Path to the sequence file (must be whitelisted).
strict: Raise |
| export_nexusB | Low-level: load tree content and export a base FigTree-compatible Nexus (structural conversion only, Newick → Nexus; no styling). Args: include_taxa_block: Emit a TAXA block (default true). run_name: Optional artifact base name. |
| get_environmentA | Report the FigTreeKit-MCP runtime environment. Returns versions of figtreekit / biopython / python / the MCP SDK, Java and figtree_patched.jar availability, the workspace root, and the allowed read-only roots. |
| highlight_cladeB | Add FigTree hilight annotations (background bands) to one or more clades. Args:
highlights: [{"taxa": ["A","B"], "color": "#804548", "width": 1.0,
"offset": 0}] entries. |
| render_treeB | Render a Nexus file (or tree content) to PNG/PDF/SVG/JPEG via the patched FigTree JAR; returns paths plus an optional base64 data URI preview. Applies background/foreground/label colour post-processing for raster formats. Args: nexus_file: Path to a Nexus file (whitelisted; takes precedence). tree_content: Newick/Nexus content rendered through a base export. format: PNG|PDF|SVG|JPEG (default PNG). width: Image width in pixels. height: Image height in pixels. background_color: #RRGGBB background (raster post-process). foreground_color: #RRGGBB foreground (raster post-process). label_color: #RRGGBB protected label colour. jar_path: Explicit figtree_patched.jar path (default: app config / auto-detection). timeout: Max seconds for the JVM render call (default: app.render_timeout, normally 180). run_name: Optional artifact base name. |
| run_figtreekit_cliA | Run the figtreekit CLI with arbitrary argv (full CLI coverage; no
shell). Outputs are redirected into the run directory; each rewrite is
disclosed in Args:
argv: The figtreekit arguments as an array. Use |
| set_clade_fontC | Set font name/style/size for a clade's tip labels. Args: fonts: [{"taxa": ["A"], "font_name": "Arial", "font_style": 1, "font_size": 14}]; font_style 0 plain / 1 bold / 2 italic / 3 bold-italic. |
| setup_figtreeA | Download (or use given jar) and compile the patched FigTree JAR. Args: jar_path: Optional existing JAR to use (whitelisted; no compile). check_only: Only check dependencies (no download/compile). verbose: Print step-by-step setup progress. |
| style_treeB | Style a tree with the full FigTreeKit parameter surface and export a
FigTree-compatible Nexus file. Returns the file, an
equivalent Execution order mirrors the CLI: plain clade annotations (highlight /
color / font / clear) → taxonomy auto-color / collapse-rank → collapse
operations. Multi-tree files: Args: See the mapped parameter table in docs/tools_reference_EN.md; every argument is optional (unspecified = figtreekit default). |
| summarize_treeA | Parse and summarize a tree: format, counts, root state, branch stats. Never fails on validation issues (use validate_tree for that); a
multi-tree file without an explicit selection yields a Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. include_tip_labels: Include the tip-label preview. tip_labels_limit: Max number of preview labels (1..10000). multi_tree: first|last|random|split|all selection for multi-tree Nexus. tree_index: 0-based index into a multi-tree Nexus. |
| taxonomy_completenessB | Report taxonomy completeness per rank; list complete/incomplete/missing tips. Equivalent to Args: tree_content: Newick/Nexus content. tree_file: Path to a tree file inside an allowed read root. taxonomy_mapping_file: Optional CSV/TSV mapping (whitelisted). taxonomy_levels: prefix:rank list. |
| validate_treeA | Deep-validate a Newick/Nexus tree or FASTA/FASTQ sequence file. Returns structured errors, warnings, format and counts. Semantics match
Args: tree_content: Newick/Nexus/FASTA/FASTQ content (direct paste). tree_file: Path to a tree/sequence file inside an allowed read root. mol_type: Expected alphabet for sequences (DNA|RNA|protein). skip_length_check: Skip alignment-length consistency check (FASTA). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| create-publication-figure | 引导 AI 完成 验证→摘要→分析→样式化→渲染 的出版级出图流程。 Guide the AI through validate → summarize → analyze → style → render for a publication-grade figure. |
| taxonomy-audit | 引导 AI 输出分类学单系性审计表(批量分析 + 完整性 + 可视化)。 Guide the AI to produce a taxonomic monophyly audit table (batch analysis + completeness + optional visualisation). |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| _version_resource | 运行时版本 / JAR / Java 状态快照(JSON)。Runtime environment snapshot (JSON). |
| _help_resource | figtreekit CLI 全量帮助 + MCP↔CLI 对照提示(文本)。Full CLI help (text). |
| _defaults_resource | FigTree 默认配置参数(figtree block 键,JSON)。FigTree defaults (JSON). |
TDQS
Scored across 21 tools
There is meaningful overlap between style_tree and apply_config (both apply a config plus operations and export Nexus), and the collapse_clade/collapse_group/collapse_rank trio requires careful reading to distinguish. run_figtreekit_cli also shadows nearly every other tool as an escape hatch. Descriptions do clarify intent, but an agent must parse them closely to avoid misselection.
Most tools follow a clear snake_case verb_noun pattern (get_environment, highlight_clade, collapse_rank, validate_tree). Minor deviations exist: taxonomy_completeness is noun-only, cross_validate is verb_verb, and setup_ vs set_ prefixes coexist. The overall convention is still predictable and readable.
21 tools falls in the borderline 16-25 band and feels heavy for a single MCP server, even for a broad tree-analysis domain. Several areas could be consolidated, such as the three collapse variants and style_tree/apply_config. Each tool has a plausible role, but the surface is larger than ideal.
Coverage is strong: setup/check, rendering, annotation add/clear, taxonomy analysis, monophyly checks, cross-validation, summarization, validation, export, styling and a full CLI escape hatch. Minor gaps in direct tree-shape operations (e.g., reroot, prune, rotate) can be worked around via run_figtreekit_cli. The lifecycle for core tree-styling and analysis workflows is well represented.