loginwa
LoginWA MCP: WhatsApp OTP, device status, send message, and broadcast for AI agents. LoginWA hosts the WhatsApp session, so no VPS, no Baileys to babysit, no reconnect loops. Free tier 100 messages a month, paid from $1. Pricing: https://loginwa.com/pricing
README
LoginWA MCP Server
Unofficial MCP server for the LoginWA WhatsApp API. LoginWA hosts the WhatsApp engine, so an agent can check devices, send OTP, send messages, and run broadcasts without operating a VPS.
Tools: device_status, otp_start / otp_verify, send_message, and
broadcast (list_campaigns, get_campaign, create_campaign, send_campaign).
npx -y @loginwa/mcp
Set LOGINWA_API_KEY. Pair devices at loginwa.com/welcome.
Client configs: mcp/README.md.
This repository also ships JavaScript, PHP and Android SDKs, an embeddable OTP widget, and a Postman collection. No server code is included.
Contents
js/, JavaScript SDK (ESM), dependency-free client.php/, PHP SDK (cURL-based, PHP >= 8.0).android/, Android SDK (Kotlin library + runnable sample app).mcp/, TypeScript MCP server (@loginwa/mcp): device status, OTP, send, broadcast for AI agents. Install withnpx -y @loginwa/mcp. Seemcp/README.md.snippet/otp-widget.html, drop-in OTP widget example.docs/postman/loginwa-api.postman_collection.json, Postman collection.docs/sdk.md, quick reference for these assets.
Paths are relative to the repository root. Inside the LoginWA application
repository these same files live under laravel-app/sdk/, which is the single
source they are published from, edit them there, never here.
API Basics
- Base URL (host):
https://api.loginwa.com - SDK default (includes version prefix):
https://api.loginwa.com/api/v1 - Auth:
Authorization: Bearer <YOUR_API_KEY>(orX-Api-Key) - Content-Type:
application/json - Also reachable at
https://loginwa.com/api(same routes under/api/…)
OTP product paths: SDKs call /auth/start and /auth/verify against the
/api/v1 base (i.e. POST /api/v1/auth/start|verify). The preferred narrative
docs path /api/auth/start|verify is equivalent for sending/verifying codes;
v1 start responses also include sent_via_engine and quota_remaining, and
v1 verify returns phone (not phone_number).
Quick Start
JavaScript SDK
cd sdk/js
npm install
# import into your app (ESM)
import { LoginWAClient } from '@loginwa/sdk';
const client = new LoginWAClient({ apiKey: process.env.LOGINWA_API_KEY });
try {
const start = await client.startOtp({ phone: '6281234567890', countryCode: '62' });
const verify = await client.verifyOtp({ sessionId: start.session_id, otpCode: '123456' });
console.log('verified', verify);
} catch (err) {
console.error('OTP error', err?.status, err?.data || err.message);
}
PHP SDK
cd sdk/php
composer install
<?php
require __DIR__ . '/vendor/autoload.php';
$client = new LoginWA\SDK\Client('YOUR_API_KEY');
try {
$start = $client->startOtp(['phone' => '6281234567890', 'country_code' => '62']);
$verify = $client->verifyOtp(['session_id' => $start['session_id'], 'otp_code' => '123456']);
var_dump($verify);
} catch (\LoginWA\SDK\ApiException $e) {
// HTTP status is in $e->getCode()
echo 'OTP error: ' . $e->getCode() . ' ' . $e->getMessage();
}
MCP server (@loginwa/mcp)
cd sdk/mcp && npm install && npm run build
# clients: npx -y @loginwa/mcp
Set LOGINWA_API_KEY. Details and client configs: mcp/README.md.
OTP Widget Snippet
Open sdk/snippet/otp-widget.html, set your API key/Base URL, and embed in any page. Uses Fetch to call /auth/start and /auth/verify.
Postman Collection
Import docs/postman/loginwa-api.postman_collection.json, set base_url (default https://api.loginwa.com) and api_key variables, then run the flows.
Common errors
401 unauthorized, missing/invalid API key.402 subscription_suspended, inactive, suspended, or past-due subscription.422 invalid_code|expired|blocked, verification failed.429 quota_exceeded, monthly plan quota exceeded.429 rate_limited, too many requests per minute (Retry-Afterheader).503 no_device_connected, no online WhatsApp device for the app.- Network/timeout, retry with backoff; SDK throws with HTTP status in error object/exception code.
Download
Packaged ZIP (same contents as this repo): https://loginwa.com/loginwa-batch1-sdk.zip
Changelog
See CHANGELOG.md.
Support
Questions/feedback: dev@loginwa.com
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。