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
- ChatGPT Plus, Pro, Team, Enterprise, or Edu subscription
- Developer Mode enabled (for Chat mode)
- Publicly accessible arifOS server (or use ngrok for development)
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)โ
- Open ChatGPT
- Go to Settings โ Connectors
- Under Advanced, toggle Developer Mode to enabled
Step 2: Create MCP Connectorโ
- In Settings โ Connectors, click Create
- Enter details:
- Name: arifOS Constitutional AI
- Server URL:
https://your-server.com/mcp/(include trailing slash)
- Check I trust this provider
- Add authentication if needed (see below)
- Click Create
Step 3: Use in Chatโ
- Start a new chat
- Click the + button โ More โ Developer Mode
- Enable your arifOS connector (must be added to each chat)
- 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โ
Constitutional Web Searchโ
Ask ChatGPT:
"Search for quantum computing breakthroughs and verify with arifOS"
ChatGPT will:
- Call
search_realityvia arifOS - Jina Reader extracts clean Markdown from results
- F2 Truth floor validates evidence
- 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.
Deep Research mode requires search and fetch tools. arifOS provides:
search_realityโ Web search with evidencefetch_contentโ URL content extraction
Using Deep Researchโ
- Start a new chat
- Click + โ Deep Research
- Select your arifOS server as a source
- Ask research questions
Exampleโ
Ask ChatGPT:
"Research constitutional AI governance frameworks and their enforcement mechanisms"
ChatGPT will:
- Use
search_realityto find papers - Use
fetch_contentto extract full text - Cite sources with arifOS verification
- Present findings with confidence scores
Tool Annotationsโ
Control confirmation behavior with tool annotations:
| Annotation | Behavior |
|---|---|
| Read-only | Skip confirmations |
| Destructive | Always require confirmation |
| Idempotent | Skip if safe to retry |
arifOS automatically sets these based on constitutional risk classification:
inspect_file,search_realityโ Read-onlyeureka_forge(LOW) โ May skipeureka_forge(CRITICAL) โ Always confirm
Constitutional Guaranteesโ
Every ChatGPT interaction through arifOS enforces:
| Floor | Cloud Context |
|---|---|
| F2 Truth | Web grounding via Jina Reader, ฯโฅ0.99 threshold |
| F4 Clarity | Clean Markdown extraction reduces entropy |
| F7 Humility | Uncertainty markers when confidence low |
| F11 Authority | Your ChatGPT account = Sovereign identity |
| F12 Defense | Untrusted envelope for all external content |
| F13 Sovereignty | You 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"โ
- Verify your server is publicly accessible:
curl https://your-server.com/health
-
Check firewall rules (port 443/80 open)
-
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:
- Jina Reader: https://jina.ai (10M tokens)
- Perplexity: https://perplexity.ai
- Brave: https://brave.com/search/api
Connector not showing in Developer Modeโ
- Ensure Developer Mode is toggled ON
- Create the connector first (Settings โ Connectors)
- In chat, click + โ More โ Developer Mode
- Enable the connector explicitly (not automatic)
Security Considerationsโ
When deploying arifOS for ChatGPT:
- Use HTTPS only โ ChatGPT requires secure connections
- Set strong governance secret โ Protects against token forgery
- Enable authentication โ API key or bearer token
- Rate limiting โ Prevent abuse (built-in to arifOS)
- Monitor logs โ Watch for suspicious activity
Comparison: ChatGPT vs Claude vs Geminiโ
| Feature | ChatGPT | Claude Desktop | Gemini CLI |
|---|---|---|---|
| Transport | HTTP/Remote | STDIO/Local | STDIO/Local |
| Mode | Cloud | Local | Local |
| Best For | Team sharing | Privacy-first | Terminal users |
| Setup | Deploy server | Install locally | Install locally |
| Offline | โ No | โ Yes | โ Yes |
| Speed | Network latency | Fast (local) | Fast (local) |
Next Stepsโ
- MCP Server Overview โ Learn all 13 tools
- Claude Desktop Integration โ Local alternative
- Gemini CLI Integration โ Terminal option
- Deployment Guide โ Production deployment
Ditempa Bukan Diberi โ Forged, Not Given