| name | multi-llm-mcp-server |
| description | MCP server enabling Claude Code to orchestrate Codex CLI and query multiple LLMs (GPT, Kimi, DeepSeek, Qwen) in parallel |
| triggers | ["ask multiple AI models the same question","use Codex CLI to modify my project files","compare responses from different LLMs","let Codex analyze my codebase","query GPT, Kimi, and DeepSeek simultaneously","check what LLM providers are configured","run Codex in read-only sandbox mode","maintain a conversation session with a specific model"] |
multi-llm-mcp-server
Skill by ara.so — MCP Skills collection.
An MCP server that enables Claude Code to delegate tasks to Codex CLI and query multiple LLM providers (GPT, Kimi, DeepSeek, Qwen, Claude) in parallel or individually. Built on FastMCP, it solves two key problems: (1) letting Claude Code offload work to Codex CLI, and (2) querying multiple models simultaneously for comparison and cross-referencing.
Installation
Prerequisites
pip install fastmcp openai
Environment Variables
Configure API keys for the models you want to use:
setx OPENAI_API_KEY "your-key"
setx DEEPSEEK_API_KEY "your-key"
setx MOONSHOT_API_KEY "your-key"
setx DASHSCOPE_API_KEY "your-key"
setx ANTHROPIC_API_KEY "your-key"
export OPENAI_API_KEY="your-key"
export DEEPSEEK_API_KEY="your-key"
export MOONSHOT_API_KEY="your-key"
export DASHSCOPE_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"
MCP Configuration
Add to Claude Code:
claude mcp add --scope user llm-mix -- python /absolute/path/to/LLM_MIX.py
claude mcp add --scope user llm-mix -- "C:\Python310\python.exe" "C:\Projects\multi-llm-mcp\LLM_MIX.py"
claude mcp list
Available Tools
| Tool | Purpose |
|---|
ask | Query a single model with session support |
ask_many | Query multiple models in parallel |
wait_many | Poll for multi-model job completion |
review | Have multiple models analyze the same content |
ask_codex | Execute tasks via Codex CLI |
wait_codex | Poll for Codex job completion |
clear_session | Clear a specific conversation session |
clear_all_sessions | Clear all sessions |
list_sessions | View active sessions |
health_check | Check server status and configured providers |
Core Usage Patterns
1. Health Check
Always start by checking what's configured:
health_check()
{
"status": "healthy",
"codex_available": true,
"configured_models": ["gpt", "deepseek", "kimi", "qwen"],
"missing_keys": ["ANTHROPIC_API_KEY"]
}
2. Single Model Query with Session
ask(
model="deepseek",
prompt="Explain dependency injection in Python",
session_id="di-tutorial"
)
ask(
model="deepseek",
prompt="Show me a FastAPI example",
session_id="di-tutorial"
)
clear_session(session_id="di-tutorial")
3. Multi-Model Parallel Query
result = ask_many(
models=["gpt", "deepseek", "kimi", "qwen"],
prompt="What are the trade-offs between monorepo and polyrepo?"
)
if result["status"] == "running":
wait_many(job_id=result["job_id"])
{
"success": true,
"status": "completed",
"responses": {
"gpt": "Monorepos provide...",
"deepseek": "The main trade-offs...",
"kimi": "Let me break this down...",
"qwen": "From an architectural perspective..."
}
}
4. Multi-Model Review
review(
models=["gpt", "deepseek"],
content="""
def process_data(items):
result = []
for i in items:
if i > 0:
result.append(i * 2)
return result
""",
instruction="Review this code for performance and readability"
)
5. Codex CLI Integration
ask_codex(
sandbox_mode="read-only",
prompt="Analyze the project structure and list all Python modules"
)
ask_codex(
sandbox_mode="workspace-write",
prompt="Refactor the authentication module to use async/await"
)
ask_codex(
sandbox_mode="danger-full-access",
prompt="Install dependencies and run tests"
)
result = ask_codex(
sandbox_mode="workspace-write",
prompt="Migrate all print statements to logging"
)
if result["status"] == "running":
wait_codex(job_id=result["job_id"])
Configuration Details
Model Providers
The server supports these providers out of the box:
"gpt"
"deepseek"
"kimi"
"qwen"
"claude"
Enabling Claude Provider
By default, Claude is commented out. To enable:
- Edit
LLM_MIX.py and uncomment the claude block in PROVIDERS
- Add
"claude" to the ModelName literal type
- Set
ANTHROPIC_API_KEY environment variable
- Restart the MCP server
Codex Sandbox Modes
Common Workflows
Compare Framework Recommendations
ask_many(
models=["gpt", "deepseek", "kimi"],
prompt="Should I use FastAPI or Flask for a microservices API with heavy async I/O?"
)
Code Review by Multiple Models
review(
models=["gpt", "deepseek"],
content=open("src/payment_processor.py").read(),
instruction="Review for security vulnerabilities and suggest improvements"
)
Iterative Development with Codex
ask_codex(
sandbox_mode="read-only",
prompt="Find all TODO comments in the codebase"
)
ask_codex(
sandbox_mode="workspace-write",
prompt="Implement the authentication TODO in auth.py using JWT"
)
ask_codex(
sandbox_mode="workspace-write",
prompt="Write unit tests for the new JWT authentication"
)
Session Management for Complex Queries
ask(
model="gpt",
prompt="I'm designing a rate limiter. What algorithms should I consider?",
session_id="ratelimit-design"
)
ask(
model="gpt",
prompt="How would token bucket work with Redis?",
session_id="ratelimit-design"
)
ask(
model="gpt",
prompt="Show me Python implementation",
session_id="ratelimit-design"
)
clear_session(session_id="ratelimit-design")
Troubleshooting
Tool Not Found in Claude Code
claude mcp list
which python
where python
claude mcp add --scope user llm-mix -- /usr/bin/python3 /path/to/LLM_MIX.py
Codex Authentication Failure
codex
Model API Key Not Detected
health_check()
echo $OPENAI_API_KEY
echo %OPENAI_API_KEY%
Long-Running Task Timeout
result = ask_codex(sandbox_mode="workspace-write", prompt="Large refactor")
if result["status"] == "running":
wait_codex(job_id=result["job_id"])
result = ask_many(models=["gpt", "deepseek", "kimi"], prompt="Complex question")
if result["status"] == "running":
wait_many(job_id=result["job_id"])
Session Accumulation
list_sessions()
clear_session(session_id="old-conversation")
clear_all_sessions()
Best Practices
- Start with
health_check to verify configuration before complex workflows
- Use read-only mode first when exploring codebases with Codex
- Session IDs should be descriptive:
"auth-refactor" not "session1"
- Multi-model queries are best for subjective or complex design questions
- Single model sessions are best for iterative, context-dependent conversations
- Always clear sessions when switching topics to avoid context pollution
- Poll long jobs with
wait_* tools instead of making the same request twice
Examples in Practice
Architectural Decision
ask_many(
models=["gpt", "deepseek", "qwen"],
prompt="""
I'm building a real-time collaborative editor.
Should I use Operational Transform, CRDT, or a hybrid approach?
Consider: 10k concurrent users, sub-100ms latency requirement, mobile clients.
"""
)
Refactoring Workflow
ask_codex(
sandbox_mode="read-only",
prompt="Explain the architecture of the user service module"
)
ask(
model="deepseek",
prompt="How should I refactor this to support OAuth2 and SAML?",
session_id="auth-refactor"
)
ask_codex(
sandbox_mode="workspace-write",
prompt="Refactor user service to support OAuth2, following the plan from previous conversation"
)
review(
models=["gpt", "deepseek"],
content="<paste new code>",
instruction="Check for security issues and edge cases"
)