nextflow-triage-mcp
Provides tools that inspect a Nextflow run's trace file and task work directories to summarise what ran and failed, group failures by likely cause, show individual task commands and stderr, and check memory/resource usage per process.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Intention: Initially a Claude code creation but then I will improve upon the offering with real testing and code changes. Other MCP nextflow servers exist but this is not intended to replace those but act as a use-case for MCP creation learning.
nextflow-triage-mcp
An MCP server that lets an agent answer three questions about a Nextflow run: what happened, what failed and why, and were the resources right.
Nextflow already writes everything needed to answer those — a trace file and a
work directory per task — but answering them means grepping across a trace TSV,
matching truncated hashes to directories, and tailing .command.err by hand.
This makes that a tool call.
No external binaries. No reference data. Standard library plus the MCP SDK and Pydantic.
summarise_run → explain_run_failures → explain_task_failure
check_resource_usageQuick start
uv sync
uv run pytest
# build a realistic fake run to poke at
uv run python scripts/make_fixture_run.pyThe fixture run contains a process that OOMs on every sample, a process that fails on one bad input, and a process asking for far more memory than it uses — so every tool has something real to say.
Requires Python 3.12+ and uv. Works on Linux, macOS and native Windows: there is nothing here that needs a POSIX toolchain.
Related MCP server: CI Investigator MCP
The tools
Tool | Answers |
| What ran, what failed, where the compute went |
| Failures grouped by likely shared cause, with exit-code interpretation |
| The command and stderr of one task — the actual evidence |
| Over-allocation and near-limit memory, per process |
| Versions behind a result |
What it will not do
It does not read
nextflow.config. Memory directives are Groovy expressions that can scale with attempt number and input size, so the request cannot be established by reading the file.check_resource_usagetakes the requests from you, or reports observed usage without a verdict.It does not guess an exit code's meaning as fact. 137 is conventionally SIGKILL and usually the OOM killer, but a tool may return any code. The interpretation is stated as a hypothesis, and every group points at the stderr that would confirm it.
It does not invent a work directory. Cleaned up or belonging to a resumed run are both normal; the tool says which and returns what it still knows.
Running it
uv run nextflow-triage-mcp # from a checkout
uvx --from . nextflow-triage-mcp # as an installed console scriptFor Claude Desktop, in claude_desktop_config.json:
{
"mcpServers": {
"nextflow-triage": {
"command": "uvx",
"args": ["--from", "/absolute/path/to/nextflow-triage-mcp", "nextflow-triage-mcp"]
}
}
}No environment variables. Every input is a tool argument, which is deliberate — there is no configuration to get wrong and no hidden state behind a result.
Transport is stdio, so stdout is the protocol channel. Logging is
configured to stderr in __main__.py.
A stray print() in a tool does not corrupt the stream on SDK v2: the stdio
transport claims file descriptor 1 for the protocol at startup and diverts
sys.stdout to stderr for the life of the session (see mcp/server/stdio.py,
and issue #1933). This was a real footgun on v1 and is now handled for you.
Configure logging to stderr anyway — it is where logs belong, and it keeps the
code correct if the transport ever changes.
With MCP Inspector
npx -y @modelcontextprotocol/inspector uv run nextflow-triage-mcpNeeds Node 20+. Point the tools at the directory make_fixture_run.py prints.
Learning from it
TUTORIAL.md is a nine-exercise walkthrough: change the code, predict what
happens, check the answer. Every answer in it was run before being written down
— including one that turned out to be wrong on the first attempt, which is left
in as a note.
uv run python scripts/make_fixture_run.py # then open TUTORIAL.mdTesting
uv run pytest
uv run ruff check . && uv run ruff format --check . && uv run mypyThree layers, deliberately:
test_units.py— pure string-to-number conversion, parametrised over every real Nextflow format. The most systematic thing that could break.test_analysis.py— the verdict logic, over constructedTaskRecordvalues. No filesystem, no pipeline run.test_server.py— every tool called through a realClientover the MCP protocol.
That last layer exists because unit tests call the tool functions directly and
never see what the protocol does to the response. A union return type, for
instance, gets wrapped in a {"result": ...} envelope that a direct call never
reveals — so protocol-level tests catch a class of problem nothing else does.
Licence
Apache-2.0.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Triage failing GitHub Actions jobs and see what self-heal repaired, in natural language.
Read a tool-call log from an AI agent run and see which calls failed, looped or were slow.
Find your AI agent's likely failure mode, get runtime settings, and clarify ambiguous prompts.
Check duplicate IDs, triage failed workflows, and discover priced workflow jobs.
Related MCP Servers
- AlicenseAqualityDmaintenanceAnalyzes AI agent traces to diagnose failures, score performance, and provide actionable fixes using tools like judge_trace and trace_breakdown.32MIT
- AlicenseAqualityCmaintenanceProvides tools to analyze and debug GitHub Actions CI failures, including summarizing failures, detecting flaky tests, and suggesting fixes.109 npm1ISC
- AlicenseAqualityBmaintenanceAllows LLM agents to query Playwright JSON test results for run summaries and failure information.2MIT
- FlicenseAqualityDmaintenanceEnables CI/CD failure triage for GitHub Actions by inspecting failed runs, classifying root causes with LLM assistance, retrieving relevant runbook guidance, estimating flakiness, and either preparing dry-run fix PRs or publishing structured diagnoses to Discord for human review.2-