How to Add a Messaging MCP Server to Claude Code
AI agents are getting access to real-world tools. Code editors can spin up servers. Design tools can generate assets. But until now, no messaging platform shipped a way for AI agents to send iMessage and SMS on your behalf.
senderZ changes that. The @senderz/mcp package is a Model Context Protocol server that gives Claude Code direct access to the senderZ messaging API. One install command, and Claude can send messages, manage contacts, check delivery status, and handle compliance — all through natural language.
This post walks through what MCP is, how to install the senderZ MCP server, what you can do with it, which tools are available, security considerations, and compatibility with other MCP-capable agents.
What Is MCP (Model Context Protocol)?
MCP is an open standard created by Anthropic that defines how AI agents connect to external services. Think of it as a universal plugin system for AI tools. Instead of each AI tool building its own integration layer, MCP provides a shared protocol that any agent can use to discover and call tools from any MCP server.
An MCP server exposes a set of named tools — functions with defined inputs and outputs — that an AI agent can call. When you tell Claude Code to “send a message to +14155550100,” Claude identifies the right tool (send_message), fills in the parameters (phone number, message body, channel), executes the call through the MCP server, and reports the result back to you in plain language.
Without MCP, integrating with a messaging API means writing code: HTTP clients, authentication headers, JSON serialization, error handling, retry logic. With MCP, you describe what you want in English and the agent handles everything.
senderZ is the only messaging platform in the market that ships an MCP server. Not Twilio. Not Sendblue. Not Blooio. If you want to send iMessage or SMS from an AI agent using an open standard, senderZ is the only option.
Install in One Command
If you have a senderZ API key, the entire setup is a single terminal command:
claude mcp add senderz -- npx @senderz/mcp --api-key sz_live_xxx
Replace sz_live_xxx with your actual API key from the senderZ developer portal.
After running the command, you should see output confirming the server was added:
Added stdio MCP server senderz with command: npx @senderz/mcp --api-key sz_live_xxx
Restart Claude Code (or open a new session), and the senderZ tools are immediately available. No config files to edit, no environment variables to set, no additional packages to install.
You can also store your API key as an environment variable instead of passing it inline — see the Security section below for details.
Do not have a senderZ account yet? Sign up at senderZ.com. Your 14-day free trial includes full API access, which is plenty for development and testing.
10 Example Prompts
Once the MCP server is running, you interact with senderZ through natural language inside Claude Code. Here are ten prompts that show what is possible:
1. Send a transactional message
“Send ‘Your order shipped’ to +14155550100”
Claude calls send_message with the body and phone number. You get back a confirmation with the message ID and delivery channel (iMessage or SMS).
2. Check recent message history
“Show me the last 10 messages”
Claude calls list_messages with a limit of 10 and displays the results in a readable table — recipient, status, channel, timestamp.
3. Create a reusable template
“Create a template called appointment-reminder with body ‘Hi {{name}}, your appointment is on {{date}} at {{time}}. Reply STOP to opt out.’”
Claude calls create_template and confirms the template was saved with the variable placeholders intact.
4. Check iMessage capability
“Check if +14155550100 supports iMessage”
Claude calls detect_imessage and tells you whether the number is registered with iMessage, so you know which channel will be used.
5. Review monthly usage
“How many messages did I send this month?”
Claude calls get_usage and reports your current billing period stats — messages sent, API calls made, and remaining quota.
6. Look up a contact
“Find all contacts named Sarah”
Claude calls list_contacts with a search filter and returns matching contacts with their phone numbers and group memberships.
7. Check opt-out status
“Has +14155550100 opted out?”
Claude calls check_optout and tells you whether that number has sent a STOP keyword. If they have, Claude will warn you before attempting any send.
8. Register a webhook
“Register a webhook at https://myapp.com/hooks/sms for message.delivered events”
Claude calls register_webhook with your URL and the event type. You get back a confirmation with the webhook ID and signing secret.
9. List all templates
“Show me all my message templates”
Claude calls list_templates and displays each template with its name, type (OTP, alert, marketing), and variable placeholders.
10. Add a new contact
“Add contact Jane Lee with phone +14155550199”
Claude calls create_contact and confirms the contact was added to your account.
Every prompt follows the same pattern: you describe what you want, Claude picks the right tool, executes the call, handles errors gracefully, and gives you a plain-language response.
All Available MCP Tools
The senderZ MCP server exposes 12 tools that cover the core messaging workflow:
| Tool | Description |
|---|---|
send_message | Send an iMessage or SMS to a phone number with automatic channel routing |
list_messages | List sent and received messages with filters for status, date, and recipient |
get_message | Get delivery status and metadata for a specific message by ID |
list_contacts | List contacts in your account with optional search and group filters |
create_contact | Add a new contact with name, phone number, and optional group assignment |
check_optout | Check whether a phone number has opted out via STOP keyword |
get_usage | Get current billing period usage — messages sent, API calls, remaining quota |
list_templates | List all message templates in your account |
create_template | Create a reusable message template with variable placeholders |
list_webhooks | List all registered webhook endpoints and their subscribed events |
register_webhook | Register a new webhook URL for delivery and inbound message events |
unregister_webhook | Remove a webhook endpoint by ID |
Every tool validates your API key before executing. Every tool enforces tenant isolation — your data is completely separate from other senderZ accounts. And every tool returns structured errors that Claude can interpret and explain to you in context.
For example, if you ask Claude to send a message to a number that has opted out, Claude will not silently fail. It will tell you the number opted out, when they opted out, and ask if you want to check a different number or view your full opt-out list.
Works with Cursor and Other MCP Agents
The senderZ MCP server is not limited to Claude Code. Any MCP-compatible agent can use it.
Cursor supports MCP servers natively. Add senderZ to your Cursor configuration the same way — point it to npx @senderz/mcp with your API key — and you can send messages from within Cursor’s AI assistant.
Windsurf, Cline, and other editors adopting the MCP standard can also connect to the senderZ MCP server. The protocol is the same regardless of which client is calling.
If you are building your own AI agent using the Anthropic API or the MCP TypeScript SDK, you can connect to the senderZ MCP server programmatically and give your agent messaging capabilities.
The key point: MCP is an open standard. senderZ invested in MCP specifically because it is vendor-neutral. You are not locked into Claude Code. You are not locked into any single AI tool. Wherever MCP goes, senderZ goes with it.
Security
Your API key is stored locally on your machine in the Claude Code configuration file. It is never sent to Anthropic’s servers — Claude Code reads it from local config and passes it directly to the MCP server process running on your machine. The MCP server then authenticates with the senderZ API over HTTPS.
Treat your senderZ API key like any production credential:
- Use environment variables. Instead of passing
--api-keyinline, setSENDERZ_API_KEYas an environment variable. The MCP server reads it automatically, and your key stays out of shell history and config files:
export SENDERZ_API_KEY=sz_live_xxx
claude mcp add senderz -- npx @senderz/mcp
- Use separate keys for development and production. Generate a test-mode API key (
sz_test_xxx) from the senderZ portal for local development. Reserve your live key for production environments. - Rotate keys regularly. If you suspect a key has been exposed, revoke it immediately in the senderZ portal and generate a new one.
- Never commit API keys to version control. If your Claude Code configuration is checked into a repository, ensure
.claude/is in your.gitignore.
The senderZ API enforces rate limiting, tenant isolation, and TCPA compliance on every request — regardless of whether it comes from the MCP server, the SDK, or a direct HTTP call. The MCP server does not bypass any security layer.
FAQ
Which Claude models work with the MCP server?
All Claude models that support tool use work with MCP servers. This includes Claude Sonnet, Claude Opus, and Claude Haiku. The MCP server is model-agnostic — it exposes tools via the standard MCP protocol, and any model that Claude Code supports can call them.
Is my API key safe?
Yes. Your API key is stored in your local Claude Code configuration and is never transmitted to Anthropic. The MCP server runs as a local process on your machine and communicates directly with the senderZ API over HTTPS. See the Security section above for best practices on key management.
Can Claude read inbound replies?
Yes. The list_messages tool returns both outbound and inbound messages. If someone replies to a message you sent, Claude can retrieve it. You can ask Claude things like “show me all replies from +14155550100” or “did anyone respond to the appointment reminder I sent yesterday?”
To receive inbound messages in real time, register a webhook for message.received events.
Does it work with Cursor?
Yes. Cursor supports MCP servers natively. Add the senderZ MCP server to your Cursor configuration and you get the same 12 tools available in Cursor’s AI assistant. See the Cursor integration guide for setup instructions.
Is the MCP server open source?
The @senderz/mcp package is published on npm and the source is available on GitHub. You can inspect the code, contribute, or fork it for custom integrations. The MCP server is a thin wrapper around the senderZ REST API — all business logic lives in the API layer.
Ready to connect your AI agent to a messaging API? Get your API key at senderZ.com, run the install command, and start sending iMessage and SMS from Claude Code in under two minutes.
For the complete API reference, visit the SDK documentation. For MCP-specific configuration options, see the MCP server docs. To learn how senderZ fits into AI agent workflows, check out the AI agents solutions page.