DAIMONMCP sandbox, kernel-isolated
by Linux nsjail
Python SDK

Client

DaimonClient connects directly to a sandbox MCP endpoint.

Low-level client that connects directly to a sandbox MCP endpoint. Use this when you already have a sandbox URL and token. For lifecycle management, prefer DaimonManagerClient.

DaimonClient

DaimonClient(base_url, *, access_token=None, timeout_s=30.0)

Construct a client targeting a sandbox MCP endpoint.

ParameterTypeDefaultDescription
base_urlstrSandbox MCP endpoint URL (e.g. http://127.0.0.1:8080/mcp).
access_tokenstr | NoneNoneOptional access token sent as X-Access-Token header.
timeout_sfloat30.0HTTP request timeout in seconds.

Connection lifecycle

Use async context manager (async with DaimonClient(...) as client:) or call await client.connect() / await client.close() manually.

RawAPI

Escape hatch for calling arbitrary MCP tools when the typed surface does not cover your use case.

async raw.call_tool(name, arguments=None, *, raise_on_error=True) -> dict[str, Any]
ParameterTypeDefaultDescription
namestrMCP tool name (e.g. 'GetRuntimeContext').
argumentsdict | NoneNoneTool arguments as a dictionary.
raise_on_errorboolTrueRaise DaimonToolError on tool failure if True.
payload = await client.raw.call_tool(
    "GetRuntimeContext",
    {},
)
print(payload["baseWorkdir"])

RuntimeAPI

Access sandbox runtime context including base workdir, filesystem policy, network policy, and capabilities.

async runtime.get_context() -> RuntimeContextResult
runtime = await client.runtime.get_context()
print(runtime.base_workdir)
print(runtime.capabilities)

On this page