MCP Directory
Back

Z.ai2api

by hmjz100 · Python · ★ 137

将 Z.ai Chat 代理为 OpenAI/Anthropic Compatible 格式,支持多模型列表映射、免令牌、智能处理思考链、图片上传等功能;Z.ai ZtoApi z2api ZaitoApi zai X-Signature 签名 GLM 4.5 v 4.6

#ai2api#anthropic-claude#chat2api#chatglm#claude#claude-compatible#glm#glm2api#llm#model-context-protocol#open-webui#openai#openai-chatgpt#openai-compatible#tool-calling#zai#zai2api#zhipu#zhipuai#ztoapi

Install

pip install git+https://github.com/hmjz100/Z.ai2api.git

Claude Desktop config

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "z-ai2api": {
      "command": "uvx",
      "args": [
        "git+https://github.com/hmjz100/Z.ai2api.git"
      ]
    }
  }
}

From the README

> [!IMPORTANT] > 正式版更新稍迟,如急需使用,建议[切换到 Canary 分支](https://github.com/hmjz100/Z.ai2api/tree/canary)。 Z.ai2api 将 Z.ai 代理为 OpenAI Compatible 格式,支持免令牌、智能处理思考链、图片上传(登录后)等功能 基于 https://github.com/kbykb/OpenAI-Compatible-API-Proxy-for-Z 使用 AI 辅助重构 - 支持根据官网 /api/models 生成模型列表,并自动选择合适的模型名称。 - (登录后)支持上传图片,使用 GLM 识图系列模型。 - 支持智能识别思考链,完美转换多种格式。 使用 文件进行配置。 - 上游 API 基础域名 - 默认值: - 服务端口 - 默认值: - 备选模型,在未传入模型时调用 - 默认值: - 访问令牌 - 如果启用了 可不填 - 访客模式,启用后将获取随机令牌 - 默认值: - 访客模式下不支持上传文件调用视觉模型 - 思考链格式化模式 - 默认值: - 可选 ,效果如下 - "reasoning" - reasoning_content: - content…
Read full README on GitHub →

💡 Need a managed MCP host?

Try Claude Pro for the smoothest MCP experience, or browse our cloud-hosted servers.

Related developer tools servers