MCP server for Beaker lab automation — system provisioning, job management, distro discovery, and failure diagnosis
Project description
mcp-beaker
MCP server for Beaker lab automation -- system provisioning, job management, distro discovery, and failure diagnosis.
Works with any Beaker server instance. Built on FastMCP v3 and designed for use with AI coding assistants (Cursor, Claude Desktop, etc.).
Features
- 23 tools covering the full Beaker lifecycle: systems, jobs, distros, tasks
- Dual auth: Kerberos (via
bkrCLI) and password (via XML-RPC) - Job XML validation: auto-fills missing fields, infers distro families
- Failure diagnosis: deep analysis with auto-retry on correctable failures
- 10 documentation topics exposed as MCP resources
- 2 workflow prompts for common tasks (reserve system, diagnose job)
- Generic: works with any Beaker URL, configurable SSL/CA settings
Installation
# Using uv (recommended)
pip install uv
uvx mcp-beaker
# Using pip
pip install mcp-beaker
mcp-beaker
# Local development
uv run --directory /path/to/mcp-beaker mcp-beaker
Configuration
Cursor / VS Code
Add to your .cursor/mcp.json (or .vscode/mcp.json):
{
"mcpServers": {
"beaker": {
"command": "uvx",
"args": ["mcp-beaker"],
"env": {
"BEAKER_URL": "https://beaker.example.com",
"BEAKER_AUTH_METHOD": "kerberos"
}
}
}
}
Streamable HTTP mode
uvx mcp-beaker --transport streamable-http --port 8000
{
"mcpServers": {
"beaker": {
"url": "http://localhost:8000/mcp",
"type": "streamableHttp"
}
}
}
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
BEAKER_URL |
Yes | -- | Base URL of your Beaker server |
BEAKER_AUTH_METHOD |
No | kerberos |
kerberos or password |
BEAKER_USERNAME |
For password auth | -- | Beaker username |
BEAKER_PASSWORD |
For password auth | -- | Beaker password |
BEAKER_OWNER |
No | $USER |
Default owner for job queries |
BEAKER_SSL_VERIFY |
No | true |
Verify SSL certificates |
BEAKER_CA_CERT |
No | -- | Path to CA certificate bundle |
CLI Options
mcp-beaker [OPTIONS]
Options:
--transport [stdio|sse|streamable-http] Transport type (default: stdio)
--port INTEGER Port for HTTP transports (default: 8000)
--host TEXT Host for HTTP transports (default: 0.0.0.0)
--path TEXT Path for streamable-http (default: /mcp)
--beaker-url TEXT Beaker server URL
--ssl-verify / --no-ssl-verify Verify SSL certs (default: verify)
--ca-cert TEXT CA certificate bundle path
--auth-method [kerberos|password] Authentication method
--read-only Disable all write tools
--enabled-tools TEXT Comma-separated tools to enable
-v, --verbose Increase verbosity (-v info, -vv debug)
--version Show version
--help Show this message
Tools
Read Tools (13)
| Tool | Description |
|---|---|
list_systems |
List systems by availability (all/available/free) |
get_system_details |
Hardware specs, ownership, status for a system |
get_system_history |
Activity history for a system |
get_system_arches |
Supported OS families and architectures |
list_jobs |
Filter jobs by owner, status, whiteboard |
get_job_status |
Job status with failure diagnosis |
get_job_results_xml |
Export job results as XML |
get_job_logs |
List log files for a job/recipe/task |
list_distro_trees |
Search distros by name, family, arch, tags |
list_os_families |
List all known OS families |
whoami |
Show authenticated user info |
list_lab_controllers |
List all lab controllers |
search_tasks |
Search the task library |
Write Tools (10)
| Tool | Description |
|---|---|
submit_job |
Submit a job from XML (with validation and auto-fill) |
clone_job |
Clone and resubmit an existing job |
cancel_job |
Cancel a running/queued job |
watch_job |
Poll until completion with failure analysis and auto-retry |
reserve_system |
Manually reserve a system |
release_system |
Release a manually reserved system |
power_system |
Power on/off/reboot a system |
provision_system |
Provision a reserved system with a distro |
extend_watchdog |
Extend a running task's watchdog timer |
set_job_response |
Ack/nak (waive) a recipe set result |
Authentication
Kerberos (recommended)
Ensure you have a valid ticket:
kinit your-username@YOUR.REALM
The server uses the bkr CLI for authenticated operations, which picks up the Kerberos ticket automatically.
Password
Set BEAKER_AUTH_METHOD=password along with BEAKER_USERNAME and BEAKER_PASSWORD. The server authenticates via the XML-RPC auth.login_password() method.
Architecture
src/mcp_beaker/
__init__.py # Click CLI entry point
config.py # BeakerConfig dataclass
exceptions.py # Custom exceptions
client.py # BeakerClient (XML-RPC + REST)
models/ # Pydantic response models
servers/
__init__.py # FastMCP server, lifespan, DI helper
systems.py # System tools (4 read + 4 write)
jobs.py # Job tools (4 read + 6 write)
distros.py # Distro tools (2 read)
tasks.py # Task tools (1 read)
general.py # General tools (2 read)
prompts.py # Workflow prompt templates
resources.py # Beaker documentation resources
utils/
xml_validation.py # Job XML validation/auto-fill
diagnosis.py # Failure analysis engine
formatting.py # Human-readable formatters
bkr_cli.py # bkr CLI helpers
parsing.py # ID parsing utilities
Development
cd mcp-beaker
uv sync --dev
uv run pytest
uv run ruff check src/
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_beaker-0.1.0.tar.gz.
File metadata
- Download URL: mcp_beaker-0.1.0.tar.gz
- Upload date:
- Size: 135.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
190edeafcb1fe1299700e28dabfca50a566642ee4b53266685890899c9e732f0
|
|
| MD5 |
55118f903e671e244f260a775e5eaa1d
|
|
| BLAKE2b-256 |
7419cc8febb864837cb352f4c694e54a7b217a18cc6043b16b3a36d8eec1cabe
|
File details
Details for the file mcp_beaker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_beaker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e520784462c187188a2b90770ef9641303a843d019199e9da96bfaae0ee7a206
|
|
| MD5 |
5d65a454f27ba0984e936bf96c003390
|
|
| BLAKE2b-256 |
b47368541f403095a3c9099e2fb40e71532f556aa37263a04199557daea197e7
|