Install without cloning

The shortest path is: export two values, run one installer, open your shell.

MandateOS is already packaged for Codex, Cursor, Claude Code, and OpenClaw. You do not need to clone this repository to try it.

Before you start

You only need the basics that connect the local host to the runtime and a repo path where you want the guardrails installed.

  • A `MANDATE_OS_BASE_URL`
  • A `MANDATE_OS_AGENT_TOKEN`
  • A repo path for the workspace you want to guard
  • One host: Codex, Cursor, Claude Code, or OpenClaw
  • Optional: `MANDATE_OS_MCP_DEFAULT_MANDATE_ID`
Fastest first try

Choose one host, export the base URL and agent token, run the matching `npx` installer, then run the host status command before doing sensitive work.

  • Export the connection values once in the shell you plan to use.
  • Run the matching installer against your repo path.
  • Open the guarded workspace and confirm the host sees MandateOS.
What you see after install

MandateOS becomes concrete immediately because the host now has local config, a status command, and a runtime path for risky actions.

  • Local MCP and hook files written for that host
  • A status command to confirm the setup
  • A host-scoped runtime path for approvals and receipts
Open-source trust layer vs managed control plane

The packages and installers are open source. Teams usually connect them to the managed control plane when they want shared approvals, workspace administration, and retained audit history.

  • Open source: SDK, MCP server, installers, starter bundles, and docs
  • Managed: workspaces, approvals, retained evidence, and operator review
A

Export your MandateOS connection values

Set your base URL and agent token in the shell where you plan to run an installer. Add a default mandate id only when you want one project mandate preselected.

B

Run the host installer

Use the package entrypoint or download the shell script for Codex, Cursor, Claude Code, or OpenClaw. Each installer writes the local files that host needs.

C

Open the shell and verify the host

Start the guarded workspace, approve the MandateOS MCP if the host asks, and confirm the status command before you move into sensitive work.

Shell environment

Copy the runtime URL and agent token from your MandateOS control plane. `MANDATE_OS_MCP_DEFAULT_MANDATE_ID` is optional and only needed when you want the host to start with a project mandate already selected.

# Replace with the runtime URL and agent token from your MandateOS control plane.
export MANDATE_OS_BASE_URL="https://your-mandateos-runtime-url"
export MANDATE_OS_AGENT_TOKEN="key_id.secret"
# Optional: preselect one mandate for this repo.
export MANDATE_OS_MCP_DEFAULT_MANDATE_ID="mdt_123"
Packages

These open-source packages are the install and trust layer. Teams pair them with the managed control plane when they want hosted approvals and operator workflows.

@mandate-os/sdk

Use the SDK when you want to call MandateOS from your own services, hooks, or custom host integrations.

npm install @mandate-os/sdk@latest
  • Typed client for mandates, receipts, and execution grants
  • Fits internal tools, host gateways, and policy-aware services

@mandate-os/mcp

Registers the MandateOS MCP server and ships the installer CLIs for Codex, Cursor, and Claude Code.

npm install @mandate-os/mcp@latest
  • Binaries: mandate-os-mcp, mandate-os-codex-install, mandate-os-cursor-install, mandate-os-claude-install
  • Writes MCP entries plus host hooks for guarded execution

@mandate-os/openclaw

Installs the OpenClaw bridge, bundle, and guarded agent setup without copying repo files by hand.

npm install @mandate-os/openclaw@latest
  • Binaries: mandate-os-openclaw-install, mandate-os-openclaw-bridge
  • Adds the MandateOS plugin bundle under the local OpenClaw state directory
Host installers

Run the package CLI directly with `npx`, or download the matching shell script and pass your workspace path as the first argument.

Codex

@mandate-os/mcp

Writes project-scoped `.codex/config.toml` and `.codex/hooks.json` so Codex loads the MandateOS MCP server and Bash guardrails inside that repository.

Open Installer Details
npx --yes --package @mandate-os/mcp@latest mandate-os-codex-install install \
  --workspace "/absolute/path/to/your/repo"
  • Reads `MANDATE_OS_BASE_URL`, `MANDATE_OS_AGENT_TOKEN`, and optional `MANDATE_OS_MCP_DEFAULT_MANDATE_ID` from your shell, then forwards the runtime values through Codex `env_vars`.
  • Status check: `npx --yes --package @mandate-os/mcp@latest mandate-os-codex-install status --workspace "/absolute/path/to/your/repo"`

Cursor

@mandate-os/mcp

Configures Cursor user and workspace MCP entries, then writes `beforeShellExecution` and `beforeMCPExecution` hooks for the target repository.

Open Installer Details
npx --yes --package @mandate-os/mcp@latest mandate-os-cursor-install install \
  --workspace "/absolute/path/to/your/repo"
  • Reads `MANDATE_OS_BASE_URL`, `MANDATE_OS_AGENT_TOKEN`, and optional `MANDATE_OS_MCP_DEFAULT_MANDATE_ID` from your shell.
  • Status check: `npx --yes --package @mandate-os/mcp@latest mandate-os-cursor-install status --workspace "/absolute/path/to/your/repo"`

Claude Code

@mandate-os/mcp

Writes the local-scoped `mandateos` MCP entry into `~/.claude.json` and creates workspace hooks in `.claude/settings.local.json`.

Open Installer Details
npx --yes --package @mandate-os/mcp@latest mandate-os-claude-install install \
  --workspace "/absolute/path/to/your/repo"
  • Reads `MANDATE_OS_BASE_URL`, `MANDATE_OS_AGENT_TOKEN`, and optional `MANDATE_OS_MCP_DEFAULT_MANDATE_ID` from your shell.
  • Status check: `npx --yes --package @mandate-os/mcp@latest mandate-os-claude-install status --workspace "/absolute/path/to/your/repo"`

OpenClaw

@mandate-os/openclaw

Installs the OpenClaw extension bundle, configures the local MCP server, and creates a guarded agent profile for the selected workspace.

Open Installer Details
MANDATE_OS_OPENCLAW_WORKSPACE_PATH="/absolute/path/to/your/repo" \
npx --yes --package @mandate-os/openclaw@latest mandate-os-openclaw-install install
  • Reads `MANDATE_OS_BASE_URL` and optional `MANDATE_OS_MCP_DEFAULT_MANDATE_ID` during installation.
  • Status check: `MANDATE_OS_OPENCLAW_WORKSPACE_PATH="/absolute/path/to/your/repo" npx --yes --package @mandate-os/openclaw@latest mandate-os-openclaw-install status`