MojaWave MCP

MojaWave MCP

Connects any MCP-compatible AI assistant to the MojaWave SMS Gateway, enabling sending SMS, checking credit balances, and managing bulk SMS jobs.

Category
访问服务器

README

mojawave-mcp

MojaWave MCP server — connect any MCP-compatible AI assistant to the MojaWave SMS Gateway.

Works with Claude (Desktop & Code), ChatGPT (via OpenAI Agents SDK), Gemini (via Google ADK), Cursor, Windsurf, and any other tool that speaks the Model Context Protocol.

Every tool maps to a documented endpoint of the MojaWave public API — nothing undocumented is exposed.


Available tools

Tool API endpoint What it does
send_sms POST /sms/send Send a single SMS, optionally scheduled (schedule_at)
send_bulk_sms POST /sms/bulk Start an async bulk SMS job for up to 10,000 recipients — returns a job_id
get_bulk_sms_job GET /sms/bulk/{id} Poll the status and progress of a bulk SMS job
get_message GET /messages/{id} Get full details and delivery timeline for a single message
get_credit_balance GET /credits Check current SMS and email credit balances
verify_webhook_signature Verify a webhook's X-MojaWave-Signature (HMAC-SHA256)

Inputs are validated before any request is made (E.164 phone numbers, 1–11-char sender IDs, message length, recipient count, ISO-8601 schedule times), and the client retries 429/5xx responses with backoff that honours Retry-After.


Installation

pip install mojawave-mcp

Or for local development:

git clone https://github.com/mojawave/mojawave-mcp
cd mojawave-mcp
pip install -e ".[dev]"

Configuration

Copy .env.example to .env and add your API key:

cp .env.example .env
MOJAWAVE_API_KEY=sk_live_mw_xxxxxxxxxxxxxxxxxxxx

Get your API key from the MojaWave dashboard under Settings → API Keys.

Use a test key (sk_test_mw_…) during development — it returns synthetic responses without sending real messages or charging credits.


Connecting to AI assistants

Claude Desktop

Add this block to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mojawave": {
      "command": "mojawave-mcp",
      "env": {
        "MOJAWAVE_API_KEY": "sk_live_mw_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Restart Claude Desktop. You will see a MojaWave tool icon in the chat interface.


Claude Code (CLI)

claude mcp add mojawave -- env MOJAWAVE_API_KEY=sk_live_mw_xxx mojawave-mcp

Cursor / Windsurf / any stdio MCP client

Point the client at the mojawave-mcp command with your API key as an environment variable. Most clients use the same JSON config format as Claude Desktop above — refer to your client's MCP documentation.


OpenAI Agents SDK (ChatGPT / GPT-4o)

Start the server in SSE mode so OpenAI can reach it over HTTP:

MOJAWAVE_API_KEY=sk_live_mw_xxx mojawave-mcp --transport sse --port 8080

Then connect from Python:

from agents import Agent, Runner
from agents.mcp import MCPServerSse

async def main():
    server = MCPServerSse(url="http://localhost:8080/sse")
    async with server:
        agent = Agent(
            name="MojaWave Agent",
            model="gpt-4o",
            mcp_servers=[server],
        )
        result = await Runner.run(
            agent, "Send an SMS to +255712345678 saying Hello from AI"
        )
        print(result.final_output)

Google Gemini (Google ADK)

Start the server in SSE mode:

MOJAWAVE_API_KEY=sk_live_mw_xxx mojawave-mcp --transport sse --port 8080

Then connect from Python:

from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, SseServerParams

mojawave_tools = MCPToolset(
    connection_params=SseServerParams(url="http://localhost:8080/sse")
)

agent = LlmAgent(
    model="gemini-2.0-flash",
    name="mojawave_agent",
    instruction="You can send SMS and check credits via MojaWave.",
    tools=[mojawave_tools],
)

Hosted deployment (Docker)

For production, run the SSE server behind a reverse proxy:

FROM python:3.12-slim
RUN pip install mojawave-mcp
ENV MOJAWAVE_API_KEY=""
EXPOSE 8080
CMD ["mojawave-mcp", "--transport", "sse", "--port", "8080"]
docker build -t mojawave-mcp .
docker run -e MOJAWAVE_API_KEY=sk_live_mw_xxx -p 8080:8080 mojawave-mcp

Running locally (stdio)

MOJAWAVE_API_KEY=sk_live_mw_xxx mojawave-mcp

The server reads JSON-RPC from stdin and writes to stdout — the standard MCP stdio transport used by Claude Desktop and most IDE extensions.


Bulk SMS workflow

Bulk sends are asynchronous. send_bulk_sms returns a job_id immediately; use get_bulk_sms_job to poll until the job completes:

1. send_bulk_sms(recipients=[...], message="...", sender_id="MYAPP")
   → { "job_id": "ec0fb57c-...", "status": "scheduled", "total_recipients": 500 }

2. get_bulk_sms_job(job_id="ec0fb57c-...")
   → { "status": "processing", "progress_percent": 42, "sent_count": 210 }

3. get_bulk_sms_job(job_id="ec0fb57c-...")
   → { "status": "completed", "total_recipients": 500, "total_credits_cost": 500 }

Security notes

  • Never commit your API key. Use environment variables or a secrets manager.
  • Use test keys (sk_test_mw_…) in CI/CD and development — no real messages are sent and no credits are charged.
  • Scope API keys to only the permissions they need from the MojaWave dashboard.
  • Webhook payloads are signed with X-MojaWave-Signature (HMAC-SHA256) — verify signatures on your server before trusting delivery events.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选