claude-additional-models-mcp 标志

claude-additional-models-mcp

社区
Arkya-AI

Reduce Claude Desktop consumption by 10x - Integrate Google's Gemini or Z.ai's GLM-5 (744B params) with Claude via MCP for intelligent task delegation

发布者Arkya-AI
代码仓库claude-additional-models-mcp
语言JavaScript
复刻数
8
星标数
46
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    claude-additional-models-mcp 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 46 个星标和 8 个复刻。

claude-additional-models-mcp

MCP Compatible MIT License Version PRs Welcome

Break the Claude Pro wall. Offload heavy lifting to Gemini 3.x and GLM-5 via MCP while Claude orchestrates. Reduce consumption by 10x.


The Problem: The "Claude Pro Wall"

Claude Pro users paying $20/month and even those paying $ 100 per month frequently encounter a frustrating reality:

The 28% Availability Math

Most power users exhaust their weekly message limits in approximately 2 days. This leaves them blocked for the remaining 5 days of the week. You are effectively paying for a service that is unavailable 71% of the time -- $100/month for 28% availability unable to do heavy work. This creates a scarcity mindset where users hesitate to use Claude for complex tasks, fearing they will run out of limits before the week resets.

The Sonnet 4.5 Degradation

Since the release of Claude 4.6, multiple users have reported noticeable performance degradation in Sonnet 4.5. When Sonnet 4.5 is forced to handle orchestration, file I/O, and heavy code generation simultaneously, reasoning quality drops. It begins to lose track of project structure, hallucinate file paths, or forget earlier instructions mid-session.

This MCP approach specifically helps Sonnet 4.5 users by offloading heavy analysis and code generation to capable external models, letting Sonnet focus on what it does best: orchestration and file I/O. The result is superior work output from Sonnet 4.5 compared to making it do everything itself.

The Opus 4.6 Cost Barrier

Opus 4.6 remains the gold standard for intelligence, but its consumption rate is punishing -- 3-5x higher than Sonnet. On the Pro plan, using Opus for documentation reading, boilerplate generation, or routine analysis burns through your weekly allocation at an alarming rate.

By delegating heavy work to external models, you get Opus-quality orchestration and Parallel Agents with 80% to 90%+ reduction in consumption.


The Solution

claude-additional-models-mcp is a production-ready Model Context Protocol (MCP) server that integrates external AI models directly into Claude Desktop. Instead of Claude doing everything itself, it delegates heavy computational work to specialized external models and focuses on what it does best: orchestration, file management, and final synthesis.

The result:

User TypeBenefitImprovement
Sonnet 4.5Superior output quality via offloading10x consumption reduction
Opus 4.6Cost control with full capability80%+ consumption reduction
All UsersExtended Pro subscription value18-30x ROI

What's New in v2.0: Gemini Integration

While the original GLM-5 (Z.ai) integration offers a massive 744B parameter model with strong reasoning, we observed frequent interruptions and timeouts during long-running delegated tasks. Sessions would break mid-generation, forcing users to retry and wasting both time and tokens.

v2.0 introduces Google Gemini 3.x as the recommended integration:

FeatureGLM-5 (Z.ai)Gemini 3.x (Google)
StabilityOccasional interruptionsRock-solid uptime
Context WindowStandard1M tokens
Max Output4,000 tokens65,000 tokens
Free TierNoYes (generous limits)
Search GroundingVia separate APINative (google_search)
StatusOriginal (v1.0)Recommended (v2.0)

Both integrations remain fully supported. Choose based on your needs.


How It Works

The MCP Protocol

The Model Context Protocol allows Claude Desktop to discover and execute tools provided by a local server. This MCP server acts as a bridge: Claude calls a tool (e.g., ask_gemini_pro), the server forwards the request to the external model's API, and returns the result to Claude.

Claude never needs to "think through" the heavy content. It sends the task, receives the output, and writes it to disk.

Hybrid API Architecture (Gemini)

The Gemini integration uses a dual-path communication strategy for maximum capability:

  1. OpenAI-Compatible Path (generativelanguage.googleapis.com/v1beta/openai/): Used for standard chat completions -- ask_gemini and ask_gemini_pro tool calls.
  2. Native Google API Path (generativelanguage.googleapis.com/v1beta): Used for advanced features like search grounding (web_search) and URL context (web_reader). These features are not available through the OpenAI-compatible interface.

Tool Discovery

When Claude Desktop starts, it reads claude_desktop_config.json, launches the MCP server as a child process, and queries it for available tools. The tools then appear in Claude's interface alongside its built-in capabilities.


Quick Start: Gemini (Recommended)

1. Get a Google API Key

  1. Visit Google AI Studio
  2. Click "Create API Key"
  3. Copy your key -- the free tier provides generous rate limits

2. Clone and Install

bash
git clone https://github.com/Arkya-AI/claude-additional-models-mcp.git
cd claude-additional-models-mcp/gemini
npm install

3. Configure Claude Desktop

Open your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the Gemini MCP server:

json
{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/absolute/path/to/claude-additional-models-mcp/gemini/index.js"],
      "env": {
        "GOOGLE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Important: Replace /absolute/path/to/ with the actual path where you cloned the repo.

4. Restart Claude Desktop

Quit Claude Desktop completely (from the menu bar, not just closing the window) and relaunch it.

5. Verify It Works

  1. Look for the tools icon in the bottom-right of the Claude input box
  2. Ask Claude: "What tools do you have access to?" -- it should list ask_gemini, ask_gemini_pro, web_search, web_reader, and parse_document
  3. Test: "Use Gemini to explain the difference between TCP and UDP" -- you should see a tool call animation followed by the response

Quick Start: GLM-5 (Z.ai)

1. Get a Z.ai API Key

  1. Visit Z.ai and create an account
  2. Navigate to API Keys
  3. Create and copy your API key

2. Install

bash
git clone https://github.com/Arkya-AI/claude-additional-models-mcp.git
cd claude-additional-models-mcp
npm install

3. Configure Claude Desktop

json
{
  "mcpServers": {
    "glm5": {
      "command": "node",
      "args": ["/absolute/path/to/claude-additional-models-mcp/index.js"],
      "env": {
        "ZAI_API_KEY": "your-api-key-here"
      }
    }
  }
}

4. Restart and Verify

Same process as Gemini above. Tools will be named ask_glm5, ask_glm5_pro, etc.


Available Tools

Both integrations expose the same 5-tool interface. The tool names differ by prefix (ask_gemini vs ask_glm5).

Core AI Tools

ToolDescriptionKey ParametersDefault Max Tokens
ask_gemini / ask_glm5General analysis, synthesis, summarizationprompt (required), system_prompt, temperature, max_tokens8192 / 4000
ask_gemini_pro / ask_glm5_proCode generation, complex reasoning, architectureprompt (required), system_prompt, temperature, max_tokens16384 / 4000

Research and Intelligence Tools

ToolDescriptionKey Parameters
web_searchReal-time web search with groundingsearch_query (required), count (1-50), search_recency_filter, search_domain_filter
web_readerFetch and parse full web page contenturl (required), return_format (markdown/text), with_images_summary, with_links_summary
parse_documentExtract text from PDFs and images via OCRfile_url (required), return_format (markdown/text), parse_mode (auto/ocr/layout)

Usage Strategy: The 3-Tier Execution Priority

To maximize efficiency, Claude is instructed (via CLAUDE.md) to follow this execution hierarchy for every task:

Priority 1: Spawn Parallel Sub-Agents (Fastest Path)

When facing a task with multiple independent parts, Claude spawns sub-agents that each independently call the external model. This is the fastest execution path and must be preferred over sequential calls.

Example: Writing a full-stack feature -- Sub-agent A generates the backend via ask_gemini_pro, Sub-agent B generates the frontend, Sub-agent C generates the tests. All run in parallel.

Priority 2: Direct Delegation (Single-Unit Tasks)

For tasks that cannot be parallelized, Claude sends the entire prompt directly to the external model.

Example: "Analyze this codebase and explain the authentication flow" -- a single ask_gemini_pro call.

Priority 3: Claude Does It Itself (Last Resort)

Claude should only perform work internally when:

  • Orchestrating tool calls and sub-agents
  • Performing file I/O (reading/writing to disk)
  • Providing responses under 100 words
  • Applying final client-facing polish to delegated content

Orchestration Model

Claude (Parent)
    |-- Planning & coordination (stays in Claude)
    |-- File operations & disk I/O (stays in Claude)
    |-- Quick responses <100 words (stays in Claude)
    |
    |-- PRIORITY 1: Spawn parallel sub-agents (for multi-part tasks)
    |    \-- Each sub-agent uses external model for code/analysis
    |         |-- ask_[model]_pro for code generation
    |         |-- ask_[model] for analysis/docs
    |         \-- Sub-agent writes output to disk
    |
    \-- PRIORITY 2: Delegate to external model directly (for single-unit tasks)
         |-- Analysis >300 words
         |-- Code generation >50 lines
         |-- Research synthesis from multiple sources
         \-- Document processing & OCR

Sub-Agent Enforcement

The CLAUDE.md file in this repository acts as a "constitution" for all Claude sessions. It enforces that sub-agents must also delegate to the external model -- they cannot generate large content blocks themselves.

The pattern: External model generates content -> Claude/sub-agent writes output to disk.

Any sub-agent that generates >50 lines of code or >300 words of content without delegating to the external model is violating the delegation rules.


Model-Specific Strategies

Sonnet 4.5: The Orchestrator

Sonnet 4.5 excels at following complex instructions, managing project structure, and coordinating multi-step workflows. Its degradation occurs when it is forced to also do the heavy lifting.

TaskSonnet HandlesExternal Model Handles
Project structure decisionsYes--
File read/write operationsYes--
Final code integrationYes--
Code generation (>50 lines)--ask_[model]_pro
Analysis and documentation (>300 words)--ask_[model]
Web research--web_search + web_reader
Document processing--parse_document

Result: Sonnet becomes a lean orchestrator. Output quality increases because it is no longer context-overloaded.

Opus 4.6: The Architect

Opus should function as the strategic decision-maker, not the laborer.

TaskOpus HandlesExternal Model Handles
Architectural decisionsYes--
Complex multi-step coordinationYes--
Security and logic reviewYes--
Boilerplate and CRUD code--ask_[model]_pro
First drafts of any content--ask_[model]
Data processing and comparison--ask_[model]
Research and intelligence--web_search + web_reader + ask_[model]

Result: 90%+ reduction in Opus consumption. You get Opus-level orchestration at Sonnet-level cost.


Consumption Optimization Rules

Four critical rules to ensure delegation is working:

1. Never Synthesize in Claude What the External Model Can Do

  • Bad: Claude reads 5 competitor websites and writes a 2,000-word analysis
  • Good: web_search -> web_reader -> ask_gemini synthesizes -> Claude presents the result

2. Delegate All Multi-Document Analysis

  • Bad: Claude analyzes 3 PDFs and compares them
  • Good: parse_document x3 -> ask_gemini comparison -> Claude formats output

3. Use External Model for First Drafts, Claude for Polish

  • Bad: Claude generates an entire proposal section from scratch
  • Good: ask_gemini generates the content -> Claude adapts to the project voice -> writes to disk

4. Parallel Delegation When Possible

  • Parse multiple documents simultaneously
  • Read multiple web sources in parallel
  • Then aggregate with a single ask_gemini call

Expected Savings

Before vs. After: Token Consumption

Competitive Analysis Task

StepClaude-OnlyWith MCP
Research3,000 Claude tokens200 tokens (web_search)
Read sources10,000 Claude tokens1,500 tokens (web_reader)
Analysis8,000 Claude tokens6,000 tokens (ask_gemini)
Claude total21,000 tokens800 tokens
Reduction--96%

Code Generation Task

StepClaude-OnlyWith MCP
Architecture design2,000 Claude tokens300 Claude tokens (orchestration)
Implementation8,000 Claude tokens5,000 tokens (ask_gemini_pro)
Tests4,000 Claude tokens3,000 tokens (ask_gemini_pro)
Claude total14,000 tokens500 tokens
Reduction--96%

Document Analysis Task

StepClaude-OnlyWith MCP
Read PDF5,000 Claude tokens0 (parse_document)
Extract key terms3,000 Claude tokens4,000 tokens (ask_gemini)
Summary2,000 Claude tokens--
Claude total10,000 tokens300 tokens
Reduction--97%

Overall Impact

MetricBefore MCPAfter MCP
Claude Pro exhaustion~2 days14+ days
Sonnet 4.5 output qualityDegraded under loadSuperior (orchestration-only)
Opus 4.6 consumption100%<10%
Effective ROI on Pro subscription1x18-30x

Real-World Workflows

Research Pipeline

1. Claude receives: "Research the current state of edge AI deployment"
2. Claude calls web_search("edge AI deployment trends 2025", count=30)
3. Claude calls web_reader() on the top 5 URLs (parallel)
4. Claude calls ask_gemini("Synthesize these sources into a 2000-word report
   covering: key trends, major players, deployment challenges, and outlook")
5. Claude writes the report to research-output.md
6. Claude presents a 3-sentence summary to the user

Total Claude consumption: ~800 tokens (orchestration + file I/O)

Code Generation Pipeline

1. Claude receives: "Build a FastAPI backend with user auth and CRUD endpoints"
2. Claude calls ask_gemini_pro("Generate SQLAlchemy models and Pydantic schemas
   for a user authentication system with roles and permissions")
3. Claude writes models.py to disk
4. Claude calls ask_gemini_pro("Generate FastAPI CRUD routes for these models: [models]")
5. Claude writes routes.py to disk
6. Claude runs tests locally

Total Claude consumption: ~500 tokens (orchestration + file I/O)

Project Structure

claude-additional-models-mcp/
├── index.js              # GLM-5 MCP server (Z.ai 744B model)
├── package.json          # Root dependencies (@modelcontextprotocol/sdk, node-fetch)
├── gemini/
│   ├── index.js          # Gemini 3.x MCP server (hybrid API approach)
│   └── package.json      # Gemini dependencies (@modelcontextprotocol/sdk, openai)
├── CLAUDE.md             # GLM-5 delegation rules (root-level)
├── gemini/CLAUDE.md      # Gemini delegation rules
├── EXAMPLES.md           # Real-world usage examples and templates
├── CONTRIBUTING.md       # Contribution guidelines
├── LICENSE               # MIT License
├── .github/              # GitHub issue/PR templates
└── .gitignore

npm scripts:

bash
npm run start:glm5    # Start GLM-5 server
npm run start:gemini  # Start Gemini server

Troubleshooting

Tools Not Appearing in Claude Desktop

  1. Check config syntax: Validate claude_desktop_config.json with a JSON linter. A single trailing comma will break it.
  2. Verify absolute path: The path to index.js must be absolute, not relative.
  3. Full restart: Quit Claude Desktop from the menu bar (not just closing the window) and relaunch.
  4. Check server manually: Run node /path/to/gemini/index.js in a terminal. If it errors, the issue is in the server setup.

Empty Responses

  1. Verify API key: Ensure your GOOGLE_API_KEY or ZAI_API_KEY is valid and active.
  2. Increase max_tokens: Try setting max_tokens to 16384 for Gemini or 4000 for GLM-5.
  3. Lower temperature: For analytical tasks, use temperature 0.3-0.5 for more deterministic output.

Rate Limit Errors (429)

  1. Free tier limits (Gemini): 15 RPM for Flash, 5 RPM for Pro. Wait and retry.
  2. Upgrade for higher limits: Visit Google AI Studio to check your tier.
  3. GLM-5 limits: Check your Z.ai dashboard for remaining credits.

Model Not Found Errors

  1. Ensure you are using the correct environment variable names: GOOGLE_API_KEY for Gemini, ZAI_API_KEY for GLM-5.
  2. The server handles model selection internally. Do not override model names in the config.

GLM-5 Interruptions

GLM-5 can experience timeouts during peak hours or with very long prompts. If reliability is critical, switch to the Gemini integration.

High Claude Consumption Despite Delegation

Audit checklist:

  • Are you letting Claude do analysis that should go to ask_gemini?
  • Are you reading web content in Claude instead of using web_reader?
  • Are you generating code in Claude instead of ask_gemini_pro?
  • Are you processing PDFs in Claude instead of parse_document?
  • Are sub-agents generating content themselves instead of delegating?

Expected token patterns per task:

  • Research task: Claude 800-2,000 tokens
  • Code generation: Claude 500-1,000 tokens
  • Proposal writing: Claude 1,500-3,000 tokens

If Claude consumption exceeds 3,000 tokens on analytical work, delegation is not optimized.


Roadmap

  • DeepSeek-V3 integration
  • Local LLM fallback via Ollama for offline delegation
  • Streaming support for real-time tool outputs
  • Image/vision delegation support
  • Automated cost-tracking dashboard
  • Response caching for repeated queries
  • Configuration UI for managing multiple model backends
  • Pre-built prompt templates for common workflows

Contributing

Contributions are welcome! Whether it is adding a new model provider, optimizing the sub-agent delegation prompts, or improving error handling, please see CONTRIBUTING.md for guidelines.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Acknowledgments

  • Anthropic for Claude and the Model Context Protocol
  • Z.ai for GLM-5 API access
  • Google for the Gemini 3.x API and generous developer tiers
  • The MCP community for the protocol specification

Links


Built by Arkya AI to make Claude truly limitless.

安装

TypingMind
{
  "mcpServers": {
    "claude-additional-models-mcp": {
      "command": "node",
      "args": [
        "gemini/index.js"
      ],
      "env": {
        "GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
      }
    }
  }
}

将 claude-additional-models-mcp MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 claude-additional-models-mcp 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 claude-additional-models-mcp 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 claude-additional-models-mcp MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "claude-additional-models-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "claude-additional-models-mcp"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 claude-additional-models-mcp MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 claude-additional-models-mcp MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 claude-additional-models-mcp 帮我完成这项任务吗?
claude-additional-models-mcp
当然,我看过了。
以下是我使用 claude-additional-models-mcp 得到的结果。

常见问题

claude-additional-models-mcp MCP 服务器有什么用途?

claude-additional-models-mcp 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 claude-additional-models-mcp MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 claude-additional-models-mcp。

为什么在 TypingMind 中使用 claude-additional-models-mcp MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 claude-additional-models-mcp 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 claude-additional-models-mcp MCP 连接到 TypingMind?

claude-additional-models-mcp 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

claude-additional-models-mcp MCP 在 TypingMind 中提供哪些工具?

claude-additional-models-mcp 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 claude-additional-models-mcp MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 claude-additional-models-mcp 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇