Access Pretorin controls, evidence, narratives, and local Plan-backed Campaigns from AI tools.
Beta — Pretorin is currently in closed beta. Framework/control browsing works for everyone. Platform write features (evidence, narratives, monitoring) require a beta code. Sign up for early access.
Pretorin CLI gives developers and AI agents direct access to compliance data, implementation context, and evidence workflows.
mcp-name: io.github.pretorin-ai/pretorin
pretorin agent run and route model calls through Pretorin /v1 endpoints.pretorin mcp-serve and connect the MCP server to your existing AI tool (Claude Code, Codex CLI, Cursor, etc.).uv tool install pretorin
pretorin login
pretorin skill install
Run the walkthrough:
bash scripts/demo-walkthrough.sh
Use this flow when you want pretorin agent run to go through Pretorin-hosted model endpoints.
pretorin login
pretorin config set model_api_base_url https://platform.pretorin.com/v1
pretorin agent doctor
pretorin agent install
pretorin agent run "Assess AC-2 implementation gaps for my system"
Key behavior:
pretorin login with no shell-level OPENAI_API_KEY override.OPENAI_API_KEY -> config.api_key -> config.openai_api_key.OPENAI_API_KEY is set in your shell, it overrides stored login credentials.Use this flow when you already have an AI agent/tool and want Pretorin as an MCP capability provider.
The Pretorin skill teaches your AI agent how to use MCP tools effectively for compliance workflows. Install it for Claude Code and/or Codex CLI:
pretorin skill install # both agents
pretorin skill install --agent claude # claude only
pretorin skill install --agent codex # codex only
pretorin skill status # check what's installed
claude mcp add --transport stdio pretorin -- pretorin mcp-serve
Team setup via .mcp.json:
{
"mcpServers": {
"pretorin": {
"type": "stdio",
"command": "pretorin",
"args": ["mcp-serve"]
}
}
}
Add to ~/.codex/config.toml:
[mcp_servers.pretorin]
command = "pretorin"
args = ["mcp-serve"]
If you installed Pretorin with uv tool install or pipx, prefer pinning the absolute path from command -v pretorin to avoid PATH drift between shells and GUI apps.
For Claude Desktop, Cursor, and Windsurf setup, see docs/MCP.md.
Platform-backed review and update workflows are single-scope: set one active system + framework first with pretorin context set, then run evidence, note, monitoring, narrative, or MCP-assisted compliance commands inside that scope. Multi-framework work must be split into separate runs. Evidence, narratives, and notes all support a local-first workflow: create locally, list, then push to the platform.
| Command | Purpose |
|---|---|
pretorin frameworks list | List available frameworks |
pretorin frameworks control <framework> <control> | Get control details and guidance |
pretorin context set | Set active system/framework context |
pretorin context show | Inspect and validate the active context |
pretorin context clear | Clear the active context |
pretorin evidence create | Create local evidence file |
pretorin evidence list | List local evidence files |
pretorin evidence push | Push local evidence to Pretorin |
pretorin evidence search | Search platform evidence |
pretorin evidence upsert <ctrl> <fw> | Find-or-create evidence and link it |
pretorin narrative create | Create local narrative file |
pretorin narrative list | List local narrative files |
pretorin narrative push | Push local narratives to Pretorin |
pretorin narrative get <ctrl> <fw> | Get current control narrative |
pretorin narrative push-file <ctrl> <fw> <sys> <file> | Push a single narrative file |
pretorin notes create | Create local note file |
pretorin notes list --local | List local note files |
pretorin notes push | Push local notes to Pretorin |
pretorin notes list <ctrl> <fw> | List platform control notes |
pretorin notes add <ctrl> <fw> --content ... | Add control note directly |
pretorin monitoring push | Push a monitoring event |
pretorin agent run "<task>" | Run Codex-powered compliance task |
pretorin review run --control-id <id> --path <dir> | Review local code for control coverage |
pretorin skill install | Install Pretorin skill for AI agents |
pretorin skill status | Check skill install status per agent |
pretorin mcp-serve | Start MCP server |
Quick context checks:
pretorin context show --quiet
pretorin context show --quiet --check
pretorin login clears the stored active context when you switch API keys or platform endpoints, which helps prevent old localhost or deleted-system scope from leaking into a new environment.
Credentials are stored at ~/.pretorin/config.json.
| Variable | Description |
|---|---|
PRETORIN_API_KEY | API key for platform access (overrides stored config) |
PRETORIN_PLATFORM_API_BASE_URL | Platform REST API base URL (/api/v1/public) |
PRETORIN_API_BASE_URL | Backward-compatible alias for PRETORIN_PLATFORM_API_BASE_URL |
PRETORIN_MODEL_API_BASE_URL | Model API base URL used by agent/harness flows (default: https://platform.pretorin.com/v1) |
OPENAI_API_KEY | Optional model key override for agent runtime |
Full documentation is built with mdbook. To view it locally:
# Install mdbook (if you don't have it)
cargo install mdbook
# Serve the docs and open in your browser
cd docs && mdbook serve --open
This starts a local server at http://localhost:3000 with live-reload.
To build static HTML without serving:
cd docs && mdbook build
# Output is in docs/book/
git clone https://github.com/pretorin-ai/pretorin-cli.git
cd pretorin-cli
uv pip install -e ".[dev]"
pytest
ruff check src/pretorin
ruff format --check src/pretorin
MIT License. See LICENSE.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx pretorinMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-pretorin-ai-pretorin": {
"command": "uvx",
"args": [
"pretorin"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencepretorinpypiPretorin Compliance works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.