GLM Setup (Z.ai in Claude Code & More)
Connect Tempreon to Z.ai's GLM models by running GLM inside Claude Code, OpenCode, or Cline — your Bridge stays the same across all of them.
Overview
GLM is Z.ai's model family — GLM-5.2 is the current flagship — and the GLM Coding Plan has become a popular way to run a frontier-class open model inside familiar coding harnesses. GLM plugs into Claude Code, OpenCode, and Cline; because MCP lives in the harness rather than the model, your Tempreon Bridge works identically in all of them.
Connected, your AI running GLM loads your Core Imprint, searches your Knowledge Vault, and remembers what it learns — the same intelligence layer you use across every other tool. Swapping the model changes nothing about your Bridge.
Quick path: point Claude Code at Z.ai's Anthropic-compatible endpoint via ~/.claude/settings.json → restart → connect Tempreon exactly as in the Claude Code guide.
Prerequisites
- A Z.ai account with a GLM Coding Plan API key (Lite, Pro, or Max — from $18/mo as of July 2026; pricing may change)
- Claude Code installed (for route A), or OpenCode/Cline (for route B)
- A Tempreon account with at least one available Bridge slot
Step-by-Step Setup
Route A: GLM Coding Plan inside Claude Code
Z.ai runs an Anthropic-compatible endpoint, so Claude Code can drive GLM directly. Add an env block to ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2"
}
}
Three details that trip people up:
- The base URL is
/api/anthropic— not/api/paas/v4, which is Z.ai's OpenAI-style endpoint and won't work here - The variable is
ANTHROPIC_AUTH_TOKEN— notANTHROPIC_API_KEY - Restart your Claude Code session after changing the settings; env changes don't apply to a running session
Then connect Tempreon exactly as in the Claude Code guide:
claude mcp add --transport http tempreon https://api.tempreon.com/functions/v1/tempreon-mcp/mcp
and run /mcp inside Claude Code to complete the browser OAuth. The URL is also shown in your Bridges dashboard. If you already had Tempreon connected before switching to GLM, there's nothing to redo — MCP is harness-side, so the Bridge carries over untouched.
Route B: GLM in OpenCode or Cline
The same principle applies elsewhere: OpenCode and Cline both run GLM (via Z.ai's provider or OpenRouter), and both speak MCP at the harness level, so Tempreon connects the same way regardless of which model is active. For OpenCode, follow the OpenCode guide — the Tempreon config is identical whether the session runs GLM, Claude, or anything else.
Note: Z.ai's own chat app has no custom connector support as of July 2026 — you can't add Tempreon at chat.z.ai directly. The harness is the route.
Troubleshooting
GLM never responds, or auth errors from Z.ai. Check the two usual suspects: the base URL must be https://api.z.ai/api/anthropic (not /api/paas/v4), and the key must be in ANTHROPIC_AUTH_TOKEN (not ANTHROPIC_API_KEY).
Settings changed but nothing happened. Restart the Claude Code session — the env block is read at startup.
Tempreon connection fails immediately. Check the URL ends in /mcp — no trailing slash. The full URL is https://api.tempreon.com/functions/v1/tempreon-mcp/mcp.
GLM works but Tempreon tools are missing. The env block only swaps the model; the Bridge is configured separately. Run /mcp in Claude Code to check Tempreon's status and complete OAuth if it's pending.
Not sure which side is broken. Model errors mention Z.ai, quotas, or the model name; Bridge errors mention the tempreon server or OAuth. They're independent — fix them separately.
Also connect: Kimi · OpenCode · Claude Code
Try saying...
- "Start my session." — triggers
session_startto load your Core Imprint - "Remember: GLM handles the refactor work; keep commit messages in English." — stores a preference that persists across models and harnesses
- "What do you know about me from Tempreon?" — a quick end-to-end test