Skip to main content

Claude Desktop Integration

Connect arifOS to Claude Desktop via the Model Context Protocol (MCP) for local constitutional AI governance.


Overviewโ€‹

Claude Desktop supports MCP servers through STDIO transport for local execution. This integration allows Claude to access arifOS's 13 Constitutional Floors and Trinity governance engines directly on your machine.

Requirements
  • Claude Desktop installed (macOS or Windows)
  • Python 3.12+ with pip
  • arifOS package: pip install arifos

Quick Installโ€‹

If you have fastmcp installed globally:

fastmcp install claude-desktop arifos

Option 2: Manual Configurationโ€‹

Add arifOS to Claude Desktop's MCP configuration:

macOS:

~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Configuration:

{
"mcpServers": {
"arifOS": {
"command": "python",
"args": ["-m", "arifos_aaa_mcp", "stdio"],
"env": {
"ARIFOS_GOVERNANCE_SECRET": "your-secret-key",
"JINA_API_KEY": "your-jina-key",
"PERPLEXITY_API_KEY": "your-perplexity-key",
"BRAVE_API_KEY": "your-brave-key"
}
}
}
}
Environment Variables

Claude Desktop runs in an isolated environment. You must explicitly pass all environment variables your server needs:

  • ARIFOS_GOVERNANCE_SECRET โ€” Required for governance token signing
  • JINA_API_KEY โ€” For Jina Reader search (recommended)
  • PERPLEXITY_API_KEY โ€” For Perplexity search fallback
  • BRAVE_API_KEY โ€” For Brave search fallback

Installation with Dependenciesโ€‹

If you need additional Python packages for your use case:

{
"mcpServers": {
"arifOS": {
"command": "uv",
"args": [
"run",
"--with", "arifos",
"--with", "sentence-transformers",
"python", "-m", "arifos_aaa_mcp", "stdio"
],
"env": {
"ARIFOS_GOVERNANCE_SECRET": "your-secret-key",
"ARIFOS_ML_FLOORS": "1"
}
}
}
}

Verify Installationโ€‹

  1. Restart Claude Desktop completely
  2. Look for the hammer icon (๐Ÿ”จ) in the bottom-left of the input box
  3. Click it to see available arifOS tools:
    • anchor_session โ€” Start constitutional session
    • reason_mind โ€” Execute reasoning with governance
    • search_reality โ€” Web search with F2 Truth verification
    • eureka_forge โ€” Execute commands with risk classification
    • ... and 9 more tools

Usage Examplesโ€‹

Ask Claude:

"Search for recent advances in quantum computing and verify the facts with arifOS"

Claude will:

  1. Call search_reality via arifOS
  2. Jina Reader extracts clean Markdown from web results
  3. F2 Truth floor validates evidence quality
  4. Results wrapped in F12 Defense envelope

Risk-Classified Command Executionโ€‹

Ask Claude:

"List all files in my home directory"

Claude will:

  1. Call eureka_forge with command ls ~
  2. Risk classified as LOW (read-only)
  3. Executes immediately with audit logging

Ask Claude:

"Delete all files in /tmp"

Claude will:

  1. Call eureka_forge with command rm -rf /tmp/*
  2. Risk classified as CRITICAL (destructive)
  3. 888_HOLD triggered โ€” Requires human confirmation
  4. Must call confirm_dangerous=True with explicit intent

Constitutional Guaranteesโ€‹

When using arifOS through Claude Desktop, every action is governed by:

FloorGuarantee
F1 AmanahAll actions are reversible and auditable
F2 TruthWeb grounding with ฯ„โ‰ฅ0.99 evidence threshold
F4 ClarityOutput must reduce information entropy (ฮ”S โ‰ค 0)
F7 HumilityExplicit uncertainty markers when ฯ„ < 0.99
F12 DefenseExternal content wrapped in untrusted envelope
F13 SovereigntyHuman has final veto on all critical actions

Troubleshootingโ€‹

"Server not found" or hammer icon missingโ€‹

  1. Check configuration file syntax (valid JSON)
  2. Ensure python is in your PATH
  3. Try full path to Python executable
  4. Restart Claude Desktop completely

"NO_API_KEY" in search resultsโ€‹

Add search API keys to environment:

"env": {
"JINA_API_KEY": "jina_...",
"PERPLEXITY_API_KEY": "pplx_...",
"BRAVE_API_KEY": "BSA..."
}

Get free API keys:

Governance token errorsโ€‹

ARIFOS_GOVERNANCE_SECRET is required for:

  • seal_vault tool
  • Critical action confirmation

Generate a secret:

openssl rand -hex 32

Advanced: Remote Server via Proxyโ€‹

If you want to connect to a remote arifOS server:

  1. Create a proxy server locally:
from fastmcp.server import create_proxy

proxy = create_proxy(
"https://arifosmcp.arif-fazil.com/sse",
name="arifOS Remote"
)

if __name__ == "__main__":
proxy.run() # STDIO for Claude Desktop
  1. Install the proxy in Claude Desktop

Next Stepsโ€‹


Ditempa Bukan Diberi โ€” Forged, Not Given