Releases: djerok/glm-mcp
Release list
v1.1.7
Token optimization pass to keep more of the burden on GLM: trimmed all MCP tool descriptions + param docs (they sit in Claude's context every turn -> now ~1.5k tokens total), slimmed the hook's per-spawn injection (~500+ -> ~230 tokens), and glm_agent's concise default now omits the per-action list and full diff (Claude reads a short summary+stats, not GLM's whole output). Install: npx glm-mcp-claude@latest --key YOUR_ZAI_KEY
glm-mcp-copilot v1.3.0 — PreToolUse hook (full parity)
Full parity with the Claude Code edition. Copilot (VS Code) has agent hooks too — including a PreToolUse event — so this release adds the third and final primitive: an auto-routing hook.
New — PreToolUse auto-routing hook
glm_router_hook.mjs— the Copilot analog of the Claudeglm_subagent_routerhook. Before the default model does work itself, it injects advisory context nudging delegation toglm_agent(~10× cheaper), then lets the tool run.- Non-blocking — always returns
permissionDecision: "allow"; it only advises, never denies. - VS Code ignores hook matchers, so the hook fires on every tool call and filters by
tool_nameinternally — it skipsglm_*and read-only tools and advises at most once per session (so it never spams you on every edit). - Installed to
.github/hooks/glm.hooks.jsonper-project, or~/.copilot/hooks/glm.hooks.jsonwith--global.
The Copilot edition now has all three primitives
glm_*MCP tools in agent mode (same server as the Claude edition)GLMcustom agent (subagent) locked to theglmtoolsPreToolUseauto-routing hook (this release)
Remaining differences: VS Code hooks ignore the matcher (handled by internal filtering); hooks are a VS Code preview feature (enable in Copilot settings if hidden); and there's no separate glm-code full-GLM launcher. Everything downstream is the same server.
Install / upgrade
```bash
npx glm-mcp-copilot --key YOUR_ZAI_KEY # this workspace
npx glm-mcp-copilot --global --key YOUR_ZAI_KEY # all workspaces (server + subagent + hook + policy)
```
glm-mcp-copilot v1.2.0 — GLM subagent for Copilot
Near-parity with the Claude Code edition. Copilot has custom agents (subagents) after all, so this release adds one.
New
GLMcustom agent (subagent) — restricted to theglmMCP tools (tools: ['glm/*']), the Copilot analog of the Claudeglmsubagent. It can't edit/run files itself, so it must route all work through GLM — keeping the work and the tokens on GLM (~10× cheaper). Invoke it from the chat mode dropdown or via an agent handoff..instructions.mddelegation policy (applyTo: '**') using the current instructions mechanism — not the deprecatedcodeGeneration.instructionsarray.- Installer now sets up the custom agent + instructions in both workspace (
.github/agents/,.github/copilot-instructions.md) and--global(~/.copilot/agents/,~/.copilot/instructions/) modes, and registerschat.agentFilesLocations/chat.instructionsFilesLocations/chat.agent.enabledin VS Code user settings (migrating off the deprecated setting).
Same server
The GLM agent loop, peak-aware model picks, cost bias, token-cap toggle, usage ledger, and dry_run oversight are the same server as the Claude edition — identical behavior once a tool runs. The only thing Copilot lacks is Claude Code's PreToolUse hook (auto-routing), so delegation is driven by the subagent + instructions.
Install
```bash
npx glm-mcp-copilot --key YOUR_ZAI_KEY # this workspace
npx glm-mcp-copilot --global --key YOUR_ZAI_KEY # all workspaces
```
glm-mcp-copilot v1.1.0
Adds global setup for GitHub Copilot: npx glm-mcp-copilot --global --key YOUR_ZAI_KEY registers the GLM server in VS Code's user mcp.json (all workspaces) and adds the delegation policy to user settings.json — configure once, use in every project. Per-project install (no flag) still supported. Same GLM MCP server as the Claude edition.