MCP Hub
Back to servers

Omni Cortex

A sophisticated reasoning engine that orchestrates 62 advanced cognitive frameworks via Gemini to provide Claude with high-context, token-efficient execution briefs for complex coding tasks.

Stars
3
Tools
1
Updated
Jan 14, 2026
Validated
Feb 7, 2026

🧠 Omni Cortex

The Headless Strategy Engine for AI Coding Agents

Initial Release Docker Version License MCP Compatible Frameworks Tests

Omni Cortex is an MCP server that gives Claude access to 62 advanced reasoning frameworks through Gemini-powered orchestration. Gemini thinks deeply about your problem and generates ultra-efficient execution briefs for Claude.

"Gemini orchestrates. Claude executes. You ship faster."


🏗️ Architecture: Gemini Orchestrates, Claude Executes

User Query → Claude → Gemini (via MCP) → Structured Context → Claude Executes
                          ↓
              1. Analyze intent & extract keywords
              2. Discover relevant files (with scoring)
              3. Search code (grep/ripgrep/git)
              4. Fetch documentation from web
              5. Query ChromaDB knowledge base (16K+ examples)
              6. Structure everything into organized brief

How It Works

  1. User asks Claude a question
  2. Claude calls Omni-Cortex (MCP tool)
  3. Gemini Context Gateway does the heavy lifting:
    • Analyzes query to understand intent
    • Discovers relevant files with relevance scoring
    • Searches codebase via grep/git
    • Fetches web documentation if needed
    • Queries ChromaDB for similar past solutions (16K+ examples)
    • Selects optimal framework chain (62 available)
    • Generates token-efficient execution brief (20% format savings)
  4. Claude receives structured context and executes

Key Design

  • Gemini burns tokens freely (1M context) - does ALL the heavy thinking
  • Claude gets full context with 20% token savings via efficient formatting
  • Cost: ~$0.0001 per query (virtually free with Gemini's free tier)

🔮 Vibe-Based Routing

You don't need to ask for "Active Inference" or "Chain of Verification." Just speak naturally:

You SaySelected Strategy
"WTF is wrong with this? It's failing randomly!"active_inference → Hypothesis Testing Loop
"This code is spaghetti. Kill it with fire."graph_of_thoughts → Dependency disentanglement
"Is this actually secure? Check for hacks."chain_of_verification → Red Teaming & Auditing
"I have no idea how to start this weird problem."self_discover → First Principles exploration
"Make it faster. It's too slow."tree_of_thoughts → Optimization Search
"Make the tests pass, fix the CI."tdd_prompting → Test-Driven Development

🔗 Framework Chaining

For complex tasks, Omni chains multiple frameworks together in a pipeline:

Category Router → Specialist Agent → Framework Chain → Pipeline Executor
      ↓                   ↓                  ↓               ↓
  "debug"         Debug Detective      [fw1 → fw2 → fw3]   Execute each
  "code_gen"      Code Architect               ↓           in sequence
  "refactor"      Refactor Surgeon     Pass state between
      ...                              frameworks

Example: Complex Bug Fix

When you say "This async handler crashes randomly under load":

  1. Category Matchdebug (vibe: "crashes", "randomly")
  2. Specialist Decision → Debug Detective selects chain
  3. Pipeline Execution:
    self_ask         →  "What exactly are we debugging?"
    active_inference →  Hypothesis testing loop
    verify_and_edit  →  Validate fix, patch only what's wrong
    

📋 ClaudeCodeBrief Format (NEW)

The structured handoff protocol optimizes for Claude Max subscriptions:

[DEBUG] Fix user auth failing after password reset
→ auth/password.py:L45-67 auth/session.py
  • authentication
  ⊘ auth/oauth.py

1. Check reset_password() return value
2. Verify session invalidation after reset
3. Add token refresh call after password change

✓ pytest tests/auth/ -v
• All tests pass
• Auth flow works

⚠ Preserve existing functionality
⚠ Do not break API

• [FILE] auth/password.py:L45
  → returns None instead of new token
• [FILE] auth/session.py:L78
  → does not invalidate old tokens

⛔ If required inputs missing, request them

20% token savings via bullet points, full information preserved.


⚡ Installation

Option 1: Docker Pull

docker pull vzwjustin/omni-cortex:latest

📚 Pre-Seeded Knowledge: The :latest image ships with an embedded knowledge base including:

  • LLM Debugging: Prompt engineering, error recovery, hallucination handling
  • Reasoning Frameworks: When to use CoT, Tree-of-Thoughts, ReAct, etc.
  • Best Practices: Tool calling, memory management, cost optimization
  • Curated llms.txt: Anthropic, LangChain, Pydantic, Docker, and more

No setup required - knowledge is pre-loaded in ChromaDB.

Option 2: Add to MCP Config

Add to your IDE's MCP settings (e.g., claude_desktop_config.json):

{
  "mcpServers": {
    "omni-cortex": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-v", "/path/to/your/code:/code",
        "vzwjustin/omni-cortex:latest"
      ]
    }
  }
}

🧩 Framework Architecture (Modular)

The 62 frameworks are organized into a clean, modular structure:

Single Source of Truth

app/frameworks/
├── __init__.py         # Exposes FRAMEWORKS dict
└── registry.py         # ALL 62 framework definitions (76KB)

Each framework is defined as a FrameworkDefinition dataclass:

FrameworkDefinition(
    name="active_inference",
    display_name="Active Inference",
    category=FrameworkCategory.ITERATIVE,
    description="Debugging loop: hypothesis → predict → compare → update",
    best_for=["debugging", "error analysis", "root cause investigation"],
    vibes=["why is this broken", "wtf is wrong", "find the bug", ...],
    steps=["HYPOTHESIS: Form hypothesis", "PREDICT: Expected behavior", ...],
    complexity="medium",
    task_type="debug",
)

Node Implementations (By Category)

app/nodes/
├── common.py           # Shared logic for all nodes
├── generator.py        # Dynamic prompt generator (uses registry)
│
├── strategy/           # ReasonFlux, Self-Discover, Plan-and-Solve...
├── search/             # Tree of Thoughts, Graph of Thoughts, MCTS...
├── iterative/          # Active Inference, Reflexion, Self-Refine...
├── code/               # Program of Thoughts, Chain of Code, TDD...
├── context/            # Chain of Note, Step-Back, Buffer of Thoughts...
├── fast/               # System1, Scaffolding (quick responses)
├── verification/       # Chain of Verification, Self-Consistency...
├── agent/              # SWE-Agent, ReWOO, LATS...
└── rag/                # HyDE, RAG-Fusion, RAPTOR, GraphRAG...

How It Works

1. User query → HyperRouter matches vibes in registry.py
2. Category identified → Specialist selects framework(s)
3. Framework chain selected → generator.py builds prompts from steps
4. Node executes → Category-specific logic in nodes/{category}/
5. Result returned → Formatted as ClaudeCodeBrief

Why This Structure?

  • Single Source of Truth: Add/modify frameworks in ONE file
  • Vibe Matching: Natural language → framework selection
  • Modular Nodes: Category-specific execution logic
  • Prompt Generation: Steps are templates, generator fills in context

Categories

CategoryCountFocus
Strategy7Architecture, planning, system design
Search4Optimization, exploration, complex bugs
Iterative8Debugging, refinement, learning loops
Code15Code generation, testing, algorithms
Context6Research, abstraction, security
Fast2Quick fixes, scaffolding
Verification8Claim integrity, hallucination detection
Agent5Tool orchestration, execution loops
RAG5Retrieval grounding, evidence-based
Total62

🔍 Debugging & Verification (7)

FrameworkBest For
Active InferenceRoot cause analysis of "impossible" bugs
Chain of VerificationSecurity audits and logic checking
Self DebuggingPre-computation mental traces before coding
Reverse CoTWorking backward from a wrong output to the error
Red TeamAdversarial attack simulation
ReflexionLearning from past failures in a loop
TDD PromptingWriting tests before implementation

🏗️ Architecture & Planning (7)

FrameworkBest For
ReasonFluxHierarchical system design
Plan-and-SolveExplicit roadmap creation before execution
Self-DiscoverSolving novel problems with no known pattern
CoALAAgentic loop with episodic memory
Buffer of ThoughtsManaging massive context requirements
Least-to-MostBottom-up decomposition of complex systems
Comparative ArchWeighing trade-offs between multiple approaches

🚀 Optimization & Code Gen (15)

FrameworkBest For
Tree of ThoughtsExploring multiple optimization paths
Graph of ThoughtsNon-linear refactoring of spaghetti code
Program of ThoughtsMath, data processing, computational problems
Chain-of-CodeExecution-based logic reasoning
CRITICAPI usage validation with external tools
Self-DebuggingMental execution trace before presenting code
Reverse Chain-of-ThoughtBackward debugging from wrong outputs
(and more...)See FRAMEWORKS.md

✅ Verification & Integrity (8)

FrameworkBest For
Self-ConsistencyMulti-sample voting for reliable answers
Self-AskSub-question decomposition before solving
RaRRephrase-and-Respond for clarity
Verify-and-EditVerify claims, edit only failures
RARRResearch, Augment, Revise - evidence-driven
SelfCheckGPTHallucination detection via sampling
MetaQAMetamorphic testing for reasoning reliability
RAGASRAG Assessment for retrieval quality

🤖 Agent Orchestration (5)

FrameworkBest For
ReWOOPlan then execute - minimize tool calls
LATSTree search over action sequences
MRKLModular reasoning with specialized modules
SWE-AgentRepo-first execution loop (inspect/edit/run)
ToolformerSmart tool selection policy

📚 RAG & Retrieval (5)

FrameworkBest For
Self-RAGSelf-triggered selective retrieval
HyDEHypothetical Document Embeddings
RAG-FusionMulti-query retrieval with rank fusion
RAPTORHierarchical abstraction retrieval
GraphRAGEntity-relation grounding for dependencies

🔧 Recent Changes

v1.0.0 - Initial Release (January 2026)

Production Hardening

  • P0/P1 Fixes Complete: All critical code review issues resolved
  • 280+ Tests Passing: Comprehensive test coverage for core modules
  • Defensive Error Handling: GeminiResponse never throws, graceful degradation
  • Dead Code Removed: Consolidated duplicate functions, wired up unused parameters

Code Quality

  • Single Registry: All 62 frameworks in app/frameworks/registry.py
  • Config Unified: Single source of truth in core/settings.py
  • Token-Efficient Briefs: 20% savings via ClaudeCodeBrief.to_surgical_prompt()
  • Async-Safe Cache: Thundering herd protection, 90% reduction in duplicate API calls

Architecture

  • Gemini Orchestration: Task analysis, context prep, framework selection
  • ChromaDB Integration: 16K+ examples for cross-session learning
  • Multi-Repo Support: Context discovery across multiple repositories
  • Structured Handoff Protocol: GeminiRouterOutput → ClaudeCodeBrief

🧪 Testing

# Run all tests
cd omni_cortex
python -m pytest tests/ -v

# Run smoke tests only
python -m pytest tests/unit/test_refactor_smoke.py -v

📄 License

MIT License. Open source and free to use.


🙏 Contributing

Contributions welcome! Please read the CLAUDE.md for development guidelines.


Built with ❤️ by Justin Adams

Reviews

No reviews yet

Sign in to write a review