This is a fork of the original pal-mcp-server (originally aka zen-mcp-server) by BeehiveInnovations. I found this tool quite useful, and have it deeply integrated within my claude-toolbox. It does, however, appear to be unmaintained (a not unexpected outcome in today's ultra-fast-paced software development world), with even the most critical issues not addressed for months. So I decided to fork and maintain my own version, building upon the existing foundation, fixing outstanding issues, and eventually bringing in more features and improvements.
The power of ClaudeCode / AntigravityCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Estrelas
7
Ferramentas
—
Disponibilidade
—
Your AI's PAL – a Provider Abstraction Layer
Formerly known as Zen MCP
With multiple models within a single prompt:
Gemini · OpenAI · Anthropic · Grok · Azure · Ollama · OpenRouter · DIAL · On-Device Model
[!IMPORTANT]
This project is maintained with the help of Claude-Code. Is it, however, reviewed, tested, and reworked with a human-in-the-loop.
No AI slop here. Purely AI-made<->AI-consumed tooling is hot garbage, and that's putting it mildly.
That said, if you have any problems with code that is written by AI - you've been warned. But, then again, why would you be interested in an AI-related tool in the first place... ¯\_(ツ)_/¯
🆕 Now with CLI-to-CLI Bridge
The new clink (CLI + Link) tool connects external AI CLIs 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 prompts
Full CLI Capabilities - Web search, file inspection, MCP tool access, latest documentation lookups
Bounded Continuity - Continue with a PAL conversation ID; clink forwards the newest complete exchanges that fit the selected CLI's history budget
No PAL provider key required: use an installed, authenticated CLI for ongoing conversations through clink. PAL starts without model providers and retains available independent tools. See CLI-only setup and first-request/follow-up examples.
Antigravity: check native agy --version (reference: 1.3.5) and authenticate outside PAL. Use cli_name=agy with default, planner, or codereviewer; follow-ups use PAL's continuation ID. False inherits saved permissions and may allow writes; true requests --mode accept-edits, and path-scoped edits are unsupported. Scratch-mode project access may require operator-managed Non-Workspace Access. Google does not support consumer-plan agy wrappers; see setup, authentication coverage, and upstream limits. Final release acceptance remains pending.
# 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
# Existing agy login; native permissions still apply
clink with agy codereviewer to review /absolute/path/to/project/module.py
# Continue using the returned PAL continuation ID; no native agy session reuse
# With PAL API providers configured: consensus → bounded CLI handoff
Use consensus with gpt-5 and gemini-pro to decide: dark mode or offline support next
Continue with clink cli_name=gemini allow_edits=true - implement the recommended feature
# Supply the PAL continuation ID; edit permission must be explicit on every call
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 codereview
This triggers a codereview workflow where Claude walks the code, looking for all kinds of issues
After multiple passes, collects relevant code and makes note of issues along the way
Maintains a confidence level between exploring, low, medium, high and certain to track how confidently it's been able to find and identify issues
Generates a detailed list of critical -> low issues
Shares the relevant files, findings, etc with Gemini Pro to perform a deep dive for a second codereview
Comes 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 planner workflow to break the work down into simpler steps if a major refactor is required
Claude then performs the actual work of fixing highlighted issues
When done, Claude returns to Gemini Pro for a precommit review
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.
CLI conversations: install and authenticate Codex, Claude Code, Gemini CLI, or Antigravity, then use clink. Leave PAL model-provider keys/endpoints unconfigured for provider-free mode. Follow local CLI setup and the agy-specific support limits when applicable.
API-backed tools: configure a provider for chat, consensus, codereview, and other model-backed workflows. Choose one or more below; a local endpoint may not need a key.
// Add to ~/.claude/settings.json or .mcp.json
// API-backed example: for provider-free clink, omit GEMINI_API_KEY
{
"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/serpro69/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!
For CLI conversations, ask your client to call clink:
{"cli_name": "codex", "prompt": "Remember the codeword ORCHID-42."}
Then follow up with the returned ID:
{"continuation_id": "<continuation_offer.continuation_id>", "prompt": "What codeword did I give you?"}
Use your installed CLI's name on the first request; the follow-up inherits the successful CLI/role. Edits default off on each call. History defaults to 16,384 estimated tokens and 50 stored messages, expires after three hours without a successful recorded exchange, and is lost on restart. Permissions, limits, and failure handling explain busy retries, missing executables, and replies that could not be recorded. CLI failures do not fall back to an API provider.
With API providers configured, you can also use these workflows:
"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"
PAL determines its mode at startup from successfully configured model providers. Configure provider settings in .env or the launch environment for API-backed tools; custom/local endpoints can work without a key. See .env.example for customization. Restart PAL after changes.
Without registered model providers, PAL exposes the enabled subset of clink, version, listmodels, planner, tracer, docgen, challenge, apilookup, and jules (which needs its own service credentials). listmodels reports setup hints and CLI executable observations with authentication unverified. API-backed tools are unavailable until a provider is configured. PAL does not manage CLI login or guarantee subscription billing; see vendor authentication guidance.
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 / implementation
thinkdeep - Extended reasoning, edge case analysis, alternative perspectives
planner - Break down complex projects into structured, actionable plans
consensus - Get expert opinions from multiple AI models with stance steering
Code Analysis & Quality
debug - Systematic investigation and root cause analysis
precommit - Validate changes before committing, prevent regressions
codereview - Professional reviews with severity levels and actionable feedback
analyze(disabled by default - enable) - Understand architecture, patterns, dependencies across entire codebases
refactor - Intelligent code refactoring with decomposition focus
testgen - Comprehensive test generation with edge cases
secaudit - Security audits with OWASP Top 10 analysis
docgen - 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 responses
challenge - Prevent "You're absolutely right!" responses with critical analysis
tracer(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:
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=
Apache 2.0 License - see LICENSE file for details.
Existing project attribution is preserved in NOTICE. Source and wheel
distributions include both files and declare the Apache-2.0 SPDX identifier.
Acknowledgments
Built with the power of Multi-Model AI collaboration 🤝
The power of ClaudeCode / AntigravityCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Perguntas
Como instalo Pal?
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Pal precisa de uma chave de API?
Este registro não lista nenhuma variável de ambiente obrigatória.
Qual transporte Pal usa?
Pal roda localmente via stdio.
Quando Pal foi verificado pela última vez?
Última verificação: 2026-11-09. The power of ClaudeCode / AntigravityCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.