viber-mcp
The viber-mcp server enables AI assistants to fully interact with the Viber Bot API through the Model Context Protocol, providing tools to send messages, manage media, handle webhooks, and query user/account data.
Messaging
Send text messages to individual users (up to 7,000 characters)
Send images with optional captions
Send videos (MP4/H.264, up to 26MB, 180s) with optional thumbnails
Send file attachments (up to 50MB) with custom file names
Send clickable URLs (up to 2,000 characters)
Send GPS location coordinates (latitude/longitude)
Send contact cards with name and phone number
Broadcast text messages to up to 300 Viber users simultaneously
Account & User Management
Retrieve bot account info including subscriber count and member list
Fetch user profile details (rate-limited to 2 calls per 12 hours per user)
Check online status of up to 100 Viber users at once
Webhook Management
Register a webhook URL to receive Viber events (delivered, seen, failed, subscribed, unsubscribed, conversation_started, message)
Remove/disable the currently registered webhook
General
All tools support optional sender name and avatar overrides per message
Input validation before API calls with human-readable error responses for graceful AI handling
Provides tools to interact with the Viber Bot API for sending messages, media, files, broadcasting, managing webhooks, and querying user data.
The first MCP server for Viber. Connect any MCP-compatible client -- Claude Desktop, Claude Code, Cursor, Windsurf, and others -- to the Viber Bot REST API and control your Viber bot through natural language.
Viber has over 1 billion registered users, particularly strong in Ukraine, Eastern Europe, Greece, and Southeast Asia. This server gives AI assistants full access to the bot API: send messages, media, files, broadcast to groups, manage webhooks, and query user data.
How it works
┌──────────────────────┐ stdio ┌──────────────────────┐
│ │ ◄───────────────────► │ │
│ MCP Client │ JSON-RPC over │ viber-mcp │
│ │ stdin/stdout │ │
│ - Claude Desktop │ │ 13 tools │
│ - Claude Code │ │ Zod validation │──── HTTPS ───► Viber API
│ - Cursor │ │ Error handling │ chatapi.viber.com
│ - Any MCP client │ │ Typed responses │
│ │ │ │
└──────────────────────┘ └──────────────────────┘Related MCP server: mcp-connect
Quick start
Try it instantly -- no install required:
VIBER_AUTH_TOKEN=your-token npx @serhii.zghama/viber-mcpOr install globally:
npm install -g @serhii.zghama/viber-mcpSetup
Claude Desktop
Add to your config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"viber": {
"command": "npx",
"args": ["-y", "@serhii.zghama/viber-mcp"],
"env": {
"VIBER_AUTH_TOKEN": "your-bot-token-here",
"VIBER_SENDER_NAME": "MyBot"
}
}
}
}Windows note: Replace
"command": "npx"with"command": "cmd"and"args"with["/c", "npx", "-y", "@serhii.zghama/viber-mcp"].
Restart Claude Desktop. The Viber tools will appear in the tools menu.
Claude Code
claude mcp add viber-mcp -e VIBER_AUTH_TOKEN=your-bot-token-here -- npx -y @serhii.zghama/viber-mcpCursor
Open Settings > MCP Servers, click + Add, and paste:
{
"viber": {
"command": "npx",
"args": ["-y", "@serhii.zghama/viber-mcp"],
"env": {
"VIBER_AUTH_TOKEN": "your-bot-token-here"
}
}
}VS Code (Copilot)
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"viber": {
"command": "npx",
"args": ["-y", "@serhii.zghama/viber-mcp"],
"env": {
"VIBER_AUTH_TOKEN": "your-bot-token-here"
}
}
}
}Tools
13 tools covering the full Viber Bot API surface:
Messaging
Tool | Description | Key parameters |
| Send a text message |
|
| Send an image with optional caption |
|
| Send a video |
|
| Send a file attachment |
|
| Send a clickable link |
|
| Send GPS coordinates |
|
| Send a contact card |
|
| Broadcast to up to 300 users |
|
Account & Users
Tool | Description | Key parameters |
| Get bot profile and subscriber count | none |
| Fetch user profile (rate-limited: 2/12h per user) |
|
| Check online status of up to 100 users |
|
Webhooks
Tool | Description | Key parameters |
| Register a webhook URL |
|
| Disable the current webhook | none |
All tools validate inputs with Zod schemas before calling the Viber API. On errors, tools return human-readable messages with isError: true so the AI can decide how to proceed.
Full schema details and examples in docs/API_REFERENCE.md.
Configuration
Environment variables, read once at startup:
Variable | Required | Default | Description |
| yes | -- | Bot auth token from the Viber Admin Panel |
| no |
| Default sender display name (max 28 chars) |
| no | -- | Default sender avatar URL |
| no |
| API base URL override |
| no |
| Per-request timeout in milliseconds |
Getting a Viber bot token
Open the Viber Admin Panel
Create a new bot account (or select an existing one)
Copy the token from the bot's settings page
Set it as
VIBER_AUTH_TOKENin your MCP client config
Note: Since February 2024, new Viber bot accounts may require commercial onboarding through Viber partners. Existing bot tokens continue to work.
Development
git clone https://github.com/serhiizghama/viber-mcp.git
cd viber-mcp
pnpm installCommand | Description |
| Build with tsup (ESM, Node 20+) |
| Build with file watching |
| Run TypeScript strict checks |
| Run vitest (43 tests) |
Project structure
src/
index.ts -- Entrypoint: config -> client -> server -> stdio
config.ts -- Environment variable parsing
errors.ts -- ViberApiError class
server.ts -- MCP server builder with tool registration
viber/
client.ts -- Typed HTTP client for the Viber REST API
types.ts -- Request/response TypeScript interfaces
tools/
send-message.ts -- One file per tool, Zod schema + handler
... -- 12 more tool files
tests/
viber-client.test.ts -- Client unit tests (mocked fetch)
server.test.ts -- Integration test (spawns server, queries tools/list)
tools/*.test.ts -- Per-tool success + error path testsArchitecture decisions
Zero
console.log-- stdout is the MCP protocol channel; onlyconsole.errorfor diagnosticsNative
fetch-- no axios/node-fetch; minimal runtime dependenciesNo retries -- Viber REST calls are user-driven via MCP; silent retries would hide real problems from the AI
Zod validation -- every tool input is validated before reaching the Viber API
Tools never throw -- errors are caught and returned as
{ isError: true }so the AI can handle them gracefully
Roadmap
Future work -- contributions welcome:
Rich media / carousels --
send_rich_mediatool with carousel layoutKeyboards -- interactive button keyboards on messages
Webhook receiver -- sibling package for incoming events via HTTP
Stickers --
send_stickertoolHTTP transport -- Streamable HTTP for remote MCP deployments
License
MIT © Serhii Zghama
Available Tools
13 toolsbroadcast_messageB
Send the same text message to up to 300 Viber users at once
Inputs: receivers (required), text (required), sender_name, sender_avatar.
get_account_infoA
Get the Viber bot account configuration including subscriber count and member list
Inputs: no named parameters.
get_onlineB
Check online status of up to 100 Viber users
Inputs: ids (required).
get_user_detailsA
Fetch profile details of a Viber user
Inputs: id (required).
remove_webhookA
Disable the currently registered webhook
Inputs: no named parameters.
send_contactB
Send a contact card to a Viber user
Inputs: receiver (required), name (required), phone_number (required), sender_name, +1 more.
send_fileC
Send a file attachment to a Viber user
Inputs: receiver (required), media (required), size (required), file_name (required), +2 more.
send_locationB
Send GPS coordinates to a Viber user
Inputs: receiver (required), latitude (required), longitude (required), sender_name, +1 more.
send_messageB
Send a text message to a Viber user
Inputs: receiver (required), text (required), sender_name, sender_avatar, +1 more.
send_pictureA
Send an image with optional caption to a Viber user
Inputs: receiver (required), media (required), text, thumbnail, +2 more.
send_urlB
Send a clickable URL to a Viber user
Inputs: receiver (required), media (required), sender_name, sender_avatar.
send_videoC
Send a video to a Viber user
Inputs: receiver (required), media (required), size (required), duration, +3 more.
set_webhookB
Register a webhook URL for receiving Viber events
Inputs: url (required), event_types, send_name, send_photo.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool serves a unique purpose: broadcasting vs single messaging, distinct media types for sends, separate info queries, and webhook management. No overlap.
All tools follow a consistent verb_noun pattern in snake_case, e.g., send_message, get_account_info, set_webhook.
With 13 tools, the set is well-scoped for a Viber bot, covering essential operations without excess.
Covers key bot operations: sends, broadcasts, user info, webhooks. Minor gaps like interactive keyboards exist but not critical.
Maintenance
Related MCP Connectors
MCP server for Sendbird — chat users, channels, members, and messages from your AI client.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Official Fibery MCP server: query and update your workspace from any AI client via OAuth.
Free WhatsApp MCP server for ChatGPT and Claude: read and search chats, every send you approve.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP Server for the Mattermost API, enabling Claude and other MCP clients to interact with Mattermost workspaces.1375 npm6MIT
- AlicenseNot gradedqualityDmaintenanceA dead simple MCP server for exposing your app functions to AI agents like Claude Desktop.13 npm6MIT
- FlicenseAqualityDmaintenanceMCP server for ManyChat API integration that enables Claude and other AI assistants to manage subscribers, tags, custom fields, flows, and send messages through natural language.17-
- AlicenseAqualityCmaintenanceMCP server for VibeKit — build, deploy, and manage hosted apps and chat with each app's persistent server-side AI agent from Claude Desktop, Cursor, or any MCP client. Every app gets its own agent and a live URL; bring your own Claude/OpenAI key or pay-as-you-go.3626 npm1MIT