GLM MCP

v1.3.0
io.github.djerok/glm-mcp Checked 3 days ago Published 4 months ago

GLM (Zhipu/Z.ai) as a ~10x cheaper file-editing subagent for AI coding agents.

Values you need

VariableWhat it is
GLM_API_KEYrequired secret Z.ai / Zhipu GLM Coding Plan API key. Required for GLM calls; the server boots and answers MCP introspection without it.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add glm-mcp -e 'GLM_API_KEY=<GLM_API_KEY>' -- npx -y glm-mcp@1.3.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "glm-mcp": {
      "args": [
        "-y",
        "glm-mcp@1.3.0"
      ],
      "command": "npx",
      "env": {
        "GLM_API_KEY": "<GLM_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "glm-mcp": {
      "args": [
        "-y",
        "glm-mcp@1.3.0"
      ],
      "command": "npx",
      "env": {
        "GLM_API_KEY": "<GLM_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "GLM_API_KEY",
      "id": "glm-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "glm-mcp": {
      "args": [
        "-y",
        "glm-mcp@1.3.0"
      ],
      "command": "npx",
      "env": {
        "GLM_API_KEY": "${input:glm-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.glm-mcp]
command = "npx"
args = ["-y", "glm-mcp@1.3.0"]
env = { "GLM_API_KEY" = "<GLM_API_KEY>" }

For AI agents

  1. Ask the user for: GLM_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: glm_agent, glm_recommend, glm_status.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json