Skip to main content
Glama
skewliness
by skewliness

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)

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/skewliness/claude-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server