Docs / Developer tools

Installation

How to install the riskmanaged-mcp package and authenticate the CLI, either through the browser flow or a manual token.

Install this once per machine before wiring up any MCP client. It covers the package install, both authentication paths (browser and headless), and how to verify or revoke your token.

Prerequisites#

Install via pip#

pip install riskmanaged-mcp

Install via curl (auto-installs the binary)#

curl -sSL https://riskmanaged.io/install.sh | bash

The riskmanaged auth login command runs a one-click browser flow — you click Authorize and the CLI receives a token directly. Nothing to copy-paste.

The CLI opens the authorize page in your browser; you approve; the platform mints a token; the CLI receives and saves it locally CLI auth login opens Browser /mcp-authorize approve Platform mints a token token returns to the CLI, saved to ~/.riskmanaged/config.json
You never see or paste the token. The CLI opens the authorize page, you approve, and the token flows straight back into local config.
riskmanaged auth login
  1. Your browser opens to riskmanaged.io/mcp-authorize
  2. Confirm you're logged in (or sign in)
  3. Click Authorize RiskManaged CLI
  4. You're redirected back; the CLI confirms the token is saved

The token is stored in ~/.riskmanaged/config.json (chmod 600) with a 90-day TTL. Revoke it any time from Profile → API Tokens.

Authenticate (manual token — for headless / CI)#

For Docker, CI runners, or any environment where you can't open a browser:

# 1. Mint a token in Profile → API Tokens
# 2. Set the env var (wins over on-disk config)
export RISKMANAGED_TOKEN="rms_xxx_your_token_here"
export RISKMANAGED_URL="https://agent.riskmanaged.io"  # optional, this is the default

# Or write to disk:
riskmanaged auth login --token rms_xxx_your_token_here

Env-var precedence: RISKMANAGED_TOKEN > ~/.riskmanaged/config.json > not configured. Same for RISKMANAGED_URL.

Verify installation#

riskmanaged whoami

Should print your username, plan, and token expiry.

Log out#

riskmanaged auth logout   # revokes the token server-side + deletes the local file
Was this page helpful?