MCP Server
SendHub.ai includes a Model Context Protocol (MCP) server that lets any compatible AI agent read, search, and send WhatsApp messages through your account.
What Can AI Agents Do?
With the SendHub MCP server connected, your AI agent can:
- Read conversations — list, filter by status, search message content
- Send messages — reply to customers via WhatsApp
- Manage contacts — update names, tags, notes
- Assign conversations — route to team members or back to AI
- View analytics — check usage and message limits
- Search — full-text search across all messages
Available Tools
| Tool | Description |
|---|---|
list_conversations | Query conversations with status/workspace filters |
get_conversation | Get full conversation with contact, channel, and last 20 messages |
assign_conversation | Assign to a team member or return to AI |
resolve_conversation | Mark conversation as resolved |
list_messages | Get messages in a conversation |
search_messages | Full-text search across all message content |
send_message | Send a WhatsApp message in a conversation |
list_contacts | Browse contacts with name/phone search |
get_contact | Get contact details with conversation history |
update_contact | Update name, tags, or notes |
list_channels | List connected WhatsApp numbers |
get_usage | Check AI reply usage and plan limits |
Setup by Platform
Claude Code
Add to your project’s .mcp.json or ~/.claude/claude_code_config.json:
{
"mcpServers": {
"sendhub": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}
}
Then use naturally:
> Show me unresolved conversations from today
> Send a message to the conversation with John saying his order shipped
> Search for messages mentioning "refund"
> Tag the contact in conversation xyz as "vip"
Claude Desktop
Add to your Claude Desktop MCP configuration (~/Library/Application Support/Claude/claude_desktop_config.json on Mac):
{
"mcpServers": {
"sendhub": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}
}
Restart Claude Desktop. You’ll see SendHub tools available in the toolbox.
Cursor
In Cursor settings, go to MCP Servers and add:
- Name: SendHub
- URL:
https://mcp.sendhub.ai - Headers:
Authorization: Bearer your-api-secret-key
Or add to your project’s .cursor/mcp.json:
{
"mcpServers": {
"sendhub": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}
}
Windsurf
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"sendhub": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}
}
OpenAI Codex / ChatGPT
OpenAI’s Codex CLI supports MCP servers. Add to your MCP config:
{
"mcpServers": {
"sendhub": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}
}
Gemini (Google AI Studio)
Google AI Studio supports MCP tool connections. In your agent configuration, add SendHub as an external tool:
{
"tools": [{
"mcp": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}]
}
VS Code (Copilot / Extensions)
VS Code extensions that support MCP can connect to SendHub. Add to your workspace .vscode/mcp.json:
{
"servers": {
"sendhub": {
"url": "https://mcp.sendhub.ai",
"headers": {
"Authorization": "Bearer your-api-secret-key"
}
}
}
}
Custom AI Agents
If you’re building your own AI agent, you can connect to the MCP server using any MCP client library:
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
const transport = new StreamableHTTPClientTransport(
new URL('https://mcp.sendhub.ai'),
{
requestInit: {
headers: {
'Authorization': 'Bearer your-api-secret-key'
}
}
}
)
const client = new Client({ name: 'my-agent', version: '1.0.0' })
await client.connect(transport)
// List available tools
const { tools } = await client.listTools()
// Call a tool
const result = await client.callTool({
name: 'list_conversations',
arguments: { status: 'ai_handling', limit: 10 }
})
API Secret Keys
Generate an API secret key in the SendHub dashboard under Settings → API Keys.
- Keys are scoped to your organization
- Default scopes:
readandwrite - Keys can be optionally scoped to a specific workspace
- The key prefix (first 8 chars) is shown for identification — the full key is only shown once at creation
Example Workflows
Customer Support Triage
Ask your AI agent:
“Show me all unresolved conversations. For any that mention ‘urgent’ or ‘broken’, assign them to Sarah. Resolve any that just say ‘thanks’.”
Daily Summary
“Give me a summary of today’s conversations: how many new, how many resolved, any that are still waiting for a reply over 2 hours.”
Contact Management
“Find all contacts tagged ‘lead’ and add a note saying ‘Follow up Q2 campaign’. Also tag them as ‘q2-campaign’.”
Automated Outreach
“Send a message to the conversation with +1234567890 saying: Hi! Just checking in — did the replacement part arrive?”