Skip to main content
MCP server CX Codex

Hyperlight — Claude Code MCP server: isolated Python in a micro-VM

Hyperlight runs an agent's Python in a local micro-VM with its own kernel and hardware isolation. Variables and imports persist from one call to the next.

Apache-2.0 ★ 71 updated 2026-10-24

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-server-hyperlight -- uvx mcp-server-hyperlight
Open on GitHub

What Hyperlight does

The Hyperlight MCP server boots a Unikraft unikernel in a micro-VM through KVM, MSHV, WHP or HVF, depending on your OS. There is no account, no daemon and no API key; code and data stay on the machine. The guest gets no network unless you allow hosts with --net-allow, and no files unless you mount them.

The image ships CPython 3.12 plus numpy, pandas, scipy, scikit-learn, matplotlib, pillow and requests. On first start it pulls roughly 130 MB and stores a warm snapshot around 800 MB; after that the guest comes up from the snapshot in milliseconds. On Linux with KVM, startup is about 40 ms.

The server is a thin layer over the smolagents-hyperlight executor and talks to a Python script inside the guest through its console. Replies are bounded: 64 MiB total, 2 MiB of printed output, and a tool result keeps at most 100,000 characters. A call that outruns --timeout (30 seconds by default) is stopped and the guest replaced from the snapshot. You need hluk v0.18.0 or newer and a hypervisor; without those the server will not start.

What it helps with

  • run agent Python without cloud sandboxes
  • keep variables and imports between calls
  • isolate code in its own kernel with hardware protection
  • install extra packages into the guest with --package
  • mount local directories through --hluk-arg

Example prompts for the agent

  • Run this code and show the output
  • Install sympy in the sandbox and compute the integral
  • Reset the sandbox to a clean state

How to install Hyperlight

Platform CLI

claude mcp add mcp-server-hyperlight -- uvx mcp-server-hyperlight

uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-hyperlight <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Hyperlight

How do I install Hyperlight in Claude Code?

Install hluk v0.18.0 or newer first: on Linux and macOS run curl -fsSL https://raw.githubusercontent.com/hyperlight-dev/hyperlight-unikraft/main/install.sh | sh, on Windows in PowerShell run irm https://raw.githubusercontent.com/hyperlight-dev/hyperlight-unikraft/main/install.ps1 | iex. Then add the server with claude mcp add mcp-server-hyperlight -- uvx mcp-server-hyperlight.

What does Hyperlight do?

It gives an agent a Python environment inside a local micro-VM with hardware isolation. Variables, imports and functions persist across calls, like in a notebook.

How does Hyperlight compare to Pyodide and cloud sandboxes?

Pyodide runs in Wasm inside a Deno process and is limited to Pyodide packages; cloud sandboxes want an account and an API key. Hyperlight boots full CPython 3.12 with native wheels on your own machine.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open