使用说明
mcp-hydra
An MCP server for interacting with Hydra CI instances.
Tools
| Tool | Description |
|---|---|
list_projects |
List all projects on the Hydra instance |
get_project |
Get project details and its jobsets |
get_jobset |
Get jobset details |
get_build |
Get build details by ID |
get_latest_build |
Get the latest (optionally finished) build for a job |
list_builds_in_eval |
List all builds in an evaluation |
get_evaluation |
Get evaluation details |
search |
Search builds and projects |
trigger_jobset |
Trigger a jobset evaluation (requires auth) |
set_hydra_url |
Switch the target Hydra instance URL |
Setup
Claude Code
Add to your project's .claude/mcp.json (or ~/.claude/mcp.json for global):
{
"mcpServers": {
"hydra": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-hydra", "mcp-hydra"],
"env": { "HYDRA_URL": "https://hydra.nixos.org" }
}
}
}
Environment variables
| Variable | Default | Description |
|---|---|---|
HYDRA_URL |
https://hydra.nixos.org |
Base URL of the Hydra instance |
HYDRA_USER |
Username for write operations (trigger_jobset) |
|
HYDRA_PASSWORD |
Password for write operations |
You can also switch instances at runtime using the set_hydra_url tool.
Development
uv sync --group dev
uv run pytest
References
- Hydra API routes (source) - Hydra doesn't have formal API docs; the controller source is the reference.
- Model Context Protocol
License
CC0 1.0 - public domain.
