Skip to main content

ChatGPT Integration

Connect arifOS to ChatGPT via the Model Context Protocol (MCP) for cloud-based constitutional AI governance.


Overviewโ€‹

ChatGPT supports MCP servers through remote HTTP connections in two modes:

  • Chat Mode: Interactive conversations with MCP tools
  • Deep Research Mode: Comprehensive research with citations
Requirements
  • ChatGPT Plus, Pro, Team, Enterprise, or Edu subscription
  • Developer Mode enabled (for Chat mode)
  • Publicly accessible arifOS server (or use ngrok for development)
Free Tier

Free ChatGPT users can use MCP servers in Deep Research mode only. Chat mode requires Developer Mode which is available on paid plans.


Deployment Optionsโ€‹

Option 1: Public Server (Production)โ€‹

Deploy arifOS to a publicly accessible HTTPS endpoint:

# Using Docker
docker run -d \
--name arifos \
-p 8080:8080 \
-e ARIFOS_GOVERNANCE_SECRET=your-secret \
-e JINA_API_KEY=your-jina-key \
arifos/arifosmcp:latest

Your server will be available at:

  • MCP Endpoint: https://your-domain.com/mcp
  • SSE Endpoint: https://your-domain.com/sse

Option 2: Development with ngrokโ€‹

For local development, expose your local server:

# Terminal 1: Start arifOS
python -m arifos_aaa_mcp http --host 0.0.0.0 --port 8080

# Terminal 2: Expose via ngrok
ngrok http 8080

# Note the HTTPS URL (e.g., https://abc123.ngrok.io)

Connect to ChatGPTโ€‹

Step 1: Enable Developer Mode (Chat Mode)โ€‹

  1. Open ChatGPT
  2. Go to Settings โ†’ Connectors
  3. Under Advanced, toggle Developer Mode to enabled

Step 2: Create MCP Connectorโ€‹

  1. In Settings โ†’ Connectors, click Create
  2. Enter details:
    • Name: arifOS Constitutional AI
    • Server URL: https://your-server.com/mcp/ (include trailing slash)
  3. Check I trust this provider
  4. Add authentication if needed (see below)
  5. Click Create

Step 3: Use in Chatโ€‹

  1. Start a new chat
  2. Click the + button โ†’ More โ†’ Developer Mode
  3. Enable your arifOS connector (must be added to each chat)
  4. Now you can use constitutional tools

Authenticationโ€‹

Public Server with API Keyโ€‹

If your arifOS server requires authentication:

{
"mcpServers": {
"arifOS": {
"url": "https://your-server.com/mcp",
"headers": {
"X-ARIFOS-API-KEY": "your-api-key"
}
}
}
}

Bearer Tokenโ€‹

{
"mcpServers": {
"arifOS": {
"url": "https://your-server.com/mcp",
"headers": {
"Authorization": "Bearer your-token"
}
}
}
}

Chat Mode Usageโ€‹

Ask ChatGPT:

"Search for quantum computing breakthroughs and verify with arifOS"

ChatGPT will:

  1. Call search_reality via arifOS
  2. Jina Reader extracts clean Markdown from results
  3. F2 Truth floor validates evidence
  4. F12 Defense wraps external content

Risk-Classified Operationsโ€‹

Ask ChatGPT:

"List files in my project directory"

  • Risk: LOW โ†’ Executes immediately

Ask ChatGPT:

"Run a shell command to clean up temp files"

  • Risk: MODERATE โ†’ May ask for confirmation

Ask ChatGPT:

"Delete all files in the database"

  • Risk: CRITICAL โ†’ 888_HOLD triggered
  • Requires explicit confirm_dangerous=True
  • Human must approve via 888 Judge

Deep Research Modeโ€‹

Deep Research provides systematic information retrieval with citations.

Search/Fetch Required

Deep Research mode requires search and fetch tools. arifOS provides:

  • search_reality โ€” Web search with evidence
  • fetch_content โ€” URL content extraction

Using Deep Researchโ€‹

  1. Start a new chat
  2. Click + โ†’ Deep Research
  3. Select your arifOS server as a source
  4. Ask research questions

Exampleโ€‹

Ask ChatGPT:

"Research constitutional AI governance frameworks and their enforcement mechanisms"

ChatGPT will:

  1. Use search_reality to find papers
  2. Use fetch_content to extract full text
  3. Cite sources with arifOS verification
  4. Present findings with confidence scores

Tool Annotationsโ€‹

Control confirmation behavior with tool annotations:

AnnotationBehavior
Read-onlySkip confirmations
DestructiveAlways require confirmation
IdempotentSkip if safe to retry

arifOS automatically sets these based on constitutional risk classification:

  • inspect_file, search_reality โ†’ Read-only
  • eureka_forge (LOW) โ†’ May skip
  • eureka_forge (CRITICAL) โ†’ Always confirm

Constitutional Guaranteesโ€‹

Every ChatGPT interaction through arifOS enforces:

FloorCloud Context
F2 TruthWeb grounding via Jina Reader, ฯ„โ‰ฅ0.99 threshold
F4 ClarityClean Markdown extraction reduces entropy
F7 HumilityUncertainty markers when confidence low
F11 AuthorityYour ChatGPT account = Sovereign identity
F12 DefenseUntrusted envelope for all external content
F13 SovereigntyYou control all critical operations

Environment Variablesโ€‹

Your deployed arifOS server needs these environment variables:

# Required
ARIFOS_GOVERNANCE_SECRET=$(openssl rand -hex 32)

# Recommended for search quality
JINA_API_KEY=jina_... # Primary search backend
PERPLEXITY_API_KEY=pplx_... # Fallback
BRAVE_API_KEY=BSA... # Fallback

# Optional
ARIFOS_ML_FLOORS=1 # Enable ML empathy scoring
DATABASE_URL=postgresql://... # For VAULT999 ledger

Troubleshootingโ€‹

"Server rejected" errorโ€‹

ChatGPT requires servers to have search/fetch tools for Deep Research. arifOS has:

  • โœ… search_reality โ€” Web search
  • โœ… fetch_content โ€” URL extraction

Ensure your server is properly exposing these tools.

"Cannot connect to server"โ€‹

  1. Verify your server is publicly accessible:
curl https://your-server.com/health
  1. Check firewall rules (port 443/80 open)

  2. Ensure HTTPS (ChatGPT requires secure connections)

"NO_API_KEY" in search resultsโ€‹

Your server needs search API keys:

docker run -d \
--name arifos \
-p 8080:8080 \
-e JINA_API_KEY=jina_... \
arifos/arifosmcp:latest

Get free keys:

Connector not showing in Developer Modeโ€‹

  1. Ensure Developer Mode is toggled ON
  2. Create the connector first (Settings โ†’ Connectors)
  3. In chat, click + โ†’ More โ†’ Developer Mode
  4. Enable the connector explicitly (not automatic)

Security Considerationsโ€‹

Cloud Deployment

When deploying arifOS for ChatGPT:

  1. Use HTTPS only โ€” ChatGPT requires secure connections
  2. Set strong governance secret โ€” Protects against token forgery
  3. Enable authentication โ€” API key or bearer token
  4. Rate limiting โ€” Prevent abuse (built-in to arifOS)
  5. Monitor logs โ€” Watch for suspicious activity

Comparison: ChatGPT vs Claude vs Geminiโ€‹

FeatureChatGPTClaude DesktopGemini CLI
TransportHTTP/RemoteSTDIO/LocalSTDIO/Local
ModeCloudLocalLocal
Best ForTeam sharingPrivacy-firstTerminal users
SetupDeploy serverInstall locallyInstall locally
OfflineโŒ Noโœ… Yesโœ… Yes
SpeedNetwork latencyFast (local)Fast (local)

Next Stepsโ€‹


Ditempa Bukan Diberi โ€” Forged, Not Given