Dual-Model MCP Server

Dual-Model MCP Server

An MCP server that orchestrates a dual-model workflow using Claude Opus for high-level code generation and Codex for automated code review and bug fixing. It provides tools for framework design, task classification, and quality assurance to optimize software development.

Category
Visit Server

README

Dual-Model MCP Server

代码生成与质量保障系统:Claude Opus 4.6 生成代码,Codex 5.4 审查修复


工作流程

┌─────────────────────┐
│  Claude Opus 4.6    │
│  写复杂代码 + 设计框架 │
└──────────┬──────────┘
           │
           │ 生成代码
           ▼
     ┌──────────┐
     │  完成代码  │
     └──────┬───┘
            │
            │ 审查代码
            ▼
┌─────────────────────┐
│   Codex 5.4         │
│  代码审查 + 修复 bug  │
└─────────────────────┘

MCP 工具

工具 模型 说明
claude_codegen Claude Opus 4.6 生成代码和设计框架
codex_review Codex 5.4 审查代码并修复 bug
classify_task - 判断任务类型
claude_chat Claude Opus 4.6 与 Claude 对话

工具详情

1. claude_codegen - Claude Opus 4.6 生成代码

用途:复杂代码生成和框架设计

输入

  • task (string): 任务描述
  • context (string): 上下文信息
  • language (string): 编程语言(默认 python)
  • requirements (array): 额外需求列表

输出:生成的代码和说明


2. codex_review - Codex 5.4 审查代码

用途:代码审查和 bug 修复

输入

  • code (string): 要审查的代码
  • language (string): 编程语言(默认 python)
  • focus (string): 审查重点(security/performance/bugs/all)

输出:审查结果和修复后的代码


3. classify_task - 判断任务类型

输出

{
  "type": "simple" | "complex",
  "model": "glm-4.7" | "claude-opus-4-6",
  "action": "use_local" | "use_claude",
  "reason": "判断原因",
  "confidence": "high" | "medium"
}

4. claude_chat - 与 Claude 对话

输入

  • message (string): 用户消息
  • system_prompt (string): 系统提示词(可选)

配置

环境变量 (.env)

# Claude API 配置
ANTHROPIC_API_KEY=sk-xxxxx
ANTHROPIC_BASE_URL=https://subrouter.ai
CLAUDE_MODEL=claude-opus-4-6

# Codex API 配置
CODEX_API_KEY=sk-xxxxx
CODEX_BASE_URL=https://subrouter.ai
CODEX_MODEL=codex-5.4

MCP 配置 (.mcp.json)

{
  "mcpServers": {
    "dual-model": {
      "command": "python",
      "args": ["-u", "C:/skewliness/claude-mcp/server.py"],
      "cwd": "C:/skewliness/claude-mcp",
      "env": {
        "ANTHROPIC_API_KEY": "sk-xxxxx",
        "CLAUDE_MODEL": "claude-opus-4-6",
        "CODEX_API_KEY": "sk-xxxxx",
        "CODEX_MODEL": "codex-5.4"
      }
    }
  }
}

使用示例

完整工作流程

1. 用户请求:"实现一个用户认证系统"
   ↓
2. 调用 claude_codegen (Claude Opus 4.6)
   ↓
3. 生成代码:
   - FastAPI 框架
   - JWT 认证
   - 密码加密
   ↓
4. 调用 codex_review (Codex 5.4)
   ↓
5. 审查并修复:
   - 检查安全漏洞
   - 修复 bug
   - 性能优化
   ↓
6. 输出最终代码

安装

cd C:/skewliness/claude-mcp
pip install -r requirements.txt

启动

python server.py

依赖

anthropic
python-dotenv
mcp

注意事项

  1. API Key 安全:不要把 .env 文件提交到 Git
  2. 成本控制:Claude Opus 4.6 和 Codex 5.4 按使用量计费
  3. 网络要求:需要能访问 API 代理 (https://subrouter.ai/register?aff=dRgW)

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured