MCP server for Z-API — WhatsApp messaging, contacts, media
Setup
Choose your client, copy the config, then fill in any required environment variables.
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>"
}
}
}
}Environment variables
ZAPI_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.