mcp-lava
mcp-lava is an MCP (Model Context Protocol) server that lets an LLM interact with a
Linaro LAVA by wrapping the official
lavacli command-line tool.
Instead of re-implementing LAVA's XML-RPC API, this server executes lavacli locally and returns
results to the LLM in a tool-friendly way.
Why an MCP server for LAVA?
LAVA is powerful, but day-to-day workflows often involve many repetitive CLI steps:
- checking device availability and health
- locating the right job definition
- submitting jobs and monitoring states
- pulling logs and artifacts for failed jobs
- correlating failures across multiple runs
- re-running jobs to reproduce or to confirm a fix
An LLM can help with these workflows if it can reliably call the right commands and parse the
outputs. mcp-lava provides that bridge:
- Reuses
lavaclisubcommands and output formats (many support--json/--yaml). - Keeps server logic minimal (no duplicated API client).
- Makes automation conversational: "find the last failed run for this device type and summarize the failure", "show me the first kernel panic in the logs", etc.
Example scenarios
A few practical things you can do with an LLM + mcp-lava:
-
Triage a failure quickly
- List recent jobs for a project
- Detect failures, fetch logs, and summarize the suspected root cause
- Extract the first occurrence of an error pattern (e.g. kernel panic, timeout, SSH failed)
-
Lab status overview
- List devices and filter to offline/retired/busy
- Show which workers are overloaded
- Identify the most flaky device type based on recent job outcomes
-
Job submission assistance
- Validate that a device type exists
- Submit a job definition
- Track the job until completion and then download artifacts
-
Re-run / reproduce / confirm a fix ("rerun" workflow)
- Re-run the same job definition to reproduce a failure on demand
- Re-run on a different device (or a different device type) to separate lab flakiness from real regressions
- Re-run after changing one variable (new kernel, new rootfs, different test plan) and compare outcomes
- Compare logs/artifacts between the original run and the rerun to spot what changed
-
Routine reporting
- "Summarize all failed jobs in the last 24h, grouped by device type"
- "Show the top 3 failure signatures and link to the relevant logs"
Installation
Create/activate a virtual environment, then install:
python -m venv .venv
# Activate the venv (command depends on your shell)
python -m pip install -U pip
pip install mcp-lava
Alternatively, you can also use uvx mcp-lava to run it directly without installing to your system Python.
Configuration (required)
mcp-lava authenticates to LAVA by creating/refreshing a lavacli identity at startup and then
running all subsequent commands using that identity.
Set these environment variables:
LAVA_URL- Base URL or RPC endpoint. If it doesn't end with/RPC2, the server appends it.LAVA_USERNAME- LAVA username.LAVA_AUTHENTICATION_TOKEN- LAVA token.
Optional:
LAVA_IDENTITY- Identity name to use (default:mcp).LAVA_SSL_VERIFY-true/false(default:true).
A minimal way to represent variables (set them using your preferred method):
LAVA_URL=https://lava.example.com
LAVA_USERNAME=your.user
LAVA_AUTHENTICATION_TOKEN=<your-token>
Running the MCP server
This server uses the stdio transport (typical for MCP servers).
mcp-lava
Equivalent:
python -m mcp_lava.server
Tools
lava_run
Run any lavacli command.
argsmust be an argv token list (a list of strings): exactly what you would type afterlavacli.
Examples:
lavacli devices list->args=["devices", "list"]lavacli devices show qemu0->args=["devices", "show", "qemu0"]lavacli devices list --json->args=["devices", "list", "--json"]
Do not pass a single space-separated string like args=["devices list"].
lava_help
Get lavacli --help, or help for a specific command group.
lava_command_tree
Introspect the installed lavacli Python package and return its command/subcommand tree.
Metadata
Release files for mcp-lava 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_lava-0.1.1.tar.gz | 10.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_lava-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / mcp_lava-0.1.1.tar.gz
| Download URL | mcp_lava-0.1.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0309960abbdfaadb946ee33a3af3449c1b68c35825af5dcba7c1584f80a4704d
|
|
BLAKE2b-256 checksum How to use checksums |
f38ba1abe5e3690a95e9413b5f753bc2ab8f0d12b1fccfbd18b62bc18dbb847b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.2
|
Release files / mcp_lava-0.1.1-py3-none-any.whl
| Download URL | mcp_lava-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
707d07264d6f8472e0bcdba529041fc14195ef15b87119dd1c81c48db5b0ad78
|
|
BLAKE2b-256 checksum How to use checksums |
948eaad9f7fa0bbfde8232685e27d6fc9439850db004659aa628ceb10de53717
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.2
|
Security for mcp-lava 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.