Skip to content

Releases: djerok/glm-mcp

v1.1.7

Choose a tag to compare

@djerok djerok released this 02 Jul 05:06

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)

Choose a tag to compare

@djerok djerok released this 02 Jul 15:22

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 Claude glm_subagent_router hook. Before the default model does work itself, it injects advisory context nudging delegation to glm_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_name internally — it skips glm_* 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.json per-project, or ~/.copilot/hooks/glm.hooks.json with --global.

The Copilot edition now has all three primitives

  1. glm_* MCP tools in agent mode (same server as the Claude edition)
  2. GLM custom agent (subagent) locked to the glm tools
  3. PreToolUse auto-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)
```

npm: https://www.npmjs.com/package/glm-mcp-copilot

glm-mcp-copilot v1.2.0 — GLM subagent for Copilot

Choose a tag to compare

@djerok djerok released this 02 Jul 15:10

Near-parity with the Claude Code edition. Copilot has custom agents (subagents) after all, so this release adds one.

New

  • GLM custom agent (subagent) — restricted to the glm MCP tools (tools: ['glm/*']), the Copilot analog of the Claude glm subagent. 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.md delegation policy (applyTo: '**') using the current instructions mechanism — not the deprecated codeGeneration.instructions array.
  • 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 registers chat.agentFilesLocations / chat.instructionsFilesLocations / chat.agent.enabled in 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
```

npm: https://www.npmjs.com/package/glm-mcp-copilot

glm-mcp-copilot v1.1.0

Choose a tag to compare

@djerok djerok released this 02 Jul 12:51

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.