MCP SERVER

chitta-bridge

multi-model AI discussions for Claude Code & Codex

any backend · adversarial review · background rescue · soul-powered rooms · local GPU models · challenge rounds

pip install chitta-bridge
Claude Code / Codex MCP backend Model Hub Claude Code / Codex

Install

terminal
$ pip install chitta-bridge
$ chitta-bridge-install               # both Claude Code + Codex
$ chitta-bridge-install claude-code   # Claude Code only
$ chitta-bridge-install codex         # Codex CLI only

requires: Python 3.10+ · Claude Code or Codex CLI (or both) · one or more backends (OpenCode, Codex, Ollama)

Codex skills: /review, /rescue, /room, /soul

Capabilities

multiple backends
OpenCode · Codex · local GPU (Ollama/vLLM) · any mix
auto-framing
detects domain and frames as specialized expert
agentic execution
Codex full-auto mode with sandboxed file operations
code review
file-level analysis with adaptive strategies
chunked map-reduce
2K+ line files split, processed in parallel, synthesized
session warmup
background ping pre-initializes sessions — all subsequent calls skip cold start
discussion rooms
soul-powered roundtable · per-agent memory · challenge rounds · GPU contention handling
local GPU models
Ollama / vLLM on Slurm GPU nodes · auto-discovery · no cloud API needed
synthesis
room_synthesize distills consensus, disagreements and best answer from any discussion
web search
DuckDuckGo search + page fetch · no API key · available to all backends
soul memory
realm-scoped memory · per-agent namespaces · hybrid recall (vector + BM25) · auto-seeding
sessions
start, switch, end, export conversation history
planning
dedicated plan agent for task decomposition
sandbox modes
read-only, workspace-write, full-access for Codex

How It Works

1
Claude Code sends query via MCP
2
chitta-bridge auto-detects domain
3
routes to backend with expert framing
4
backend consults model
5
response synthesized and returned to Claude

MCP Tools 59

Core

opencode_discuss send a message, auto-framed by domain
opencode_plan planning discussion with plan agent
opencode_brainstorm open-ended brainstorming
opencode_review code review with chunked large-file support

Session

opencode_start start a new session (auto-warms up, captures session ID)
opencode_ping check if model is reachable
opencode_end end current session
opencode_switch switch between sessions
opencode_sessions list all sessions
opencode_history get conversation history
opencode_export export transcript as markdown/JSON

Configuration

opencode_models list available models
opencode_agents list available agents
opencode_model change session model
opencode_agent change session agent
opencode_variant change reasoning effort
opencode_config get current config
opencode_configure set defaults (persisted)
opencode_health server health check

Codex Core

codex_start start a new Codex session
codex_discuss send message to Codex agent
codex_run one-off stateless task execution
codex_review code review — normal or adversarial mode
codex_rescue delegate task with background execution

Codex Jobs

codex_job_status check background job progress
codex_job_result get final output + session ID for resume
codex_job_cancel cancel a running background job

Codex Session

codex_end end current session
codex_switch switch between sessions
codex_sessions list all Codex sessions
codex_history get conversation history

Codex Config

codex_model change session model (o3, o4-mini)
codex_config get current config
codex_configure set defaults (persisted)
codex_health Codex health check

Orchestration

multi_consult fan-out to multiple backends, synthesize results
agent_chain sequential steps passing results forward
delegate_codex delegate to Codex with optional OpenCode review
parallel_agents run multiple tasks concurrently

Web

web_search search via DuckDuckGo — no API key needed
web_fetch fetch a page as plain text (HTML stripped)

Soul Memory

soul_recall search memories from chittad
soul_remember store a memory (episode, wisdom, correction)
soul_context smart context: memories + code symbols + graph
soul_status check if chittad daemon is available

Auto-Framing

When Claude sends a message, chitta-bridge detects the domain and frames the request as a specialized expert prompt.

architecture debugging performance security testing devops database api_design frontend algorithms code_quality planning general

Chunked Processing

For files over 2,000 lines:

split overlapping chunks · 800 lines · 20-line overlap
snap language-agnostic boundary detection · functions, classes
parallel up to 6 chunks processed concurrently
synthesize results merged into single coherent response
input
4,200 lines
chunks
output
synthesized

Multi-Agent Orchestration

Coordinate workflows across multiple AI backends with hierarchical agent patterns.

multi_consult fan-out question to multiple backends in parallel · synthesize results
agent_chain sequential steps · {previous} passes result forward · plan → implement → review
delegate_codex delegate to Codex agent · optional review pass · chain across backends
parallel_agents run multiple tasks concurrently · across any backends
1
Claude Code
2
OpenCode (plan)
3
Codex (implement)
4
OpenCode (review)
agent_chain example
agent_chain(steps=[
  {"backend": "opencode", "task": "Plan caching strategy", "agent": "plan"},
  {"backend": "codex", "task": "Implement: {previous}"},
  {"backend": "opencode", "task": "Review: {previous}"}
])

Codex Features

Adversarial Review

Normal mode finds bugs. Adversarial mode challenges design decisions, architecture, and tradeoffs.

adversarial review
codex_review(mode="adversarial", focus="race conditions and data loss", base="main")
codex_review(mode="adversarial", background=True)  # returns job ID

Background Rescue

Delegate tasks to Codex in the background. Resume sessions, control sandbox and effort.

rescue jobs
codex_rescue(task="investigate test failures", background=True)
codex_job_status()
codex_job_result()  # includes session ID for codex resume
codex_rescue(task="apply the fix", resume_from="SESSION_ID")

Sandbox Modes

read-only can only read files — safest for review
workspace-write can write to workspace (default)
danger-full-access full filesystem + network access — use with caution

Discussion Rooms

Async multi-agent roundtable with agent souls — persistent identity, per-agent memory, mediated tools, and structured challenge rounds. Participants respond in parallel (or sequentially on shared GPUs), each seeing the full thread.

agent souls system prompt · memory realm · tools (recall, remember, web_search) · challenge bias
challenge rounds moderator extracts claims between rounds · forces disagreement and evidence-based refinement
realm memory per-agent persistent memory via chitta-field · auto-seeded on first turn · hybrid recall (vector + BM25)
GPU contention auto-detects shared GPUs · runs sequentially to avoid model-swap thrashing
synthesis distill transcript · consensus · disagreements · best answer · open questions
conductor fusion arXiv:2512.04388 · one call compiles subtasks + visibility matrix · runs async, returns room_id immediately
soul-powered discussion room
room_create(
  room_id="expert-panel",
  topic="How should we authenticate ancient DNA from permafrost?",
  participants='[
    {"name":"Specialist","backend":"local","model":"qwen2.5:32b",
     "base_url":"http://gpunode:11434/v1",
     "soul":{"system_prompt":"You are a paleogenomicist...",
             "realm":"agent:specialist",
             "tools":["recall","remember","web_search"],
             "challenge_bias":0.7}},
    {"name":"Critic","backend":"local","model":"deepseek-r1:32b",
     "base_url":"http://gpunode:11434/v1",
     "soul":{"system_prompt":"You are a methodologist...",
             "realm":"agent:critic",
             "tools":["recall","remember"],
             "challenge_bias":0.8}}
  ]'
)
room_run(room_id="expert-panel", rounds=2, challenge=true)
room_synthesize(room_id="expert-panel")
conductor fusion — one-call orchestration
conductor_fusion(
  topic="Design a fast HNSW build for 144k vectors",
  workflow='[
    {"agent":"claude:opus:xhigh", "subtask":"Thinker: propose independently.", "sees":"none"},
    {"agent":"codex:gpt-5.5",     "subtask":"Worker: extend the Thinker.",     "sees":["Opus"]},
    {"agent":"claude:opus:high",  "subtask":"Verifier: critique both.",       "sees":["Opus","GPT-5.5"]}
  ]',
  project_roots=["/path/to/target/repo"]
)
# → {"room_id": "conductor-ab12cd34", "status": "running", ...}

room_status(room_id="conductor-ab12cd34")  # poll rounds_done/rounds_total
room_read(room_id="conductor-ab12cd34")    # transcript + synthesis once done
room_create create room with participants and optional souls
room_add_participant add agent to ongoing discussion
room_run run N rounds with optional challenge mode
room_synthesize distill transcript into one answer
room_read read full transcript
conductor_fusion one-call conductor orchestration — Thinker/Worker/Verifier by default, runs async
room_status poll an async room for rounds-done/total and completion

Local GPU Models

Chat with Ollama or vLLM running on GPU nodes — no cloud API needed. Auto-discovers endpoints via Slurm job queue, cached URL files, or environment variable.

cached URLs /tmp/ollama-server-*.url files written by slurm-serve-ollama.sh
Slurm jobs squeue --me scans your running GPU jobs for Ollama endpoints
env var CHITTA_BRIDGE_GPU_NODES=node1,node2
fallback localhost:11434
local model session
local_discover()  # find GPU nodes and loaded models

local_start(session_id="gpu1", model="qwen3:30b-a3b")
local_discuss(message="Explain cache invalidation strategies")

# explicit endpoint
local_start(session_id="gpu2", model="qwen2.5:32b",
            endpoint="http://gpunode01:11434/v1")
local_discover find GPU nodes with Ollama/vLLM running
local_start start session (auto-discovers endpoint)
local_discuss chat with the local model
local_models list models available at an endpoint
local_sessions list active local sessions
local_switch switch active session
local_end end a session
local_history show conversation history
local_health health check