로컬의 하드웨어 격리된 micro-VM에서 Python 코드를 실행하며, 호출 간 상태를 유지하여 안전하고 빠른 실행을 지원합니다.
다른 이름 hyperlight-dev/hyperlight-unikraft, mcp-server-hyperlight
- 스타
- 50
- Tools
- 2
- 다운로드, 30일
- 333
- 최신 버전
- 0.1.1
- 마지막 커밋
- 2026년 11월 14일
- 라이선스
- Apache-2.0
Hyperlight MCP란?
Hyperlight은(는) MCP server입니다. 로컬의 하드웨어 격리된 micro-VM에서 Python 코드를 실행하며, 호출 간 상태를 유지하여 안전하고 빠른 실행을 지원합니다. 2개 도구를 제공합니다. 예: run_python, reset_sandbox.
프로젝트 README에서 생성된 요약
Hyperlight MCP server 정보
Hyperlight는 로컬의 하드웨어 격리된 micro-VM 내에서 Python 코드를 실행하는 안전한 방법을 제공합니다. Claude Desktop, Cursor, VS Code 또는 Claude Code와 같은 MCP client를 사용하는 개발자를 위해 설계되었으며, hluk CLI를 통해 Unikraft unikernel을 실행합니다. 이 설정은 클라우드 계정, daemon 또는 API key 없이도 코드와 데이터가 사용자의 머신에 그대로 유지되도록 보장합니다. Linux에서는 KVM 또는 MSHV를, Windows에서는 WHP를, Apple silicon Mac에서는 HVF를 사용하여 높은 성능을 유지합니다.
표준 웹 기반 sandbox와 달리, 이 server는 CPython 3.12 및 native wheels를 완벽하게 지원합니다. 호출 간에 상태를 유지하므로 Jupyter notebook과 유사하게 변수와 import를 지속할 수 있습니다. 사용자는 실행을 위한 run_python tool과 guest를 새로고침하기 위한 reset_sandbox를 사용하여 환경을 제어할 수 있습니다. 보안은 엄격한 네트워크 격리를 통해 관리되며, --net-allow 옵션으로 명시적으로 허용하지 않는 한 외부 연결은 허용되지 않습니다.
활용 사례
- 1지속적인 Python 스크립트 실행변수와 함수가 후속 tool 호출 시에도 사용 가능한 상태로 유지되는 Python 코드를 실행합니다.
- 2안전한 데이터 분석 수행numpy 및 pandas와 같은 무거운 과학 라이브러리를 하드웨어 격리된 환경에서 사용합니다.
- 3격리된 연산 실행기본적으로 로컬 파일이나 인터넷에 접근할 수 없는 sandbox에서 코드를 실행합니다.
- 4커스텀 의존성 관리sandbox를 리셋할 때마다 사용할 수 있도록 특정 Python package를 설치합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Hyperlight MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 Hyperlight MCP 설치
$ claude mcp add mcp-server-hyperlight -- uvx mcp-server-hyperlightCursor에 Hyperlight MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server-hyperlight": {
"command": "uvx",
"args": [
"mcp-server-hyperlight"
]
}
}
}VS Code에 Hyperlight MCP 설치
.vscode/mcp.json
{
"servers": {
"mcp-server-hyperlight": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-hyperlight"
]
}
}
}VS Code CLI에 Hyperlight MCP 설치
$ code --add-mcp '{"name":"mcp-server-hyperlight","type":"stdio","command":"uvx","args":["mcp-server-hyperlight"]}'Claude Desktop에 Hyperlight MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"mcp-server-hyperlight": {
"command": "uvx",
"args": [
"mcp-server-hyperlight"
]
}
}
}Codex에 Hyperlight MCP 설치
$ codex mcp add mcp-server-hyperlight -- uvx mcp-server-hyperlightCodex config.toml에 Hyperlight MCP 설치
~/.codex/config.toml
[mcp_servers.mcp-server-hyperlight] command = "uvx" args = ["mcp-server-hyperlight"]
Gemini CLI에 Hyperlight MCP 설치
$ gemini mcp add -s user mcp-server-hyperlight uvx -- mcp-server-hyperlightGemini settings.json에 Hyperlight MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"mcp-server-hyperlight": {
"command": "uvx",
"args": [
"mcp-server-hyperlight"
]
}
}
}Hyperlight MCP 도구 2
README에서 감지됨run_pythonreset_sandbox
| run_python | — | |
| reset_sandbox | — |
구성
RUN_ALL
| 이름 | 설명 | 유형 |
|---|---|---|
| RUN_ALL | — |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨통과
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기mcp-server-hyperlight
An MCP server that runs Python in a local Hyperlight micro-VM, for any MCP client: Claude Code, Claude Desktop, VS Code, Cursor and others.
The server boots a Unikraft unikernel in its own hardware-isolated micro-VM (KVM or MSHV on Linux, WHP on Windows, HVF on Apple silicon Macs) through the hluk CLI. It needs no account, no daemon and no API key, and the code and its data stay on your machine. The guest has no network access unless you allow hosts with --net-allow, and none of your files unless you mount them.
| Pyodide servers | cloud sandboxes | mcp-server-hyperlight | |
|---|---|---|---|
| Isolation | Wasm, in a Deno process | cloud VM or container | micro-VM, its own kernel |
| Python | Pyodide's packages only | full | full CPython 3.12, native wheels |
| Runs on your machine | yes | no | yes |
| Needs | Deno | account, API key | hluk and a hypervisor |
| Ready in | seconds | seconds | ~40 ms (Linux, KVM) |
Install
Install hluk v0.18.0 or later. On Linux or macOS:
curl -fsSL https://raw.githubusercontent.com/hyperlight-dev/hyperlight-unikraft/main/install.sh | sh
On Windows, in PowerShell:
irm https://raw.githubusercontent.com/hyperlight-dev/hyperlight-unikraft/main/install.ps1 | iex
Then add the server to your client. It runs with uv's uvx, or with pip install mcp-server-hyperlight and the mcp-server-hyperlight command.
Claude Code:
claude mcp add hyperlight -- uvx mcp-server-hyperlight
Claude Desktop, Cursor and other clients that take a JSON config:
{
"mcpServers": {
"hyperlight": {
"command": "uvx",
"args": ["mcp-server-hyperlight"]
}
}
}
VS Code (.vscode/mcp.json):
{
"servers": {
"hyperlight": {
"command": "uvx",
"args": ["mcp-server-hyperlight"]
}
}
}
Codex (~/.codex/config.toml), with time for uvx to install the server on its first start, and for the first call to wait for the guest image (--startup-timeout, 300 s) and then run (--timeout, 30 s), one call at a time:
[mcp_servers.hyperlight]
command = "uvx"
args = ["mcp-server-hyperlight"]
startup_timeout_sec = 60
tool_timeout_sec = 360
The OpenAI Agents SDK runs it with MCPServerStdio(params={"command": "uvx", "args": ["mcp-server-hyperlight"]}, client_session_timeout_seconds=360), for the same first call; its default of 5 seconds is shorter than a call may run.
Claude Desktop also takes it as a Desktop Extension, which needs no config: download mcp-server-hyperlight-0.1.1.mcpb from its release and open it. It installs the server from PyPI with uv. Its settings set --timeout and --net-allow.
The server starts its guest as soon as the client starts it. The first time, hluk pulls the agent image of its release (about 400 MB, a 130 MB download) and saves a warm snapshot of it booted (about 800 MB), which takes some seconds to a few minutes; after that the guest starts from the snapshot in milliseconds. The image ships CPython 3.12 with numpy, pandas, scipy, scikit-learn, matplotlib, pillow and requests. To have both ready before a client first starts the server, run hluk run --runtime agent --exec 'print("ready")'.
Tools
| Tool | |
|---|---|
run_python |
Runs Python code. Variables, imports and functions stay for the next call, as in a notebook. Returns what the code printed, subprocesses included, and the value of a trailing expression after Out:. An error returns its traceback, as a tool error. |
reset_sandbox |
Replaces the guest with a fresh one from the warm snapshot, in about 60 ms on Linux with KVM, after code still running ends or times out. Packages passed with --package are installed again, with --net-allow. |
A call that runs longer than --timeout (30 s by default) is stopped, and the guest replaced with a fresh one; so is a call that crashes the guest. The model is told its variables are gone. A call the client cancels before its turn does not run; one already running goes on until it ends or times out, as the server has no way yet to stop code short of its time limit.
Options
Pass them after the command, e.g. uvx mcp-server-hyperlight --net-allow pypi.org --net-allow files.pythonhosted.org --package sympy.
| Option | Default | |
|---|---|---|
--net-allow HOST |
none | A host or IP the guest may connect to; repeat for more, or separate them with commas. With none, every connection is refused. |
--package NAME |
none | A package to install in the guest at start and after each reset, if the image lacks it. Installing needs --net-allow for the package index. |
--timeout SECONDS |
30 | Longest a call may run, and so the longest a reset or the next call waits for one. |
--runtime NAME |
agent |
Published image to run, by name or full reference. |
--initrd PATH |
A rootfs CPIO of your own to run instead (it must have CPython 3). | |
--scratch-mb MIB |
the image's | Guest memory in MiB. |
--hluk-path PATH |
hluk on PATH |
Else where it is installed: $HLUK_INSTALL_DIR, the install scripts' ~/.local/bin (%LOCALAPPDATA%\hluk\bin on Windows), or Cargo's $CARGO_HOME/bin (~/.cargo/bin), for a client that starts the server with another PATH. |
--hluk-arg ARG |
More arguments for hluk run, one per option: --hluk-arg=--mount --hluk-arg=/data:/data:ro mounts /data read-only. |
|
--startup-timeout SECONDS |
300 | Longest to wait for the guest; the first start pulls the image. |
The tool descriptions tell the model what the guest has: its packages, which hosts it may reach, and whether it sees any of your files. With --hluk-arg, which can mount directories or open the network, they no longer say the guest has neither.
How it works
The server is a thin layer over smolagents-hyperlight's executor, which starts hluk run as a child process and talks to a small Python script in the guest over its console. The two packages share one guest protocol, its tests and its bounds on what the guest sends back.
- One guest serves the server's client, and tool calls take turns on it, so state stays consistent. A guest that fails to start is reported on the standard error, and to the model on its first call, which tries again.
- Between calls, the whole micro-VM is paused: a thread or subprocess a call leaves running only goes on while a call runs.
- The guest is not trusted: replies are bounded (64 MiB, 2 MiB of printed output) and checked before the server uses them. A tool result keeps at most 100,000 characters, its beginning and its end, as MCP clients take far less than an agent's executor does.
- The server speaks MCP on its standard input and output, and logs to its standard error. What
hlukitself writes is kept apart, and comes with the error when a guest fails to start. It stops its guest as it exits, the input closed or on aSIGTERMorSIGINT.
Known limits
- Python only, and text only: an image the code makes comes back as its
repr. Save it to a mounted directory to keep it. - Packages installed by the code itself, with pip, are gone after a reset; those passed with
--packageare installed again. - One vCPU, and threads in the guest take turns rather than run at once.
- A guest still starting when the server exits, pulling its image or installing
--packagepackages, is not stopped with it, and runs until that start ends: the executor gives the server no handle on it before then. - With
hlukv0.19.1 or earlier, each Python subprocess,pip installincluded, leaves about 15 MiB of guest memory in use until the guest is restarted (a guest kernel bug, fixed in v0.20.0). - CI tests the server on Linux (KVM) and Windows (WHP).
hluksupports Apple silicon Macs too, but the server is not tested there yet.
Development
pip install -e ../smolagents -e '.[test]'
pytest # unit tests, and the server end to end with a stand-in for hluk
RUN_ALL=1 pytest # also the tests in a real micro-VM, with the hluk on PATH
As for smolagents-hyperlight, HLUK_PATH, HLUK_INITRD and HLUK_SCRATCH_MB test a local build of hluk and its agent rootfs instead of the hluk on PATH and its published image.
Hyperlight MCP 질문
Hyperlight MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add mcp-server-hyperlight -- uvx mcp-server-hyperlight를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Hyperlight MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Hyperlight MCP는 어떤 도구를 제공하나요?
2개 도구를 제공합니다. 예: run_python, reset_sandbox.
Python 환경이 호출 간에 상태를 유지하나요?
네, 노트북 환경과 유사하게 변수, import, 함수가 다음 호출 시에도 유지됩니다.
이 server를 사용하려면 계정이나 API key가 필요한가요?
아니요, 계정이나 daemon, API key가 필요하지 않으며 모든 데이터는 로컬 머신에 머무릅니다.
Python guest가 인터넷에 접속할 수 있나요?
기본적으로 guest는 네트워크 접속 권한이 없으며, --net-allow 옵션을 사용하여 특정 host를 명시적으로 허용해야만 접속할 수 있습니다.
micro-VM 시작 속도는 얼마나 빠른가요?
초기 설정 이후, Linux에서 KVM을 사용하는 경우 warm snapshot으로부터 약 40 ms 내에 guest를 시작할 수 있습니다.