gaztrabisme

Glm Subagent MCP — Development skill for Claude Code

Development community

Delegate work to a Claude Code subprocess billed against a GLM Coding Plan.

How to install Glm Subagent MCP

This entry records only its repository, not the path inside it, so there is no exact command to give. Open gaztrabisme/glm-subagent-mcp and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Glm Subagent MCP does

Delegate work to a Claude Code subprocess billed against a GLM Coding Plan.

Alternatives in Development

  • Content Shipped — Proactively detect and log shipped content when user mentions publishing, launching, or completing work 1k ★
  • Puppetmaster — Provider-neutral control plane for durable-state agent swarms: subprocess workers, leases, artifacts, memory 340 ★
  • Openseek — OpenSeek - 广度求索: open-source TUI coding agent with multi-provider routing, MCP, LSP, and Plan/Agent/YOLO modes 207 ★

README

glm-subagent-mcp

MCP server that delegates work to a Claude Code subprocess billed against a [GLM Coding Plan](https://docs.z.ai/devpack/tool/claude).

Parent agent keeps its own auth. The child `claude -p` process is isolated (`CLAUDE_CONFIG_DIR`, `--bare`) so it cannot steal the parent's Anthropic OAuth or recurse into this MCP server.

Install

uvx --from git+https://github.com/gaztrabisme/glm-subagent-mcp glm-subagent-mcp

Claude Code

{
  "mcpServers": {
    "glm-subagent": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/gaztrabisme/glm-subagent-mcp",
        "glm-subagent-mcp"
      ],
      "env": {
        "GLM_API_KEY": "your-z.ai-key",
        "GSA_WORKSPACE": "/path/to/your/project"
      }
    }
  }
}

Requires `claude` on PATH (Claude Code CLI). Do **not** put `ANTHROPIC_BASE_URL` into `~/.claude/settings.json` — that would reroute the parent. This server injects GLM credentials only into the child process.

Tools

Tool What it does
glm_delegate Start a new Claude Code subagent on a task. Returns agent_id and run_id immediately.
glm_await Block until a run finishes; returns the result.
glm_continue Follow-up work in the same Claude Code session (--resume).
glm_list Every agent this server owns, with state, cost, and run history.
glm_cancel SIGTERM the in-flight process and close the agent.
glm_transcript Activity log — tool calls, messages, raw response.

Typical loop: `glm_delegate` → `glm_await` → (`glm_continue`) → `glm_cancel`.

Every delegation needs a `verification` command. The server runs it after the child finishes. Exit 0 → `completed`; otherwise `completed_unverified`. Pass `"true"` if there is nothing to check.

Isolation

  • Child env: ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic, ANTHROPIC_AUTH_TOKEN=$GLM_API_KEY
  • CLAUDE_CONFIG_DIR under .gsa-sessions/agents//claude-home
  • --bare