PAL MCP Server
PAL MCP lets your AI CLI/IDE orchestrate multiple AI models and workflows through a single MCP server.
Multi-model collaboration: Chat, brainstorm, get second opinions, and maintain conversation continuity across models.
Deep reasoning: Use
thinkdeepfor complex problem analysis, hypothesis testing, and architecture decisions.Planning: Break down projects into structured plans with
planner.Consensus building: Consult multiple models with different stances via
consensus.CLI bridge: Connect external AI CLIs (Claude, Codex, Gemini) via
clink, including subagents and role presets.Code quality: Run
codereview,precommit,debug,secaudit,refactor,testgen,docgen,analyze, andtracer.Utilities: Look up current API/SDK docs with
apilookup, challenge assumptions withchallenge.Model management: List configured models/providers with
listmodels; get server info withversion.Provider flexibility: Support Gemini, OpenAI, Azure, X.AI, OpenRouter, DIAL, Ollama, and local models; auto-select models, use vision, thinking modes, and large prompts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PAL MCP Server Use consensus with gpt-5 and gemini-pro to decide: dark mode or offline support next"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PAL MCP: Many Workflows. One Context.
Your AI's PAL ā a Provider Abstraction Layer Formerly known as Zen MCP
š Watch more examples
Your CLI + Multiple Models = Your AI Dev Team
Use the š¤ CLI you love:
Claude Code Ā· Gemini CLI Ā· Codex CLI Ā· Qwen Code CLI Ā· Cursor Ā· and more
With multiple models within a single prompt:
Gemini Ā· OpenAI Ā· Anthropic Ā· Grok Ā· Azure Ā· Ollama Ā· OpenRouter Ā· DIAL Ā· On-Device Model
š Now with CLI-to-CLI Bridge
The new clink (CLI + Link) tool connects external AI CLIs directly into your workflow:
Connect external CLIs like Gemini CLI, Codex CLI, and Claude Code directly into your workflow
CLI Subagents - Launch isolated CLI instances from within your current CLI! Claude Code can spawn Codex subagents, Codex can spawn Gemini CLI subagents, etc. Offload heavy tasks (code reviews, bug hunting) to fresh contexts while your main session's context window remains unpolluted. Each subagent returns only final results.
Context Isolation - Run separate investigations without polluting your primary workspace
Role Specialization - Spawn
planner,codereviewer, or custom role agents with specialized system promptsFull CLI Capabilities - Web search, file inspection, MCP tool access, latest documentation lookups
Seamless Continuity - Sub-CLIs participate as first-class members with full conversation context between tools
# Codex spawns Codex subagent for isolated code review in fresh context
clink with codex codereviewer to audit auth module for security issues
# Subagent reviews in isolation, returns final report without cluttering your context as codex reads each file and walks the directory structure
# Consensus from different AI models ā Implementation handoff with full context preservation between tools
Use consensus with gpt-5 and gemini-pro to decide: dark mode or offline support next
Continue with clink gemini - implement the recommended feature
# Gemini receives full debate context and starts coding immediatelyRelated MCP server: MCP Boilerplate
Why PAL MCP?
Why rely on one AI model when you can orchestrate them all?
A Model Context Protocol server that supercharges tools like Claude Code, Codex CLI, and IDE clients such as Cursor or the Claude Dev VS Code extension. PAL MCP connects your favorite AI tool to multiple AI models for enhanced code analysis, problem-solving, and collaborative development.
True AI Collaboration with Conversation Continuity
PAL supports conversation threading so your CLI can discuss ideas with multiple AI models, exchange reasoning, get second opinions, and even run collaborative debates between models to help you reach deeper insights and better solutions.
Your CLI always stays in control but gets perspectives from the best AI for each subtask. Context carries forward seamlessly across tools and models, enabling complex workflows like: code reviews with multiple models ā automated planning ā implementation ā pre-commit validation.
You're in control. Your CLI of choice orchestrates the AI team, but you decide the workflow. Craft powerful prompts that bring in Gemini Pro, GPT 5, Flash, or local offline models exactly when needed.
A typical workflow with Claude Code as an example:
Multi-Model Orchestration - Claude coordinates with Gemini Pro, O3, GPT-5, and 50+ other models to get the best analysis for each task
Context Revival Magic - Even after Claude's context resets, continue conversations seamlessly by having other models "remind" Claude of the discussion
Guided Workflows - Enforces systematic investigation phases that prevent rushed analysis and ensure thorough code examination
Extended Context Windows - Break Claude's limits by delegating to Gemini (1M tokens) or O3 (200K tokens) for massive codebases
True Conversation Continuity - Full context flows across tools and models - Gemini remembers what O3 said 10 steps ago
Model-Specific Strengths - Extended thinking with Gemini Pro, blazing speed with Flash, strong reasoning with O3, privacy with local Ollama
Professional Code Reviews - Multi-pass analysis with severity levels, actionable feedback, and consensus from multiple AI experts
Smart Debugging Assistant - Systematic root cause analysis with hypothesis tracking and confidence levels
Automatic Model Selection - Claude intelligently picks the right model for each subtask (or you can specify)
Vision Capabilities - Analyze screenshots, diagrams, and visual content with vision-enabled models
Local Model Support - Run Llama, Mistral, or other models locally for complete privacy and zero API costs
Bypass MCP Token Limits - Automatically works around MCP's 25K limit for large prompts and responses
The Killer Feature: When Claude's context resets, just ask to "continue with O3" - the other model's response magically revives Claude's understanding without re-ingesting documents!
Example: Multi-Model Code Review Workflow
Perform a codereview using gemini pro and o3 and use planner to generate a detailed plan, implement the fixes and do a final precommit check by continuing from the previous codereviewThis triggers a
codereviewworkflow where Claude walks the code, looking for all kinds of issuesAfter multiple passes, collects relevant code and makes note of issues along the way
Maintains a
confidencelevel betweenexploring,low,medium,highandcertainto track how confidently it's been able to find and identify issuesGenerates a detailed list of critical -> low issues
Shares the relevant files, findings, etc with Gemini Pro to perform a deep dive for a second
codereviewComes back with a response and next does the same with o3, adding to the prompt if a new discovery comes to light
When done, Claude takes in all the feedback and combines a single list of all critical -> low issues, including good patterns in your code. The final list includes new findings or revisions in case Claude misunderstood or missed something crucial and one of the other models pointed this out
It then uses the
plannerworkflow to break the work down into simpler steps if a major refactor is requiredClaude then performs the actual work of fixing highlighted issues
When done, Claude returns to Gemini Pro for a
precommitreview
All within a single conversation thread! Gemini Pro in step 11 knows what was recommended by O3 in step 7! Taking that context and review into consideration to aid with its final pre-commit review.
Think of it as Claude Code for Claude Code. This MCP isn't magic. It's just super-glue.
Remember: Claude stays in full control ā but YOU call the shots. PAL is designed to have Claude engage other models only when needed ā and to follow through with meaningful back-and-forth. You're the one who crafts the powerful prompt that makes Claude bring in Gemini, Flash, O3 ā or fly solo. You're the guide. The prompter. The puppeteer.
You are the AI - Actually Intelligent.
Recommended AI Stack
For best results when using Claude Code:
Sonnet 4.5 - All agentic work and orchestration
Gemini 3.0 Pro OR GPT-5.2 / Pro - Deep thinking, additional code reviews, debugging and validations, pre-commit analysis
For best results when using Codex CLI:
GPT-5.2 Codex Medium - All agentic work and orchestration
Gemini 3.0 Pro OR GPT-5.2-Pro - Deep thinking, additional code reviews, debugging and validations, pre-commit analysis
Quick Start (5 minutes)
Prerequisites: Python 3.10+, Git, uv installed
1. Get API Keys (choose one or more):
OpenRouter - Access multiple models with one API
Gemini - Google's latest models
OpenAI - O3, GPT-5 series
Azure OpenAI - Enterprise deployments of GPT-4o, GPT-4.1, GPT-5 family
X.AI - Grok models
DIAL - Vendor-agnostic model access
Ollama - Local models (free)
2. Install (choose one):
Option A: Clone and Automatic Setup (recommended)
git clone https://github.com/BeehiveInnovations/pal-mcp-server.git
cd pal-mcp-server
# Handles everything: setup, config, API keys from system environment.
# Auto-configures Claude Desktop, Claude Code, Gemini CLI, Codex CLI, Qwen CLI
# Enable / disable additional settings in .env
./run-server.sh Option B: Instant Setup with uvx
// Add to ~/.claude/settings.json or .mcp.json
// Don't forget to add your API keys under env
{
"mcpServers": {
"pal": {
"command": "bash",
"args": ["-c", "for p in $(which uvx 2>/dev/null) $HOME/.local/bin/uvx /opt/homebrew/bin/uvx /usr/local/bin/uvx uvx; do [ -x \"$p\" ] && exec \"$p\" --from git+https://github.com/BeehiveInnovations/pal-mcp-server.git pal-mcp-server; done; echo 'uvx not found' >&2; exit 1"],
"env": {
"PATH": "/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin:~/.local/bin",
"GEMINI_API_KEY": "your-key-here",
"DISABLED_TOOLS": "analyze,refactor,testgen,secaudit,docgen,tracer",
"DEFAULT_MODEL": "auto"
}
}
}
}3. Start Using!
"Use pal to analyze this code for security issues with gemini pro"
"Debug this error with o3 and then get flash to suggest optimizations"
"Plan the migration strategy with pal, get consensus from multiple models"
"clink with cli_name=\"gemini\" role=\"planner\" to draft a phased rollout plan"š Complete Setup Guide with detailed installation, configuration for Gemini / Codex / Qwen, and troubleshooting š Cursor & VS Code Setup for IDE integration instructions šŗ Watch tools in action to see real-world examples
Provider Configuration
PAL activates any provider that has credentials in your .env. See .env.example for deeper customization.
Core Tools
Note: Each tool comes with its own multi-step workflow, parameters, and descriptions that consume valuable context window space even when not in use. To optimize performance, some tools are disabled by default. See Tool Configuration below to enable them.
Collaboration & Planning (Enabled by default)
clink- Bridge requests to external AI CLIs (Gemini planner, codereviewer, etc.)chat- Brainstorm ideas, get second opinions, validate approaches. With capable models (GPT-5.2 Pro, Gemini 3.0 Pro), generates complete code / implementationthinkdeep- Extended reasoning, edge case analysis, alternative perspectivesplanner- Break down complex projects into structured, actionable plansconsensus- Get expert opinions from multiple AI models with stance steering, consulted concurrently in one call
Code Analysis & Quality
debug- Systematic investigation and root cause analysisprecommit- Validate changes before committing, prevent regressionscodereview- Professional reviews with severity levels and actionable feedbackanalyze(disabled by default - enable) - Understand architecture, patterns, dependencies across entire codebases
Development Tools (Disabled by default - enable)
refactor- Intelligent code refactoring with decomposition focustestgen- Comprehensive test generation with edge casessecaudit- Security audits with OWASP Top 10 analysisdocgen- Generate documentation with complexity analysis
Utilities
apilookup- Forces current-year API/SDK documentation lookups in a sub-process (saves tokens within the current context window), prevents outdated training data responseschallenge- Prevent "You're absolutely right!" responses with critical analysistracer(disabled by default - enable) - Static analysis prompts for call-flow mapping
Default Configuration
To optimize context window usage, only essential tools are enabled by default:
Enabled by default:
chat,thinkdeep,planner,consensus- Core collaboration toolscodereview,precommit,debug- Essential code quality toolsapilookup- Rapid API/SDK information lookupchallenge- Critical thinking utility
Disabled by default:
analyze,refactor,testgen,secaudit,docgen,tracer
Enabling Additional Tools
To enable additional tools, remove them from the DISABLED_TOOLS list:
Option 1: Edit your .env file
# Default configuration (from .env.example)
DISABLED_TOOLS=analyze,refactor,testgen,secaudit,docgen,tracer
# To enable specific tools, remove them from the list
# Example: Enable analyze tool
DISABLED_TOOLS=refactor,testgen,secaudit,docgen,tracer
# To enable ALL tools
DISABLED_TOOLS=Option 2: Configure in MCP settings
// In ~/.claude/settings.json or .mcp.json
{
"mcpServers": {
"pal": {
"env": {
// Tool configuration
"DISABLED_TOOLS": "refactor,testgen,secaudit,docgen,tracer",
"DEFAULT_MODEL": "pro",
"DEFAULT_THINKING_MODE_THINKDEEP": "high",
// API configuration
"GEMINI_API_KEY": "your-gemini-key",
"OPENAI_API_KEY": "your-openai-key",
"OPENROUTER_API_KEY": "your-openrouter-key",
// Logging and performance
"LOG_LEVEL": "INFO",
"CONVERSATION_TIMEOUT_HOURS": "6",
"MAX_CONVERSATION_TURNS": "50"
}
}
}
}Option 3: Enable all tools
// Remove or empty the DISABLED_TOOLS to enable everything
{
"mcpServers": {
"pal": {
"env": {
"DISABLED_TOOLS": ""
}
}
}
}Note:
Essential tools (
version,listmodels) cannot be disabledAfter changing tool configuration, restart your Claude session for changes to take effect
Each tool adds to context window usage, so only enable what you need
šŗ Watch Tools In Action
Picking Redis vs Memcached:
Chat Redis or Memcached_web.webm
Multi-turn conversation with continuation:
Multi-model consensus debate:
Pre-commit validation workflow:
Without PAL - outdated APIs:
With PAL - current APIs:
Without PAL:
With PAL:
Key Features
AI Orchestration
Auto model selection - Claude picks the right AI for each task
Multi-model workflows - Chain different models in single conversations
Conversation continuity - Context preserved across tools and models
Context revival - Continue conversations even after context resets
Model Support
Multiple providers - Gemini, OpenAI, Azure, X.AI, OpenRouter, DIAL, Ollama
Latest models - GPT-5, Gemini 3.0 Pro, O3, Grok-4, local Llama
Thinking modes - Control reasoning depth vs cost
Vision support - Analyze images, diagrams, screenshots
Developer Experience
Guided workflows - Systematic investigation prevents rushed analysis
Smart file handling - Auto-expand directories, manage token limits
Web search integration - Access current documentation and best practices
Large prompt support - Bypass MCP's 25K token limit
Example Workflows
Multi-model Code Review:
"Perform a codereview using gemini pro and o3, then use planner to create a fix strategy"ā Claude reviews code systematically ā Consults Gemini Pro ā Gets O3's perspective ā Creates unified action plan
Collaborative Debugging:
"Debug this race condition with max thinking mode, then validate the fix with precommit"ā Deep investigation ā Expert analysis ā Solution implementation ā Pre-commit validation
Architecture Planning:
"Plan our microservices migration, get consensus from pro and o3 on the approach"ā Structured planning ā Multiple expert opinions ā Consensus building ā Implementation roadmap
š Advanced Usage Guide for complex workflows, model configuration, and power-user features
Quick Links
š Documentation
Docs Overview - High-level map of major guides
Getting Started - Complete setup guide
Tools Reference - All tools with examples
Advanced Usage - Power user features
Configuration - Environment variables, restrictions
Adding Providers - Provider-specific setup (OpenAI, Azure, custom gateways)
Model Ranking Guide - How intelligence scores drive auto-mode suggestions
š§ Setup & Support
WSL Setup - Windows users
Troubleshooting - Common issues
Contributing - Code standards, PR process
License
Apache 2.0 License - see LICENSE file for details.
Acknowledgments
Built with the power of Multi-Model AI collaboration š¤
Actual Intelligence by real Humans
Star History
Available Tools
18 toolsanalyzeBRead-only
Performs comprehensive code analysis with systematic investigation and expert validation. Use for architecture, performance, maintainability, and pattern analysis. Guides through structured code review and strategic planning.
Inputs: step (required), model (required), findings (required), step_number (required), +14 more.
apilookupARead-only
Use this tool automatically when you need current API/SDK documentation, latest version info, breaking changes, deprecations, migration guides, or official release notes. This tool searches authoritative sources (official docs, GitHub, package registries) to ensure up-to-date accuracy.
Inputs: prompt (required).
challengeARead-only
Prevents reflexive agreement by forcing critical thinking and reasoned analysis when a statement is challenged. Trigger automatically when a user critically questions, disagrees or appears to push back on earlier answers, and use it manually to sanity-check contentious claims.
Inputs: prompt (required).
chatA
General chat and collaborative thinking partner for brainstorming, development discussion, getting second opinions, and exploring ideas. Use for ideas, validations, questions, and thoughtful explanations.
Inputs: model (required), prompt (required), working_directory_absolute_path (required), images, +4 more.
clinkB
Link a request to an external AI CLI (Gemini CLI, Qwen CLI, etc.) through PAL MCP to reuse their capabilities inside existing workflows.
Inputs: prompt (required), cli_name (required), role, model, +3 more.
codereviewBRead-only
Performs systematic, step-by-step code review with expert validation. Use for comprehensive analysis covering quality, security, performance, and architecture. Guides through structured investigation to ensure thoroughness.
Inputs: step (required), model (required), findings (required), step_number (required), +18 more.
consensusARead-only
Builds multi-model consensus through systematic analysis and structured debate. Use for complex decisions, architectural choices, feature proposals, and technology evaluations. Consults multiple models with different stances to synthesize comprehensive recommendations.
Inputs: step (required), findings (required), step_number (required), total_steps (required), +8 more.
debugARead-only
Performs systematic debugging and root cause analysis for any type of issue. Use for complex bugs, mysterious errors, performance issues, race conditions, memory leaks, and integration problems. Guides through structured investigation with hypothesis testing and expert analysis.
Inputs: step (required), model (required), findings (required), step_number (required), +13 more.
docgenARead-only
Generates comprehensive code documentation with systematic analysis of functions, classes, and complexity. Use for documentation generation, code analysis, complexity assessment, and API documentation. Analyzes code structure and patterns to create thorough documentation.
Inputs: step (required), findings (required), step_number (required), total_steps (required), +12 more.
listmodelsARead-only
Shows which AI model providers are configured, available model names, their aliases and capabilities.
Inputs: no named parameters.
plannerARead-only
Breaks down complex tasks through interactive, sequential planning with revision and branching capabilities. Use for complex project planning, system design, migration strategies, and architectural decisions. Builds plans incrementally with deep reflection for complex scenarios.
Inputs: step (required), model (required), step_number (required), total_steps (required), +9 more.
precommitARead-only
Validates git changes and repository state before committing with systematic analysis. Use for multi-repository validation, security review, change impact assessment, and completeness verification. Guides through structured investigation with expert analysis.
Inputs: step (required), model (required), findings (required), step_number (required), +20 more.
refactorARead-only
Analyzes code for refactoring opportunities with systematic investigation. Use for code smell detection, decomposition planning, modernization, and maintainability improvements. Guides through structured analysis with expert validation.
Inputs: step (required), model (required), findings (required), step_number (required), +16 more.
secauditARead-only
Performs comprehensive security audit with systematic vulnerability assessment. Use for OWASP Top 10 analysis, compliance evaluation, threat modeling, and security architecture review. Guides through structured security investigation with expert validation.
Inputs: step (required), model (required), findings (required), step_number (required), +18 more.
testgenBRead-only
Creates comprehensive test suites with edge case coverage for specific functions, classes, or modules. Analyzes code paths, identifies failure modes, and generates framework-specific tests. Be specific about scope - target particular components rather than testing everything.
Inputs: step (required), model (required), findings (required), step_number (required), +13 more.
thinkdeepARead-only
Performs multi-stage investigation and reasoning for complex problem analysis. Use for architecture decisions, complex bugs, performance challenges, and security analysis. Provides systematic hypothesis testing, evidence-based investigation, and expert validation.
Inputs: step (required), model (required), findings (required), step_number (required), +15 more.
tracerARead-only
Performs systematic code tracing with modes for execution flow or dependency mapping. Use for method execution analysis, call chain tracing, dependency mapping, and architectural understanding. Supports precision mode (execution flow) and dependencies mode (structural relationships).
Inputs: step (required), model (required), findings (required), trace_mode (required), +11 more.
versionARead-only
Get server version, configuration details, and list of available tools.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 18 tools
Many tools have overlapping purposes, particularly among analyze, codereview, debug, thinkdeep, and tracer, which all involve systematic analysis of code. Although each targets a specific aspect (architecture, security, debugging), the boundaries are fuzzy, and agents may struggle to select the appropriate tool for a given task.
Tool names are uniformly lowercase concatenated words (e.g., apilookup, codereview, testgen). While some names are generic (chat, clink), there is a consistent pattern overall. However, the lack of a standard verb_noun prefix (like list_, create_) limits predictability.
With 18 tools, the server is at the upper end of a reasonable scope. All tools seem to serve a distinct purpose, though the overlap among analysis tools suggests some consolidation could be beneficial. The count is appropriate for a comprehensive development assistant.
The tool set covers a wide range of development tasks: analysis, review, debugging, security, documentation, testing, planning, and consensus. However, it lacks tools for executing code, searching code, or direct editing, which are common in such assistants. These gaps are minor given the existing coverage.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoā¦
A Model Context Protocol server for Wix AI tools
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.-
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.12 npm12MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to communicate with each other using Inter-Process Communication, featuring natural language commands and cross-platform compatibility.9132MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables multiple AI agents to share memory, coordinate tasks, and collaborate effectively across IDEs and CLI tools.11 npm21MIT