Termii MCP

Termii MCP

A hosted MCP server that enables AI assistants to send SMS and WhatsApp messages, run campaigns, and manage phonebooks through the Termii API using natural language.

Category
访问服务器

README

Termii MCP

A hosted Model Context Protocol (MCP) server that gives AI assistants like Claude and ChatGPT the ability to send SMS and WhatsApp messages, run campaigns, and manage phonebooks through Termii, in natural language.

It wraps the zeevx/lara-termii package and exposes the full Termii API as 22 MCP tools, built with the official laravel/mcp package.

Live at termiimcp.com. The landing page turns your Termii API key into a personal connector link that you add to your assistant.

How it works

The MCP server is multi-tenant and stateless. Each user connects with a server URL that carries an encrypted token in a key query parameter:

https://termiimcp.com/mcp?key=<ENCRYPTED_TOKEN>

This is because Claude's and ChatGPT's connector forms only let you edit the URL; Claude has no field for a static bearer token (it supports OAuth only). To avoid putting the raw key in the URL, the landing page posts your key to /connect, which encrypts it with the server's APP_KEY and returns the token. Only this server can decrypt it, and every tool call decrypts the token to reach the underlying Termii account. Programmatic clients may instead send the raw key as an Authorization: Bearer <key> header.

The key is never stored; it lives only for the duration of the request. There is no database, no sign-up, and no shared credentials.

Capabilities

Group Tools
Messaging send-message, send-bulk-message, send-template, send-template-with-media
Account & lookup get-balance, get-message-history, get-phone-status, search-phone-number
Sender IDs list-sender-ids, submit-sender-id
Phonebooks list-phonebooks, create-phonebook, update-phonebook, delete-phonebook
Contacts list-contacts, add-contact, add-contacts-from-contents, delete-contact
Campaigns send-campaign, list-campaigns, get-campaign-history, retry-campaign

Read-only tools are annotated IsReadOnly, deletes IsDestructive, and updates IsIdempotent, so clients can surface the right confirmations.

Requirements

  • PHP 8.4+
  • Composer
  • Node.js 20+ (for building the landing page assets)

Installation

git clone https://github.com/<your-org>/termiimcp.git
cd termiimcp

composer install
npm install

cp .env.example .env
php artisan key:generate

npm run build

Then serve it:

php artisan serve
# MCP endpoint: http://localhost:8000/mcp
# Landing page: http://localhost:8000

Or run the full dev stack (server + Vite) with composer dev.

Configuration

This is a light, database-free application. Cache, sessions, and the queue use file/sync drivers out of the box, so there is nothing to migrate.

Because every request authenticates with the caller's own key, no TERMII_API_KEY is required on the server. The TERMII_* values in .env act only as optional fallbacks for a single-tenant deployment. In production, set APP_URL to your public HTTPS domain so generated URLs (and the OG image) resolve correctly.

Connector tokens are encrypted with the app's APP_KEY, so keep it stable in production. Rotating APP_KEY invalidates every existing connector link, and users would need to reconnect.

The public endpoint is rate limited per API token (60 requests/minute), configured in app/Providers/AppServiceProvider.php.

Connecting from an AI client

The easiest path is the termiimcp.com landing page: paste your Termii API key and it generates your personal connector link (with the encrypted token) plus one-click buttons.

Under the hood, your link looks like https://termiimcp.com/mcp?key=<ENCRYPTED_TOKEN>, where the token comes from the /connect endpoint.

Claude: the "Add to Claude" button opens a prefilled connector dialog of the form:

https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Termii+MCP&connectorUrl=<URL-ENCODED_CONNECTOR_URL>

ChatGPT: enable Settings, Connectors, Advanced, Developer mode, choose Create, and paste the connector URL. (ChatGPT connectors require a paid plan.)

Once connected, ask things like "check my Termii balance" or "send an SMS to 2348012345678".

Testing

php artisan test --compact

Tests use Laravel's HTTP client fakes, so they never hit the real Termii API.

Project layout

app/Mcp/Servers/TermiiServer.php                  The MCP server: registers tools + instructions
app/Mcp/Tools/                                    One class per Termii action (22 tools)
app/Mcp/Tools/Concerns/InteractsWithTermii.php    Resolves the client from the bearer token
app/Http/Controllers/HomeController.php            The landing page
routes/ai.php                                     Registers the web MCP server at /mcp

Note: LaraTermii::addContactsFromFile() is intentionally not exposed as a tool. It reads a file from a server-side storage disk, which a remote AI client cannot reference. Use add-contacts-from-contents (raw CSV text) instead.

Contributing

Contributions are welcome. Please run vendor/bin/pint and php artisan test before opening a pull request. New tools follow the pattern in app/Mcp/Tools and register in TermiiServer::$tools.

Credits

License

Released under the MIT License.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选