context_use
Switch the active Docker CLI context to an existing context name, so subsequent docker commands use the target environment.
Instructions
Set the active Docker context for the CLI on the host running this MCP server.
Note: this does not retarget the long-lived docker-py client - SDK-backed tools keep using the
endpoint they connected to at startup. To retarget those, restart the server with a different
DOCKER_HOST / DOCKER_CONTEXT. Create contexts with context_create; list them with
context_list.
Does not raise on a non-zero CLI exit (a missing docker binary or a timeout still raises) - inspect
returncode/stderr in the result.
Args: name: Existing context name to set as default
Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |