MCP server for Z-API — WhatsApp messaging, contacts, media
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add z-api --env ZAPI_TOKEN='<ZAPI_TOKEN>' -- npx -y @codespar/mcp-z-api~/.codex/config.toml
[mcp_servers.z-api]
command = "npx"
args = ["-y", "@codespar/mcp-z-api"]
env = { ZAPI_TOKEN = "<ZAPI_TOKEN>" }
# codex mcp add z-api --env ZAPI_TOKEN='<ZAPI_TOKEN>' -- npx -y @codespar/mcp-z-api~/.cursor/mcp.json
{
"mcpServers": {
"z-api": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-z-api"
],
"env": {
"ZAPI_TOKEN": "<ZAPI_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"z-api": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-z-api"
],
"env": {
"ZAPI_TOKEN": "<ZAPI_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"z-api": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-z-api"
],
"env": {
"ZAPI_TOKEN": "<ZAPI_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"z-api": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-z-api"
],
"env": {
"ZAPI_TOKEN": "<ZAPI_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"z-api": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-z-api"
],
"env": {
"ZAPI_TOKEN": "<ZAPI_TOKEN>"
}
}
}
}需要的环境变量
ZAPI_TOKEN
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。