claude-bridge-server
An MCP server that enables collaboration between Claude Code and Z.ai's GLM models — use Claude Opus for planning while GLM handles implementation.
README
Claude Bridge
An MCP server that enables collaboration between Claude Code and Z.ai's GLM models — use Claude Opus for planning while GLM handles implementation.
Combine the strengths of Claude Code and Z.ai's GLM in one workflow. This MCP server lets Opus handle high-level planning while GLM tackles implementation — coordinated through a shared task queue, running simultaneously in separate terminals. Run Claude Code with your Max subscription or API for architecture, and Claude Code with Z.ai (GLM) for execution — both working together at the same time.
Why This Exists
You have a Claude subscription but you're hitting limits. Getting a second Claude subscription is pricey (or upgrading might be too expensive) — but a Z.ai subscription costs less and GLM codes just as well as Sonnet.
The question: How do you make Claude and GLM work together?
The answer: Claude Bridge. An MCP server that coordinates both through a shared task queue.
┌─────────────────────────┐ ┌─────────────────────────┐
│ Terminal 1 │ │ Terminal 2 │
│ Claude Opus │ │ Z.ai GLM │
│ (Architect) │ │ (Executor) │
│ │ Claude Bridge │ │
│ • Plans features │◄──────────────────►│ • Pulls tasks │
│ • Designs architecture│ (Shared Queue) │ • Writes code │
│ • Makes decisions │ │ • Reports back │
└─────────────────────────┘ └─────────────────────────┘
Quick Example
Terminal 1 (Opus): "Push a task to implement JWT authentication"
Terminal 2 (GLM): "Pull the next task" → implements → "Complete the task"
Terminal 1: "What did the executor complete?" → reviews results
Features
- Task Queue — Priority-based with dependencies and categories
- Shared State — Project focus and decisions visible to both
- Session Context — Resume where you left off
- Clarifications — Executor asks questions, Architect responds
- Token-Conscious — Designed to minimize Opus usage
When NOT to Use This
If you're using a planning framework like Get-Shit-Done (GSD), you don't need this bridge. Frameworks like GSD store context in project files (.planning/) that both terminals can read directly. Slash commands like /gsd:plan-phase and /gsd:execute-phase work in any terminal.
Use Claude Bridge for:
- Ad-hoc tasks, quick fixes, one-off research
- Projects without a planning framework
- Session continuity across restarts
Skip the bridge if:
- Using GSD or similar file-based planning frameworks
- Both terminals share the project filesystem
Prerequisites
- Node.js 18+ — Download
- Claude Code CLI — Installation
- Z.ai account — For GLM access (z.ai)
- Two terminal windows
Terminal Profile Setup
Same subscription in both terminals? Just run claude in each — no profile setup needed.
Claude + Z.ai GLM? Add this function to your shell profile:
Windows PowerShell (notepad $PROFILE):
function use-glm {
$env:ANTHROPIC_BASE_URL = "https://api.z.ai/api/anthropic"
$env:ANTHROPIC_AUTH_TOKEN = "your_zai_api_key_here"
Write-Host ">>> GLM ACTIVE (Executor mode)" -ForegroundColor Cyan
}
macOS/Linux (~/.bashrc or ~/.zshrc):
use-glm() {
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="your_zai_api_key_here"
echo ">>> GLM ACTIVE (Executor mode)"
}
Usage:
- Terminal 1: Just run
claude(uses your Claude subscription) - Terminal 2: Run
use-glm, thenclaude(uses Z.ai API)
See GUIDE.md for complete setup details.
Quick Start
# 1. Clone and build
git clone https://github.com/Joncik91/claude-bridge-server.git
cd claude-bridge-server
./setup.sh # or setup.bat on Windows
# 2. Configure MCP (see GUIDE.md for details)
claude mcp add --scope user --transport stdio claude-bridge -- node /path/to/server/dist/index.js
Documentation
GUIDE.md — Complete setup, terminal configuration, usage, and troubleshooting
Works with Other MCP Clients Too
While designed for Claude + GLM, the bridge is a standard MCP server — it works with any MCP-compatible CLI:
- Two Claude Code instances (same or different subscriptions)
- Gemini CLI
- OpenCode
- Qwen Code
- Any other MCP client
License
MIT — see LICENSE
Acknowledgments
- Built for Claude Code by Anthropic
- Designed for Z.ai GLM integration
<a href="https://glama.ai/mcp/servers/@Joncik91/claude-bridge-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Joncik91/claude-bridge-server/badge" /> </a>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。