lava-mcp
This server provides an MCP interface to a LAVA (Linaro Automated Validation Architecture) instance, allowing AI agents to query the board farm, manage test jobs, and interact with hardware test infrastructure.
Observation & Discovery
whoami/version— Identify the authenticated user and LAVA server versionlist_devices/get_device— List or inspect devices with filters by type, health, or stateget_device_dictionary— Get a device's rendered Jinja2/YAML configurationget_qdl_info— Summarize QDL/flash capabilities (useful for Qualcomm boards)list_device_types/list_workers— List device types and dispatcher workers
Job Monitoring
list_jobs/get_job— List or inspect test jobs with filters (state, health, submitter, device type)get_job_definition— Retrieve the original YAML job definitionget_job_logs— Fetch job logs with optional line range filteringget_job_results— Get test-case pass/fail resultsget_queue/get_running/get_lab_health— View queue, running job counts, and overall lab health
Job Management (Write Operations)
validate_job— Validate a YAML job definition without submittingsubmit_job— Submit a job and receive new job ID(s)cancel_job/resubmit_job— Cancel or resubmit jobsset_job_priority— Adjust a job's queue priority (0–100)
Additional Features
Read-only mode: Disable write operations for safe observation (
--read-only)Credential flexibility: Supports per-request HTTP header auth (multi-user) or environment-based auth
Flexible transport: Runs over stdio or streamable HTTP, with optional HTTPS via Caddy
SSH gateway: In hosted mode, enables an SSH rendezvous for board sessions without inbound worker access
Interactive board sessions (hosted mode): Open sessions to boards, run commands (e.g., fastboot, adb), and close sessions
Click on "Install 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., "@lava-mcplist devices available in the board farm"
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.
lava-mcp
An MCP server that exposes a LAVA instance to agents — letting them query the board farm, submit and manage test jobs, and (in a later phase) open interactive sessions to a board.
It is a thin client over LAVA's REST API (v0.2/v0.3); point it at any LAVA instance.
Install
pip install -e .[dev]Related MCP server: A2A Client MCP Server
Credentials
The LAVA target (LAVA_URL) is normally pinned to the instance a deployment
fronts; the token is resolved per request:
Hosted (HTTP), pinned — set
LAVA_URLon the server to the LAVA instance it serves. Each connecting client then sends only its ownX-Lava-Tokenand acts as its own LAVA user; noX-Lava-Urlis needed. The server stores no per-user token.Hosted (HTTP), multi-tenant — leave
LAVA_URLunset; each client sends bothX-Lava-UrlandX-Lava-Token, so one server can front many LAVA instances.Local (stdio) mode — falls back to
LAVA_URL/LAVA_TOKENin the environment (single user).
Run (stdio, local)
export LAVA_URL=https://lava.example.com
export LAVA_TOKEN=<your-api-token>
lava-mcp # or: lava-mcp --read-onlyLaunch over stdio from your MCP client (claude_desktop_config.json / Claude Code):
{
"mcpServers": {
"lava": {
"command": "lava-mcp",
"env": { "LAVA_URL": "https://lava.example.com", "LAVA_TOKEN": "..." }
}
}
}For a hosted server pinned to a LAVA instance, point Claude Code at the HTTP endpoint and pass only your token:
claude mcp add --transport http lava https://mcp.example.com/mcp \
--header "X-Lava-Token: <your-api-token>"If the server is multi-tenant (no LAVA_URL set), also pass
--header "X-Lava-Url: https://lava.example.com" to choose the instance.
Run as a hosted service (HTTPS via Caddy)
For interactive board sessions the server must be reachable by lab workers, so run
it hosted. docker compose brings up the MCP server behind Caddy (automatic HTTPS)
and exposes the SSH board-session gateway:
cp .env.example .env # set LAVA_URL/LAVA_TOKEN/LAVA_MCP_DOMAIN/LAVA_MCP_GATEWAY_HOST
docker compose up -dAgents connect to
https://$LAVA_MCP_DOMAIN/mcp(streamable-HTTP transport).In-job containers dial the SSH gateway at
$LAVA_MCP_GATEWAY_HOST:2222.
Or run the HTTP transport directly:
lava-mcp --transport streamable-http --host 0.0.0.0 --port 8000 --gatewayInteractive board sessions (gateway)
In hosted mode with --gateway (or LAVA_MCP_GATEWAY_ENABLED=true), the server runs
an in-process SSH rendezvous. open_board_session submits a LAVA job that runs a
device-attached container; the container dials out (ssh -R) to the gateway, so
no inbound access to the worker is needed. Then:
run_in_session(session_id, command)runs a command on the board's container (e.g.qdl,fastboot,adb, shell).close_board_session(session_id)cancels the job and frees the board.
The container image + test definition live in this repo under interactive/
(published to ghcr.io/mattface/lava-mcp/interactive and fetched from this repo by
the lab worker); the parameter contract is in lava_mcp/jobs.py.
Configuration
Env var | CLI flag | Meaning |
|
| LAVA base URL (stdio fallback; HTTP clients send |
|
| API token (stdio fallback; HTTP clients send |
|
| REST version, default |
|
| Hide write tools (submit/cancel/resubmit) |
|
|
|
|
| HTTP bind (hosted mode) |
|
| Enable interactive SSH board-session gateway |
|
| SSH gateway port (default 2222) |
|
| Host containers dial back to |
Tools (v1)
Read/observe: whoami, version, list_devices, get_device,
get_device_dictionary, list_device_types, list_workers, list_jobs,
get_job, get_job_definition, get_job_logs, get_job_results, get_queue,
get_running, get_lab_health, validate_job.
Write (omitted with --read-only): submit_job, cancel_job, resubmit_job.
Interactive board sessions (hosted gateway mode): open_board_session,
run_in_session, close_board_session, list_board_sessions.
Test
pytestRoadmap
The interactive board sessions gateway is implemented here, along with the container image + test definition the in-job container runs (
interactive/, published toghcr.io/mattface/lava-mcp/interactive).Human shell proxy + interactive PTY through the gateway.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mattface/lava-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server