Claude Code Setup
Configure Claude Code (the CLI tool) with arifOS constitutional governance.
Overview
Claude Code is Anthropic's official CLI for Claude. It can connect to MCP servers for extended capabilities, including arifOS governance.
Configuration
Global Configuration
Create or edit ~/.claude/settings.json:
{
"mcpServers": {
"arifOS": {
"url": "https://arifos.arif-fazil.com/sse"
}
}
}
Project-Level Configuration
For project-specific governance, create .mcp.json in your project root:
{
"mcpServers": {
"arifOS": {
"url": "https://arifos.arif-fazil.com/sse"
}
}
}
Using CLAUDE.md
For deeper integration, add governance instructions to your CLAUDE.md file:
# CLAUDE.md
## Governance
This project uses arifOS constitutional governance. Before any action:
1. Check against TEACH principles (Truth, Empathy, Amanah, Clarity, Humility)
2. Use 888_HOLD for:
- Database migrations
- Production deployments
- Credential handling
- Mass file operations (>10 files)
- Git history modification
## SABAR Protocol
If a floor fails:
1. STOP — Don't execute
2. ACKNOWLEDGE — State which floor failed
3. BREATHE — Pause
4. ADJUST — Propose alternative
5. RESUME — Only when all floors pass
Verifying Integration
Start Claude Code and check for arifOS tools:
claude
# In the Claude Code session:
> What MCP tools are available?
You should see:
init_000— System ignitionagi_genius— Mind (truth, clarity)asi_act— Heart (empathy, safety)apex_judge— Soul (verdict)vault_999— Seal (ledger)
Usage Patterns
Automatic Governance
Claude Code will use arifOS tools when:
- You ask it to verify facts
- You request code changes affecting data
- You ask about high-stakes operations
Manual Invocation
You can explicitly request governance:
> Use arifOS to verify this claim before proceeding: "React 18 uses a new reconciler algorithm"
High-Stakes Operations
For operations that trigger 888_HOLD:
> I want to run a database migration
Claude will:
1. Call init_000 (detect: high-stakes operation)
2. Return 888_HOLD verdict
3. Ask for explicit confirmation
4. Only proceed after human approval
Local Server Mode
For offline or low-latency usage:
{
"mcpServers": {
"arifOS": {
"command": "python",
"args": ["-m", "arifos.mcp"]
}
}
}
This starts a local stdio server that Claude Code manages automatically.
Troubleshooting
MCP Tools Not Available
- Check settings file location
- Validate JSON syntax
- Restart Claude Code session
Connection Timeouts
The SSE connection may timeout on slow networks. Options:
- Use local server (recommended for development)
- Increase timeout in configuration
- Check firewall settings
Floor Violations
If you see VOID verdicts frequently, check the floor_summary:
{
"verdict": "VOID",
"floor_summary": {
"failed": ["F2"],
"reason": "Unverified claim stated as fact"
}
}
This is the system working correctly — adjust your request to pass the floor.
Best Practices
- Don't disable governance — It's there to help
- Use CLAUDE.md — Project-specific rules enhance governance
- Trust 888_HOLD — When it pauses, there's a reason
- Review VOIDs — They indicate potential issues
Next Steps
- Cursor Setup — VS Code-based IDE
- Python Integration — Direct API access
- MCP Tools Reference — Detailed tool documentation