AgenticContract
Installation
How to install AgenticContract
Quick Install (Recommended)
curl -fsSL https://agentralabs.tech/install/contract | bashThis auto-installer:
- Detects your platform (macOS/Linux, x86_64/aarch64)
- Downloads the
agentic-contract-mcpbinary from GitHub releases - Scans for MCP-compatible clients (Claude Desktop, Cursor, Windsurf, VS Code, Claude Code CLI)
- Writes the MCP server configuration to detected clients
- Prints a summary of what was installed and where
Install Profiles
The installer supports three profiles:
# Desktop (default): Configures GUI-based MCP clients
curl -fsSL https://agentralabs.tech/install/contract | bash -s -- --profile desktop
# Terminal: Configures Claude Code CLI
curl -fsSL https://agentralabs.tech/install/contract | bash -s -- --profile terminal
# Server: Configures for remote deployment with AGENTIC_TOKEN auth
curl -fsSL https://agentralabs.tech/install/contract | bash -s -- --profile server| Profile | Clients Configured | Auth Required |
|---|---|---|
| desktop | Claude Desktop, Cursor, Windsurf, VS Code | No |
| terminal | Claude Code CLI (~/.claude.json) | No |
| server | Manual MCP JSON output | Yes (AGENTIC_TOKEN) |
Python SDK
pip install agentic-contractThe Python SDK wraps the acon CLI binary via subprocess. It requires the CLI to be installed separately.
from agentic_contract import ContractEngine
engine = ContractEngine()
engine.add_policy("No deploys on Friday", scope="global", action="deny")
result = engine.check_policy("deploy to production")
print(result) # "deny"Requirements: Python 3.8+
Rust CLI
cargo install agentic-contract-cliThis installs the acon binary:
acon stats
acon policy add "No unauthorized access" --scope global --action deny
acon policy list
acon limit set "API calls" --max 1000 --type rate --window 3600
acon serve # Start MCP serverRequirements: Rust 1.75+
MCP Server
Install the MCP binary directly:
cargo install agentic-contract-mcpClaude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"agentic-contract": {
"command": "agentic-contract-mcp",
"args": ["serve"]
}
}
}Cursor Configuration
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"agentic-contract": {
"command": "agentic-contract-mcp",
"args": ["serve"]
}
}
}VS Code Configuration
Add to .vscode/mcp.json:
{
"mcpServers": {
"agentic-contract": {
"command": "agentic-contract-mcp",
"args": ["serve"]
}
}
}Claude Code CLI
Add to ~/.claude.json:
{
"mcpServers": {
"agentic-contract": {
"command": "agentic-contract-mcp",
"args": ["serve"]
}
}
}Verifying the Connection
After configuration, restart your MCP client. The server should appear in the tools list. Run any tool to verify:
> contract_stats
Policies: 0, Risk Limits: 0, Approvals: 0, ...Build from Source
git clone https://github.com/agentralabs/agentic-contract.git
cd agentic-contract
cargo build --releaseBinaries are placed in target/release/:
agentic-contract-mcp— MCP serveracon— CLI tool
Run tests:
cargo test --workspaceRun benchmarks:
cd crates/agentic-contract
cargo benchPackage Registry Links
| Package | Registry | Install Command |
|---|---|---|
agentic-contract | PyPI | pip install agentic-contract |
agentic-contract-cli | crates.io | cargo install agentic-contract-cli |
agentic-contract-mcp | crates.io | cargo install agentic-contract-mcp |
@agenticamem/contract | npm | npm install @agenticamem/contract |
Requirements
| Component | Minimum Version |
|---|---|
| macOS | 12.0+ (Monterey) |
| Linux | glibc 2.31+ |
| Python | 3.8+ |
| Rust | 1.75+ |
| Node.js | 18+ (for npm package) |
Environment Variables
| Variable | Description | Default |
|---|---|---|
ACON_PATH | Path to the .acon contract file | ~/.agentic/contract.acon |
AGENTIC_TOKEN | Auth token for server profile | (none) |
Troubleshooting
Binary not found after install
Ensure ~/.local/bin is in your PATH:
export PATH="$HOME/.local/bin:$PATH"Add this to your ~/.zshrc or ~/.bashrc for persistence.
Permission denied during install
The installer does not require root. If you encounter permission issues, check that ~/.local/bin exists and is writable:
mkdir -p ~/.local/binMCP server not appearing in Claude Desktop
- Verify the config JSON is valid:
python3 -m json.tool < ~/Library/Application\ Support/Claude/claude_desktop_config.json - Ensure the binary path is correct:
which agentic-contract-mcp - Restart Claude Desktop completely (quit and reopen)
Contract file locked
If you see "file locked" errors, another process may be using the file. Check for running acon or agentic-contract-mcp processes:
ps aux | grep agentic-contractChecksum mismatch on load
The .acon file may be corrupted. The BLAKE3 checksum protects against partial writes. If you see this error, restore from a backup or create a new contract file.