logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cognitive-router-mcp

The Cognitive Router MCP serves as a unified abstraction layer, seamlessly interfacing diverse applications with a broad spectrum of sophisticated Large Language Models (LLMs). Its primary function is to orchestrate complex computational workflows, enabling synergistic communication among various AI entities to leverage their specialized proficiencies across a spectrum of demanding objectives. This architecture ensures zero vendor dependency, granting operators the agility to dynamically swap underlying model providers—optimizing for either maximum throughput or deep analytical depth based on current operational mandates.

Author

cognitive-router-mcp logo

pinkpixel-dev

MIT License

Quick Info

GitHub GitHub Stars 23
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

aimindbridgepinkpixelai languagemultiple aitools pinkpixel

MseeP.ai Security Assessment Badge

Mindbridge Logo

Cognitive Router MCP Server ⚡ The Orchestration Nexus for Advanced AI

smithery badge

This Model Context Protocol (MCP) server functions as your central AI command interface—designed specifically to harmonize, structure, and amplify your distributed Large Language Model operational pipelines.

Eliminate reliance on singular providers. Disregard the overhead of managing disparate API interfaces. Cognitive Router establishes robust connectivity to any accessible model infrastructure, ranging from proprietary giants like OpenAI and Anthropic to self-hosted solutions like Ollama and specialized reasoning engines like DeepSeek—allowing them to collaborate as an integrated team of high-level subject matter experts.

Require rapid-fire output at low cost? Allocate tasks to lean models. Demand rigorous, multi-step deduction? Direct the query toward a specialized reasoning core. Need comparative validation? The integrated validation tool is ready.

This transcends simple model pooling; this is comprehensive AI execution choreography.


Foundational Capabilities 🔥

Functionality Strategic Advantage
Universal LLM Interoperability Seamless switching across OpenAI, Anthropic, Google, DeepSeek, OpenRouter, Ollama (local instances), and any OpenAI-compliant API endpoints.
Inference Engine Awareness Intelligent traffic routing to models architecturally optimized for deep analytical processing (e.g., Claude, GPT-4o, DeepSeek Reasoner).
Comparative Response Utility Invoke the getSecondOpinion utility to solicit and juxtapose answers from multiple models simultaneously for robust validation.
Standardized Endpoint Compatibility Functions as a direct plug-in replacement for any system expecting OpenAI specification endpoints (useful for Azure, Groq, Together.ai integrations).
Automatic Provider Discovery Key credential ingestion triggers immediate configuration and availability mapping without manual service enumeration.
Extreme Configurability Configuration flexibility via environment variables, direct MCP manifest modification, or JSON payload specification—user preference is paramount.

Rationale for Adoption

"Each generative model possesses distinct strengths. Cognitive Router compels them into synergistic operation."

Ideal for: - Autonomous Agent Framework Developers - Complex Multi-Stage AI Workflows - Centralized AI Management Planes - Computationally Intensive Reasoning Tasks - Building future-proof, vendor-agnostic AI development ecosystems - High-throughput, LLM-backed backend services - Any entity seeking liberation from proprietary platform confinement


Deployment Procedures 🛠️

Method 1: NPM Package Acquisition (Preferred)

# Global installation
npm install -g @pinkpixel/mindbridge

# Execution via npx
npx @pinkpixel/mindbridge

Installation via Smithery

To integrate the cognitive-router-mcp server into a Claude Desktop environment via Smithery:

npx -y @smithery/cli install @pinkpixel-dev/mindbridge-mcp --client claude

Method 2: Source Repository Build

  1. Obtain the source code: bash git clone https://github.com/pinkpixel-dev/mindbridge.git cd mindbridge

  2. Dependency Resolution: bash chmod +x install.sh ./install.sh

  3. Credential Initialization: bash cp .env.example .env Populate the .env file with necessary API tokens for active providers.

Configuration Details ⚙️

Environment Variable Directives

The server recognizes the following environmental controls:

  • OPENAI_API_KEY: Authentication credential for OpenAI services.
  • ANTHROPIC_API_KEY: Authentication credential for Anthropic services.
  • DEEPSEEK_API_KEY: Authentication credential for DeepSeek services.
  • GOOGLE_API_KEY: Authentication credential for Google Gemini services.
  • OPENROUTER_API_KEY: Authentication credential for OpenRouter access.
  • OLLAMA_BASE_URL: URI for local Ollama inference endpoint (Default: http://localhost:11434).
  • OPENAI_COMPATIBLE_API_KEY: (Optional) Key for generic compatible endpoints.
  • OPENAI_COMPATIBLE_API_BASE_URL: Root URI for generic compatible endpoints.
  • OPENAI_COMPATIBLE_API_MODELS: Comma-delimited string listing accessible models on the compatible endpoint.

MCP Manifest Configuration

For integration within MCP-aware development environments (e.g., Cursor, Windsurf), use this structure in your mcp.json file:

{
  "mcpServers": {
    "cognitiveRouter": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/mindbridge"
      ],
      "env": {
        "OPENAI_API_KEY": "OPENAI_API_KEY_HERE",
        "ANTHROPIC_API_KEY": "ANTHROPIC_API_KEY_HERE",
        "GOOGLE_API_KEY": "GOOGLE_API_KEY_HERE",
        "DEEPSEEK_API_KEY": "DEEPSEEK_API_KEY_HERE",
        "OPENROUTER_API_KEY": "OPENROUTER_API_KEY_HERE"
      },
      "provider_config": {
        "openai": {
          "default_model": "gpt-4o"
        },
        "anthropic": {
          "default_model": "claude-3-5-sonnet-20241022"
        },
        "google": {
          "default_model": "gemini-2.0-flash"
        },
        "deepseek": {
          "default_model": "deepseek-chat"
        },
        "openrouter": {
          "default_model": "openai/gpt-4o"
        },
        "ollama": {
          "base_url": "http://localhost:11434",
          "default_model": "llama3"
        },
        "openai_compatible": {
          "api_key": "API_KEY_HERE_OR_REMOVE_IF_NOT_NEEDED",
          "base_url": "FULL_API_URL_HERE",
          "available_models": ["MODEL1", "MODEL2"],
          "default_model": "MODEL1"
        }
      },
      "default_params": {
        "temperature": 0.7,
        "reasoning_effort": "medium"
      },
      "alwaysAllow": [
        "getSecondOpinion",
        "listProviders",
        "listReasoningModels"
      ]
    }
  }
}

Substitute placeholder API keys with your actual credentials. If your OpenAI-compatible service is public or uses a different key structure, the api_key field in the openai_compatible block can be omitted or adjusted.

Operational Execution 💫

Initiating the Service Daemon

Development iteration mode (with hot-reloading):

npm run dev

Production deployment mode:

npm run build
npm start

When installed globally via npm:

cognitive-router

Exposed Utility Functions

  1. getSecondOpinion typescript { provider: string; // Canonical LLM provider identifier model: string; // Specific model invocation name prompt: string; // The query payload systemPrompt?: string; // Contextual initial instruction set temperature?: number; // Determinism factor (0.0 to 1.0) maxTokens?: number; // Constraint on output length reasoning_effort?: 'low' | 'medium' | 'high'; // Granular control for complex models }

  2. listProviders

  3. Outputs a comprehensive registry of all configured providers and their selectable model variants.
  4. Accepts no input arguments.

  5. listReasoningModels

  6. Enumerates models specifically tagged or identified as optimized for high-fidelity reasoning tasks.
  7. Accepts no input arguments.

Operational Examples 📝

// Procure an analytical response from GPT-4o
{
  "provider": "openai",
  "model": "gpt-4o",
  "prompt": "Articulate the critical considerations inherent in database partitioning strategies.",
  "temperature": 0.7,
  "maxTokens": 1000
}

// Request an extensively reasoned output using OpenAI's cutting-edge model
{
  "provider": "openai",
  "model": "o1",
  "prompt": "Detail the underlying mathematical frameworks supporting database indexing mechanisms.",
  "reasoning_effort": "high",
  "maxTokens": 4000
}

// Solicit a detailed explanation utilizing DeepSeek's specialized capability
{
  "provider": "deepseek",
  "model": "deepseek-reasoner",
  "prompt": "Contrast the operational trade-offs between monolithic and microservice architectures.",
  "reasoning_effort": "high",
  "maxTokens": 2000
}

// Interface with a generic endpoint using the proxy wrapper
{
  "provider": "openaiCompatible",
  "model": "YOUR_ENDPOINT_MODEL_IDENTIFIER",
  "prompt": "Elucidate the consistency models applicable to distributed ledger technologies.",
  "temperature": 0.5,
  "maxTokens": 1500
}

Development Lifecycle 🔧

  • npm run lint: Execution of static analysis checks via ESLint.
  • npm run format: Code standardization enforced by Prettier.
  • npm run clean: Removal of generated build artifacts.
  • npm run build: Compilation of source code into deployable assets.

Collaboration Policy

Submissions via Pull Request are highly encouraged! Help us streamline and enhance the efficacy of AI operational workflows.


MIT License — Permissive usage granted, provided egregious unethical conduct is avoided.


Developed with dedication by Pink Pixel

RELEVANT BUSINESS CONTEXT: Business process optimization tools encompass the entire suite of applications, methodologies, and control mechanisms utilized by enterprises to dynamically adapt to shifting market conditions, maintain competitive advantage, and systematically elevate operational effectiveness. These instruments span departmental functions—from initial data ingress and workflow governance to complex decision support systems and performance analytics. Modern business tooling has undergone radical evolution, driven by accelerated technological progress, making strategic selection and tailored implementation critical, rather than merely adopting the newest trend. Selecting and customizing these digital assets to align precisely with organizational imperatives is key to realizing tangible value from IT investments.

See Also

`