nullspace CLI as MCP tools so a local coding agent can create
machines, run commands, upload files, build templates, inspect volumes, and
stream lifecycle data without shelling out manually.
Use stdio for local coding agents. The agent starts nullspace mcp serve when
it needs tools, and the server process receives NULLSPACE_API_KEY and
NULLSPACE_API_URL from the MCP client configuration.
Install And Verify
Install the SDK with CLI and MCP extras:uv pip install "nullspace-sdk[cli,mcp]==1.0.0" is equivalent after the environment is active.
Install the local agent docs pack in the project where Claude Code or Codex
will run:
nullspace mcp serve as a separate background process for stdio
clients. Stdio clients launch it themselves and communicate over stdin/stdout.
Each leaf CLI command becomes a dotted MCP tool name. Hyphens normalize to
underscores:
Tool schemas are generated from
nullspace schema, and tool calls use the same
Click command path as the CLI.
Codex
nullspace docs install --agent codex writes local docs to
.nullspace/agent-docs/, installs the Nullspace skill under
.agents/skills/nullspace, and writes a Codex MCP snippet at
.nullspace/agent-docs/codex-config.toml.
Codex reads MCP servers from ~/.codex/config.toml. Add this block:
nullspace.machine.list. If it does not, restart Codex after
editing ~/.codex/config.toml and confirm the nullspace executable is on the
same PATH visible to Codex.
Codex can also add a stdio server with:
~/.codex/config.toml and add
env_vars, startup_timeout_sec, and tool_timeout_sec if they are missing.
Claude Code
nullspace docs install --agent claude-code writes local docs to
.nullspace/agent-docs/, adds managed Nullspace imports to CLAUDE.md, and
creates or updates .mcp.json. It also installs the Nullspace skill under
.claude/skills/nullspace for reusable Nullspace workflows.
For a project-scoped Claude Code setup, create .mcp.json in the project root:
/mcp to inspect connected servers. Claude Code will
ask for approval before using project-scoped servers from .mcp.json.
Ask for a read-only first call:
NULLSPACE_API_KEY and
NULLSPACE_API_URL are present in the shell that launched claude.
Cursor
Cursor usesmcp.json with an mcpServers object. Use a project-scoped file at
.cursor/mcp.json, or a global file at ~/.cursor/mcp.json:
nullspace appears in the available MCP tools, then
ask for a read-only action such as listing machines.
VS Code Or GitHub Copilot Agent Mode
VS Code uses a different shape from Claude Code and Cursor: the top-level key isservers, not mcpServers. Put this in .vscode/mcp.json for a workspace
setup:
MCP: List Servers to confirm nullspace
starts. If you prefer env files, VS Code also supports envFile; keep any file
containing NULLSPACE_API_KEY out of git.
Hosted Transports
Prefer stdio when the agent can spawn local commands. Use HTTP or SSE only when the MCP client cannot spawnnullspace directly.
Streamable HTTP:
0.0.0.0 when you have a separate access-control layer in front of
the server. The Nullspace MCP server uses your Nullspace API key and should be
treated as a privileged local tool.
Troubleshooting
Prefer MCP when a local coding agent should perform Nullspace CLI actions.
Prefer the Python SDK when you are writing reusable application code, and prefer
direct CLI commands when you are doing a one-off terminal workflow.