microsandbox-mcp

v0.8.3
microsandbox-mcp Checked 9 hours ago Published 5 days ago

MCP server for microsandbox — manage microVM sandboxes from any AI agent

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

runtime_check Check Runtime Installation

Check whether the microsandbox runtime dependencies are installed.

runtime_install Install Runtime Dependencies

Install msb and libkrunfw using the microsandbox SDK installer.

sandbox_run Run Command in Ephemeral Sandbox

Create an ephemeral sandbox, run a shell command, return output, and destroy it.

ParameterTypeDescription
command *stringShell command to execute
cpusinteger
entrypointarray
envobject
hostnamestring
idleTimeoutinteger
imagestringConvenience OCI image or local rootfs path
lifecycleobject
maxDurationinteger
memoryMibinteger
mountsarray
namestring
networkobject
patchesarray
processobject
resourcesobject
rootfs
secretsarray
volumesarray
workdirstring

sandbox_create Create Sandbox

Create and boot a persistent named sandbox.

ParameterTypeDescription
name *stringUnique sandbox name
cpusinteger
entrypointarray
envobject
hostnamestring
idleTimeoutinteger
imagestringConvenience OCI image or local rootfs path
lifecycleobject
maxDurationinteger
memoryMibinteger
mountsarray
networkobject
patchesarray
processobject
resourcesobject
rootfs
secretsarray
volumesarray
workdirstring

sandbox_restore Restore Sandbox

Restore a persistent sandbox from a snapshot or archive. Captured execution resumes by default; host resources are not inherited. Use diskOnly for a fresh boot of the captured disks.

ParameterTypeDescription
name *stringUnique destination sandbox name
snapshot *stringInstalled snapshot reference or allowlisted archive/directory path
diskOnlybooleanBoot only the captured disks, without restoring execution
externalMountPolicystringValidate explicitly supplied mappings; does not inherit host resources
forkedbooleanRestore captured RAM using private copy-on-write mappings
logLevelstring
portsarray
snapshotBasestringBase snapshot for a dependent archive
userstring
volumesarray
vsockarray

sandbox_start Start Sandboxes

Start stopped sandboxes by name or selector.

ParameterTypeDescription
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter

sandbox_list List Sandboxes

List sandboxes with status and summary metadata.

ParameterTypeDescription
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter

sandbox_status Sandbox Status

Show status for one sandbox or a filtered sandbox set.

ParameterTypeDescription
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter

sandbox_inspect Inspect Sandbox

Get detailed information about a specific sandbox including full configuration.

ParameterTypeDescription
name *stringSandbox name

sandbox_stop Stop Sandboxes

Stop running sandboxes gracefully or forcefully.

ParameterTypeDescription
forceboolean
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter
timeoutMsinteger

sandbox_drain Drain Sandboxes

Request graceful drain for running sandboxes.

ParameterTypeDescription
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter

sandbox_wait Wait For Sandboxes

Wait until selected sandboxes reach a terminal state.

ParameterTypeDescription
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter

sandbox_remove Remove Sandboxes

Remove stopped sandboxes. Use force to stop running sandboxes first.

ParameterTypeDescription
forceboolean
labelsobjectAND-matched labels
namestringSandbox name
namesarraySandbox names
statusstringStatus filter

sandbox_exec Execute Command in Sandbox

Execute a command inside a running sandbox and return stdout/stderr/exit code.

ParameterTypeDescription
command *stringCommand to execute
name *stringSandbox name
argsarrayCommand arguments
cwdstringWorking directory override
envobjectAdditional environment variables
keepRunningbooleanKeep a sandbox running when startIfStopped starts it
maxBytesintegerMaximum stdout/stderr bytes to return
rlimitsarrayProcess rlimits
startIfStoppedbooleanStart a stopped sandbox for this command
stdinstringUTF-8 stdin to write before waiting
stdinBase64stringBase64 stdin bytes to write before waiting
timeoutnumberTimeout in seconds
timeoutMsintegerTimeout in milliseconds
treatNonZeroAsErrorbooleanReturn a tool error when exit code is non-zero
ttybooleanAllocate a TTY
userstringGuest user override
workdirstringWorking directory override

sandbox_shell Run Shell Command in Sandbox

Execute a shell command or script string inside a running sandbox.

ParameterTypeDescription
command *stringCommand to execute
name *stringSandbox name
cwdstringWorking directory override
envobjectAdditional environment variables
keepRunningbooleanKeep a sandbox running when startIfStopped starts it
maxBytesintegerMaximum stdout/stderr bytes to return
rlimitsarrayProcess rlimits
shellstringShell binary to execute. Defaults to sh.
startIfStoppedbooleanStart a stopped sandbox for this command
stdinstringUTF-8 stdin to write before waiting
stdinBase64stringBase64 stdin bytes to write before waiting
timeoutnumberTimeout in seconds
timeoutMsintegerTimeout in milliseconds
treatNonZeroAsErrorbooleanReturn a tool error when exit code is non-zero
ttybooleanAllocate a TTY
userstringGuest user override
workdirstringWorking directory override

sandbox_exec_start Start Exec Session

Start a long-running command and return an exec session id for polling and stdin.

ParameterTypeDescription
command *stringCommand to execute
name *stringSandbox name
argsarrayCommand arguments
closeStdinbooleanClose stdin after writing the initial stdin payload
cwdstringWorking directory override
envobjectAdditional environment variables
keepRunningbooleanKeep a sandbox running when startIfStopped starts it
maxBytesintegerMaximum stdout/stderr bytes to return
rlimitsarrayProcess rlimits
shellbooleanInterpret command as a shell script with sh -c
startIfStoppedbooleanStart a stopped sandbox for this command
stdinstringUTF-8 stdin to write before waiting
stdinBase64stringBase64 stdin bytes to write before waiting
timeoutnumberTimeout in seconds
timeoutMsintegerTimeout in milliseconds
treatNonZeroAsErrorbooleanReturn a tool error when exit code is non-zero
ttybooleanAllocate a TTY
userstringGuest user override
workdirstringWorking directory override

sandbox_exec_poll Poll Exec Session

Read output events and status from a long-running exec session.

ParameterTypeDescription
execSessionId *string
cursorinteger
limitinteger
maxBytesinteger

sandbox_exec_write_stdin Write Exec Stdin

Write UTF-8 or base64 data to an exec session's stdin.

ParameterTypeDescription
execSessionId *string
closeboolean
datastring
dataBase64string

sandbox_exec_signal Signal Exec Session

Send a POSIX signal to an exec session process.

ParameterTypeDescription
execSessionId *string
signal *

sandbox_exec_close Close Exec Session

Close and forget an in-memory exec session.

ParameterTypeDescription
execSessionId *string

sandbox_logs_read Read Sandbox Logs

Read captured sandbox exec logs with source, time, grep, and session filters.

ParameterTypeDescription
name *stringSandbox name
grepstringSubstring filter applied to decoded text
maxBytesintegerMaximum bytes to return per log entry
sessionIdsarrayExec session ids to include
sincestringInclusive ISO timestamp lower bound
sourcesarrayLog sources to include
tailintegerReturn only the last N matching entries
untilstringExclusive ISO timestamp upper bound

sandbox_logs_stream Poll Sandbox Log Stream

Poll captured sandbox logs with a cursor and bounded follow timeout.

ParameterTypeDescription
name *stringSandbox name
followbooleanWait for new entries after current EOF
followTimeoutMsintegerMaximum time to wait for followed entries
fromCursorstringOpaque cursor from a previous log entry
grepstringSubstring filter applied to decoded text
limitintegerMaximum entries to return
maxBytesintegerMaximum bytes to return per log entry
sessionIdsarrayExec session ids to include
sincestringInclusive ISO timestamp lower bound
sourcesarrayLog sources to include
untilstringExclusive ISO timestamp upper bound

sandbox_fs_read Read File from Sandbox

Read a file from the sandbox filesystem as UTF-8 text or base64 bytes.

ParameterTypeDescription
name *stringSandbox name
path *stringAbsolute path inside the sandbox
encodingstringOutput encoding. Defaults to utf8.
maxBytesintegerMaximum bytes to return

sandbox_fs_write Write File to Sandbox

Write UTF-8 text or base64 bytes to a file inside the sandbox.

ParameterTypeDescription
content *stringFile content to write
name *stringSandbox name
path *stringAbsolute path inside the sandbox
encodingstringInput encoding. Defaults to utf8.

sandbox_fs_list List Directory in Sandbox

List directory contents inside the sandbox.

ParameterTypeDescription
name *stringSandbox name
path *stringDirectory path to list

sandbox_fs_mkdir Create Directory in Sandbox

Create a directory inside the sandbox.

ParameterTypeDescription
name *stringSandbox name
path *stringDirectory path to create

sandbox_fs_remove Remove File or Directory in Sandbox

Remove a file or directory inside the sandbox.

ParameterTypeDescription
name *stringSandbox name
path *stringPath to remove
kindstringRemoval kind. Defaults to auto.

sandbox_fs_copy Copy Sandbox Path

Copy a file within one sandbox or between two running sandboxes.

ParameterTypeDescription
from *stringSource path in the source sandbox
name *stringSource sandbox name
to *stringDestination path
toSandboxstringDestination sandbox. Defaults to the source sandbox.

sandbox_fs_rename Rename Sandbox Path

Rename a file or directory inside one sandbox.

ParameterTypeDescription
from *stringOld path
name *stringSandbox name
to *stringNew path

sandbox_fs_stat Get File Metadata in Sandbox

Get file or directory metadata inside the sandbox.

ParameterTypeDescription
name *stringSandbox name
path *stringPath to stat

sandbox_fs_exists Check Sandbox Path Exists

Check whether a path exists inside the sandbox.

ParameterTypeDescription
name *stringSandbox name
path *stringPath to check

sandbox_fs_copy_from_host Copy Host Path Into Sandbox

Copy an allowlisted host path into a sandbox.

ParameterTypeDescription
guestPath *stringGuest destination path
hostPath *stringHost path to copy from
name *stringSandbox name

sandbox_fs_copy_to_host Copy Sandbox Path To Host

Copy a sandbox file to an allowlisted host path.

ParameterTypeDescription
guestPath *stringGuest source path
hostPath *stringHost destination path
name *stringSandbox name

volume_create Create Volume

Create a directory or disk-backed named persistent volume.

ParameterTypeDescription
name *stringVolume name
kindstringVolume kind. Defaults to directory.
labelsobjectVolume labels
quotaMibintegerQuota in MiB
sizeMibintegerDisk capacity in MiB for disk-backed volumes

volume_list List Volumes

List all named volumes.

volume_inspect Inspect Volume

Inspect one named volume.

ParameterTypeDescription
name *stringVolume name

volume_remove Remove Volumes

Remove one or more named volumes.

ParameterTypeDescription
namestringVolume name
namesarrayVolume names

volume_fs_read Read Volume File

Read a file from a named volume as UTF-8 text or base64 bytes.

ParameterTypeDescription
name *stringVolume name
path *stringPath inside the volume
encodingstringOutput encoding. Defaults to utf8.
maxBytesintegerMaximum bytes to return

volume_fs_write Write Volume File

Write UTF-8 text or base64 bytes into a named volume.

ParameterTypeDescription
content *stringContent to write
name *stringVolume name
path *stringPath inside the volume
encodingstringInput encoding. Defaults to utf8.

volume_fs_list List Volume Directory

List entries inside a named volume.

ParameterTypeDescription
name *stringVolume name
path *stringDirectory path inside the volume

volume_fs_mkdir Create Volume Directory

Create a directory inside a named volume.

ParameterTypeDescription
name *stringVolume name
path *stringDirectory path inside the volume

volume_fs_remove Remove Volume Path

Remove a file or directory from a named volume.

ParameterTypeDescription
name *stringVolume name
path *stringPath inside the volume
kindstringRemoval kind. Defaults to auto.

volume_fs_copy Copy Volume Path

Copy a file inside a named volume.

ParameterTypeDescription
from *stringSource path
name *stringVolume name
to *stringDestination path

volume_fs_rename Rename Volume Path

Rename a file or directory inside a named volume.

ParameterTypeDescription
from *stringOld path
name *stringVolume name
to *stringNew path

volume_fs_stat Stat Volume Path

Get metadata for a path inside a named volume.

ParameterTypeDescription
name *stringVolume name
path *stringPath inside the volume

volume_fs_exists Check Volume Path Exists

Check whether a path exists inside a named volume.

ParameterTypeDescription
name *stringVolume name
path *stringPath inside the volume

sandbox_metrics Get Sandbox Metrics

Get live resource usage metrics for a running sandbox.

ParameterTypeDescription
name *stringSandbox name

sandbox_metrics_all Get All Sandbox Metrics

Get point-in-time metrics for all running sandboxes.

sandbox_metrics_stream Sample Sandbox Metrics Stream

Collect a bounded number of metrics samples from a running sandbox.

ParameterTypeDescription
name *stringSandbox name
intervalMsintegerSampling interval in milliseconds
samplesintegerNumber of samples to collect

image_list List Cached Images

List cached microsandbox images.

image_inspect Inspect Cached Image

Inspect cached image config and layers.

ParameterTypeDescription
reference *stringImage reference

image_remove Remove Cached Images

Remove one or more cached images.

ParameterTypeDescription
confirmbooleanRequired when force is true
forcebooleanRemove even when a sandbox references the image
referencestringImage reference
referencesarrayImage references

image_prune Prune Cached Images

Remove cached image artifacts unused by sandboxes.

ParameterTypeDescription
confirm *booleanMust be true to prune image cache data

snapshot_create Create Snapshot

Create a named snapshot from a stopped sandbox.

ParameterTypeDescription
fromSandbox *stringStopped source sandbox name
name *stringSnapshot name; always the artifact directory's basename
confirmbooleanRequired when force is true
destDirstringAllowlisted parent directory to create the artifact in, instead of the default snapshots directory
forcebooleanOverwrite an existing destination
labelsobjectSnapshot labels
recordIntegritybooleanRecord upper-layer integrity metadata

snapshot_list List Snapshots

List indexed snapshots.

snapshot_inspect Inspect Snapshot

Inspect snapshot metadata by name, digest, or path.

ParameterTypeDescription
pathOrName *stringSnapshot name, digest, or host path
verifybooleanAlso verify recorded integrity

snapshot_verify Verify Snapshot

Verify recorded snapshot content integrity.

ParameterTypeDescription
pathOrName *stringSnapshot name, digest, or host path

snapshot_remove Remove Snapshots

Remove one or more snapshots by name, digest, or path.

ParameterTypeDescription
confirmbooleanRequired when force is true
forcebooleanRemove snapshots that have indexed children
pathOrNamestringSnapshot name, digest, or host path
pathOrNamesarraySnapshot names, digests, or host paths

snapshot_reindex Reindex Snapshots

Rebuild the local snapshot index from the default directory or an allowlisted host directory.

ParameterTypeDescription
dirstringSnapshot directory to scan

snapshot_save Save Snapshot

Save a snapshot to a tar.zst or plain tar archive.

ParameterTypeDescription
out *stringAllowlisted host archive output path
pathOrName *stringSnapshot name, digest, or host path
plainTarboolean
withImageboolean
withParentsboolean

snapshot_load Load Snapshot

Load a snapshot archive into the default or specified snapshots directory.

ParameterTypeDescription
archive *stringAllowlisted host archive path
deststringAllowlisted destination directory

sandbox_ssh_exec Execute Command Over Sandbox SSH

Execute a command through the sandbox SSH subsystem.

ParameterTypeDescription
command *stringCommand to execute
name *stringSandbox name
maxBytesintegerMaximum stdout/stderr bytes to return
termstringTerminal type
ttybooleanAllocate a TTY
userstringSSH user

sandbox_sftp_read Read File Over Sandbox SFTP

Read a file through the sandbox SSH/SFTP subsystem.

ParameterTypeDescription
name *stringSandbox name
path *stringPath to read
encodingstringOutput encoding. Defaults to utf8.
maxBytesintegerMaximum bytes to return
termstringTerminal type
userstringSSH user

sandbox_sftp_write Write File Over Sandbox SFTP

Write a file through the sandbox SSH/SFTP subsystem.

ParameterTypeDescription
content *stringContent to write
name *stringSandbox name
path *stringPath to write
encodingstringInput encoding. Defaults to utf8.
termstringTerminal type
userstringSSH user

sandbox_sftp_mkdir Create Directory Over Sandbox SFTP

Create a directory through the sandbox SSH/SFTP subsystem.

ParameterTypeDescription
name *stringSandbox name
path *stringDirectory path
termstringTerminal type
userstringSSH user

sandbox_sftp_remove Remove Path Over Sandbox SFTP

Remove a file or directory through the sandbox SSH/SFTP subsystem.

ParameterTypeDescription
kind *stringWhether to remove a file or directory
name *stringSandbox name
path *stringPath to remove
termstringTerminal type
userstringSSH user

sandbox_sftp_rename Rename Path Over Sandbox SFTP

Rename a path through the sandbox SSH/SFTP subsystem.

ParameterTypeDescription
from *stringOld path
name *stringSandbox name
to *stringNew path
termstringTerminal type
userstringSSH user

sandbox_sftp_realpath Resolve SFTP Real Path

Resolve a path through the sandbox SSH/SFTP subsystem.

ParameterTypeDescription
name *stringSandbox name
path *stringPath to resolve
termstringTerminal type
userstringSSH user