Token导航 LogoToken导航TokenDH.com
Zai MCP Proxy Server logo
搜索检索stdio官方级别未说明来源级核验

Zai MCP Proxy Server

MCP Server

Z.AI Web Search Prime API的完整MCP代理服务器,可通过stdio与Forge集成。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
API集成JavaScriptDocker

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

dariuszkowalski-com

提供方

dariuszkowalski-com

最后核验

2026/5/17 20:19

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run -d --name zai-mcp-proxy \

详细介绍

Z.AI MCP代理服务器

Z.AI Web Search Prime API的完整MCP代理服务器,可与Forge集成为通过stdio运行的标准MCP服务器。

🚀 快速开始

1.安装

# Clone repository
git clone https://github.com/dariuszkowalski-com/zai-mcp-proxy-server.git
cd zai-mcp-proxy-server

# Install dependencies
npm install

# Set API key
export ZAI_API_KEY="your_zai_api_key"

# Run server
node zai-mcp-proxy.js

2.锻造配置

添加到您的Forge配置中:

{
  "mcpServers": {
    "zai-search": {
      "command": "node",
      "args": ["/path/to/zai-mcp-proxy.js", "--api-key", "$ZAI_API_KEY"]
    }
  }
}

📋 需求

  • Node.js 16+
  • Z.AI Web搜索主要API密钥
  • 互联网接入

🔧 工具

webSearchPrime

Z.AI网络搜索Prime搜索引擎。

参数:

  • search_query (字符串,必填):搜索查询
  • content_size (字符串,可选):结果的内容大小(small, medium, large)-默认值 medium
  • location (字符串,可选):搜索位置-默认值 us

使用示例:

webSearchPrime("rust programming language", { content_size: "medium", location: "us" })

🛠️ 技术

  • Node.js -运行时环境
  • @模型上下文协议/sdk -官方MCP SDK
  • 萨德 -参数验证
  • 超文本传输安全协议 -与Z.AI API通信

📁 文件结构

zai-mcp-proxy-server/
├── zai-mcp-proxy.js          # Main MCP server
├── package.json              # Project dependencies
├── test-zai-mcp-proxy.js     # Unit tests
├── install-proxy.sh          # Installation script
└── README.md                 # Documentation

🧪 测试

# Run tests
npm test

# Tests check:
# - MCP connection initialization
# - Available tools listing
# - Search execution
# - Result formatting correctness

🔒 安全

  • 通过安全HTTPS连接传输API密钥
  • 验证所有输入参数
  • 错误处理和超时
  • 不记录敏感数据

📈 特性

  • ✅ 与MCP协议v2024-11-05完全兼容
  • ✅ 通过stdio进行通信
  • ✅ 自动Z.AI会话管理
  • ✅ 搜索结果格式
  • ✅ 错误处理和超时
  • ✅ 可配置的搜索参数
  • ✅ 结果元数据(计数、来源、查询)

🔄 在其他计算机上安装

方法1:安装脚本

# Download and run script
curl -sSL https://raw.githubusercontent.com/dariuszkowalski-com/zai-mcp-proxy-server/main/install-proxy.sh | bash

# Set API key
export ZAI_API_KEY="your_api_key"

方法2:手动安装

# 1. Clone repository
git clone https://github.com/dariuszkowalski-com/zai-mcp-proxy-server.git
cd zai-mcp-proxy-server

# 2. Install Node.js (if not installed)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

# 3. Install dependencies
npm install

# 4. Set API key in environment variable or .env file
echo 'export ZAI_API_KEY="your_api_key"' >> ~/.bashrc
source ~/.bashrc

# 5. Test functionality
npm test

方法三:Docker

# Build image
docker build -t zai-mcp-proxy .

# Run container
docker run -d --name zai-mcp-proxy \
  -e ZAI_API_KEY="your_api_key" \
  -v /path/to/config:/config \
  zai-mcp-proxy

🐛 故障排除

没有搜索结果

  • 检查API密钥: echo $ZAI_API_KEY
  • 验证互联网连接
  • 检查Z.AI API限值

连接错误

  • 确保Node.js的版本为16+
  • 检查防火墙和代理
  • 验证Z.AI API URL

锻造集成问题

  • 检查路径 zai-mcp-proxy.js 文件
  • 确保 ZAI_API_KEY 变量已设置
  • 检查文件权限

📄 许可证

MIT许可证

🤝 支持

对于问题:

  1. 检查错误日志
  2. npm test
  3. 查看Z.AI API文件
  4. 打开GitHub问题

______________________________________________________________________

已准备好与Forge一起使用! 🚀

目录标签

目录标签

API集成JavaScriptDocker搜索代理本地部署MCP协议Node.jsWeb搜索

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP