hydra-mcp
hydra-mcp lets an agent inspect and manage Hydra CI instances through MCP, with read-only anonymous access and authenticated write actions.
List configured Hydra instances, the default instance, and whether write login is available.
Browse projects and jobsets, including settings, evaluation state, errors, build counts, and recent evaluations.
Inspect evaluations, inputs/flake revisions, build status counts, and filtered build lists.
Inspect builds in detail: status, timing, derivation, outputs, products, metrics, build steps, and logs.
Look up a job's newest evaluation build and latest successful build; query the build queue and running builds.
Search projects, jobsets, jobs, and builds by name, output, or store path.
Trigger jobset evaluations, restart/cancel/bump builds, and manage an evaluation's failed, aborted, or queued builds.
Create or partially update projects and jobsets, including flake and legacy Nix-expression jobsets.
Use multiple configured instances; write tools use configured credentials and Hydra permissions.
Integrates with NixOS Hydra CI instances to inspect projects, jobsets, evaluations, builds, build steps, logs, jobs, and the build queue; supports searching and, with an account, triggering evaluations, restarting/cancelling/bumping builds, and creating or editing projects and jobsets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hydra-mcp why did the latest nixos-unstable jobset evaluation fail?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hydra-mcp
An MCP server for Hydra, the Nix continuous integration server. It lets an agent look at projects, jobsets, evaluations, builds, build steps, logs and the queue, and (with an account) trigger evaluations, restart, cancel or bump builds and create or edit projects and jobsets. It works with NixOS Hydra and its forks (Lix's Hydra), and can talk to several instances at once.
Tools
Tool | What |
| Configured instances, the default, whether each can log in |
| Projects; a project's jobsets with error flags and build counts |
| Configuration, evaluation state, eval/fetch errors, recent evaluations |
| Evaluations (inputs/flake rev, counts), builds filtered by status |
| Status, timing, derivation, outputs, products, metrics; failed, running and newest build steps ( |
| Tail of a build's log or of one build step (e.g. the failed dependency) |
| A job's build in the newest evaluation and its latest successful build |
| Queue size, top of the queue, running builds |
| Projects, jobsets, jobs and builds by name or store path |
| Schedule a jobset evaluation ( |
| Build actions |
| Restart failed/aborted builds of an evaluation, cancel or bump them |
| Create, or change only the given fields of, a project or jobset |
There is also a debug_jobset prompt. Read tools work anonymously on public instances; write tools
log in with the configured account and need the matching Hydra role (create-projects,
restart-jobs, cancel-build, bump-to-front, or project ownership).
Notes on Hydra's API that the tools handle for you: boolean fields of projects and jobsets are true
whenever the key is present (so put_* omits false flags rather than sending 0), latest URLs
mean the latest successful build, build steps only exist on the HTML build page, and POST requests
need a Referer/Origin matching the instance.
Related MCP server: project-tasks-mcp
Configuration
~/.config/hydra-mcp/config.toml (or $HYDRA_MCP_CONFIG, or --config):
default = "nixos"
[instances.nixos]
url = "https://hydra.nixos.org"
[instances.mine]
url = "https://hydra.example.org"
username = "alice" # or username_file = "~/.secrets/hydra/username"
password_file = "~/.secrets/hydra/password"Passwords are only read from files, at login time; they never appear in the config, the process
arguments or tool results. URLs must be HTTPS (plain HTTP only for loopback), and the client never
follows redirects to another host. The file is re-read whenever it changes (including a Home
Manager switch that repoints its symlink), so no restart is needed. Without a config file, HYDRA_URL (default
https://hydra.nixos.org), HYDRA_USERNAME and HYDRA_PASSWORD_FILE describe a single instance.
Running
nix run github:slopmaxxer/hydra-mcp # stdio
uv run hydra-mcp --transport streamable-http # http://127.0.0.1:8002/mcp, no authenticationClaude Code: claude mcp add -s user hydra -- nix run github:slopmaxxer/hydra-mcp, or point
command at a built result/bin/hydra-mcp. Logs, descriptions and error messages come from builds
and other users: clients should treat them as data, not instructions.
Development
nix develop # editable environment with pytest
uv run pytest # offline tests: config, client against a mock Hydra, MCP stdio handshake
uv run pytest -m live # a few read-only calls to a real instance (HYDRA_LIVE_URL)
nix build && nix flake checkMIT licensed.
Available Tools
18 toolsbump_buildB
Move a queued build to the front of the queue (needs bump rights).
Inputs: build_id (required), instance. Returns: object
cancel_buildADestructiveIdempotent
Cancel a queued or running build (needs cancel rights). Confirm with the user first.
Inputs: build_id (required), instance. Returns: object
get_buildARead-onlyIdempotent
Get a build: status, timing, derivation, outputs, products, metrics and its build steps.
steps="relevant" (default) lists failed and running steps plus the newest few; "all" lists every step (large for big closures). Failed steps name the dependency behind "dependency failed".
Inputs: build_id (required), steps, instance, recent_steps. Returns: object
get_build_logARead-onlyIdempotent
Get the last lines of a build's log, or of one of its build steps (e.g. the failed dependency).
Inputs: build_id (required), step, instance, tail_lines. Returns: object
get_evalARead-onlyIdempotent
Get an evaluation: its inputs, build counts by status and its builds (filter by status).
status: all, failed (finished, not succeeded), succeeded or queued (not finished yet).
Inputs: eval_id (required), limit, status, instance. Returns: object
get_jobBRead-onlyIdempotent
Get a job's build in the jobset's newest evaluation (any status) and its latest successful build.
Inputs: job (required), jobset (required), project (required), system, +1 more. Returns: object
get_jobsetBRead-onlyIdempotent
Get a jobset's configuration, evaluation state and errors, plus its most recent evaluations.
Inputs: jobset (required), project (required), instance, recent_evals. Returns: object
get_projectARead-onlyIdempotent
Get one project's settings and the state of each of its jobsets (errors, last evaluation).
Inputs: project (required), instance. Returns: object
get_queueBRead-onlyIdempotent
Get the build queue (highest priority first), its size by jobset, and the builds running right now.
Inputs: limit, instance. Returns: object
list_evalsARead-onlyIdempotent
List a jobset's evaluations, newest first, one page at a time.
Inputs: jobset (required), project (required), page, instance. Returns: object
list_instancesARead-onlyIdempotent
List the configured Hydra instances, the default one and whether each can log in for write tools.
Inputs: no named parameters. Returns: object
list_projectsBRead-onlyIdempotent
List the projects of a Hydra instance with their jobsets.
Inputs: instance. Returns: object
manage_evalADestructiveIdempotent
Restart an evaluation's failed or aborted builds, cancel its queued builds, or bump them to the front.
cancel is destructive: confirm with the user first.
Inputs: action (required), eval_id (required), instance. Returns: object
put_jobsetAIdempotent
Create a jobset, or change the given fields of an existing one (others keep their values).
Give flake for a flake jobset, or nix_expression_input/path plus inputs for a legacy one.
Needs project ownership (or admin). New jobsets default to enabled, visible, no email, 300 s polling.
Inputs: jobset (required), project (required), flake, state, +11 more. Returns: object
put_projectAIdempotent
Create a project, or change the given fields of an existing one (others keep their values).
Creating needs the create-projects role; editing needs project ownership.
Inputs: project (required), enabled, visible, homepage, +3 more. Returns: object
restart_buildB
Re-queue a finished build (needs restart rights).
Inputs: build_id (required), instance. Returns: object
searchBRead-onlyIdempotent
Search projects, jobsets, jobs and builds (by name, output or derivation path).
Inputs: query (required), instance. Returns: object
trigger_evaluationA
Ask Hydra to evaluate a jobset soon (needs restart rights on the project). force re-evaluates even if inputs are unchanged.
Inputs: jobset (required), project (required), force, instance. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools target a distinct resource+action (project, jobset, eval, build, queue, log), and descriptions clarify the read vs write split. There is mild overlap between the single-build write tools (restart_build, cancel_build, bump_build) and the bulk manage_eval, and between get_job and get_build, but the descriptions make the intended selection clear.
Nearly all tools follow verb_noun snake_case (list_projects, get_build, trigger_evaluation, cancel_build), which is predictable. Minor deviations are the bare 'search' (no noun) and the vague 'manage_eval', plus 'put_*' being used for create-or-update semantics.
18 tools is on the heavy side but each maps to a real Hydra concept (instances, projects, jobsets, evals, builds, queue, logs, search) plus a small write set. Nothing looks redundant enough to cut, though the read surface could be consolidated slightly.
Coverage is strong for the CI lifecycle: discovery, project/jobset inspection and editing, evaluations, builds, logs, queue control, and build restart/cancel/bump. Gaps are minor—no delete operations for projects, jobsets, or builds, and no tool to fetch build output/product contents beyond the log tail.
Related MCP Connectors
Manage uivoid projects, tools, keys, hosted databases and teams from your agent.
Manage your HyperLake data lake: clusters, catalogs, access policy, apps and agents.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Create, watch, pay for and connect hosted AI agent pods on AgentsPodium. Needs an API key.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceEnables LLMs to access Jenkins job data, trigger builds, and manage Jenkins tasks through a standardized interface.5-
- FlicenseNot gradedqualityBmaintenanceEnables managing projects, features, tasks, dependencies, executions, and human review through a Streamable HTTP endpoint, along with persistent inter-agent cooperation via task messaging and event subscriptions. It also supports administrative actions such as approvals, cancellations, unblocking, and member management.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to securely interact with Jenkins through its API, exposing tools for inspecting items, nodes, views, queues, and builds, reading console output, test reports, and artifacts, managing plugins, and triggering, stopping, or approving pipeline builds, including executing Groovy scripts. Supports stdio, SSE, and streamable-HTTP transports with configurable authentication, SSL verification, and a read-only mode.-
- FlicenseNot gradedqualityAmaintenanceEnables AI models to securely inspect and operate Jenkins through tools for jobs, builds, queue items, nodes, views, plugins, artifacts, pipeline inputs, and Groovy script execution. Supports stdio, SSE, and streamable-HTTP transports with configurable authentication and a read-only mode.-