
glm-mcp
MCP server that hands coding tasks from Claude, Copilot or Codex to cheaper GLM models
The repository was last updated 142 days ago and is published under MIT.
glm-mcp is an open-source MCP server for ai models and llm tooling. It is available on CLI, VS Code, API and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, VS Code, API
- GitHub stars
- 8
- Last commit
- Language
- JavaScript
- License
- MIT
Similar MCP servers
About glm-mcp
glm-mcp lets a main AI coding assistant pass the bulk of its work to GLM models from Zhipu / Z.ai while keeping the main model for planning and review. It runs as a Model Context Protocol server with four tools, and its glm_agent tool lets GLM read, write, edit and run commands inside a chosen repository through its own tool loop.
Each GLM call is logged to a local usage ledger with model and token counts, and a summary block reports tokens and estimated cost after every agent run. A dry-run mode previews the diff without writing files, and real runs print a git checkpoint line for reverting changes.
The project is aimed at developers who already use Claude Code, GitHub Copilot in VS Code or Codex and want to cut token spend on routine coding work. Installers are provided for each of those three environments, and the server can also be added to any MCP client by hand.
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 4 tools reads data; 3 names don't say.
From the server's own tool labels and tool names; not verified by us.
- glm_agent
- GLM as a coding agent in your repo, with read, write, edit and run capabilities and optional dry run.
- glm_delegate
- Pure text generation, hidden by default and enabled with GLM_DELEGATE=on.
- glm_recommend
- Advisory output on whether GLM or the main model should handle a task, with no GLM call.
- glm_statusName suggests: reads
- Shows peak window, active model, usage ledger totals and configuration health, with no GLM call.
What it does
- Delegated coding agent
- GLM runs a tool loop over read, write, edit, list and bash commands inside a specified working directory.
- Dry-run previews
- A dry_run option shows the proposed diff without modifying any files.
- Usage ledger
- Every GLM call is recorded locally with model name and input and output token counts.
- Peak-aware model routing
- Model selection adjusts for the China peak pricing window and can be tuned with a cost bias setting.
- Live progress updates
- Progress notifications report iteration count, token count and tokens per second while a run is active.
- Revertable changes
- After a real run the server prints a git checkpoint revert command when the workdir is a git repository.
Good for
- Offloading routine code edits from an expensive main model to cheaper GLM tokens
- Previewing an agent's proposed changes as a diff before applying them
- Tracking how much GLM usage and spend a coding session generated
- Running delegated coding work from Claude Code, Copilot or Codex without changing their workflow
Pricing
Open source
glm-mcp FAQ
Which main coding agents does glm-mcp support?
The project provides one-command installers for Claude Code, GitHub Copilot in VS Code and Codex, and the standalone package works with any MCP client.
Do I need an API key to install glm-mcp?
The server starts and answers MCP introspection without a key, but GLM calls require a Z.ai GLM Coding Plan key set as GLM_API_KEY.
What does the dry run mode do?
With dry_run set to true, GLM proposes a full diff and writes nothing, so changes can be approved before they are applied.
Where does the code go when GLM runs?
GLM traffic is sent to Z.ai servers in China, so the project recommends keeping sensitive or regulated code on the main model.
Is glm-mcp free?
Yes. glm-mcp is open source, so you can use and self-host it for free.
What are the best alternatives to glm-mcp?
The closest alternatives to glm-mcp are MCP Glm, LLM CLI Gateway, Ai Cli MCP, LLM Provider MCP and Proxima.
Where this comes from
- Description: written from the project's README.