Bunce MCP Server
Connect your AI assistant to Bunce and manage your customers, events, segments and transactional messages with natural language.
The Model Context Protocol (MCP) is an open standard that lets AI assistants like Claude, Cursor and Codex use external tools. Bunce hosts the MCP server at https://api.bunce.so/mcp. You point your AI app at that URL and add your secret key, so there is nothing to install or keep updated.
Each tool runs the matching API operation for your company. The data, validation, quotas and rate limits are the same as in the REST API.
Getting your API key
- Log in to the Bunce dashboard.
- Open Settings → API & Webhooks.
- Copy your secret key.
| Key | Description | Example |
|---|---|---|
| Secret key | Gives the MCP server access to your company data | sk_live_... |
| Public key | Not accepted by the MCP server | pk_live_... |
Keep your secret key private!
Your secret key can read and change all of your company's data and send messages. Never commit it to version control or share it publicly. Where your AI app supports it, read the key from an environment variable instead of pasting it into a config file.
Hosted endpoint
| Setting | Value |
|---|---|
| URL | https://api.bunce.so/mcp |
| Transport | Streamable HTTP |
| Authentication | Authorization header with your secret key |
Authorization: Bearer sk_live_...Your MCP client sends your key with each request. The server checks it on every call and does not store it. The X-Authorization: sk_live_... header from the REST API also works.
Bunce MCP does not use OAuth sign-in yet. If your AI app can only connect with OAuth, see Other MCP clients.
Setup guides by platform
Pick your AI application below. Replace sk_live_... with the secret key from Settings → API & Webhooks.
Claude (web, desktop and mobile)
Add Bunce as a custom connector. It then works in Claude on the web, in Claude Desktop and in the mobile apps.
- Open Customize → Connectors, click + Add, then Add custom connector. On Team and Enterprise plans, an Owner adds it in Organization settings → Connectors.
- Set the name to
Bunceand the URL tohttps://api.bunce.so/mcp. - Choose No sign in.
- Under Request headers, add
Authorizationwith the valueBearer sk_live_....
Claude connects to Bunce from Anthropic's servers, not from your device.
If you prefer a local setup in Claude Desktop, use the local npm package in claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"bunce": {
"command": "npx",
"args": ["-y", "@bunce/mcp"],
"env": {
"BUNCE_API_KEY": "sk_live_..."
}
}
}
}Claude Code
claude mcp add --transport http bunce https://api.bunce.so/mcp --header "Authorization: Bearer sk_live_..."claude mcp add bunce --env BUNCE_API_KEY=sk_live_... -- npx -y @bunce/mcpRun /mcp in Claude Code to check that bunce is connected.
Cursor
Add to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project. Set BUNCE_API_KEY in your environment.
{
"mcpServers": {
"bunce": {
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer ${env:BUNCE_API_KEY}"
}
}
}
}VS Code (GitHub Copilot)
Add to .vscode/mcp.json. VS Code asks for the key once and stores it.
{
"servers": {
"bunce": {
"type": "http",
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer ${input:bunce-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "bunce-key",
"description": "Bunce secret key",
"password": true
}
]
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json.
{
"mcpServers": {
"bunce": {
"serverUrl": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}OpenAI Codex
Add to ~/.codex/config.toml. The Codex CLI, the Codex IDE extension and the ChatGPT desktop app all read this file.
# Set BUNCE_API_KEY in your environment
[mcp_servers.bunce]
url = "https://api.bunce.so/mcp"
bearer_token_env_var = "BUNCE_API_KEY"[mcp_servers.bunce]
command = "npx"
args = ["-y", "@bunce/mcp"]
env = { BUNCE_API_KEY = "sk_live_..." }ChatGPT
In the ChatGPT desktop app, add Bunce through the Codex config above.
ChatGPT on the web adds tools through connectors, which only accept OAuth sign-in and cannot send an API key. Bunce does not support OAuth yet, so ChatGPT on the web cannot connect to Bunce.
Gemini CLI
Add to ~/.gemini/settings.json. Set BUNCE_API_KEY in your environment.
{
"mcpServers": {
"bunce": {
"httpUrl": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer $BUNCE_API_KEY"
}
}
}
}Zed
Add to ~/.config/zed/settings.json, or use Settings → AI → MCP Servers → Add Server.
{
"context_servers": {
"bunce": {
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}Cline
Open the MCP Servers panel, click Configure MCP Servers and add:
{
"mcpServers": {
"bunce": {
"type": "streamableHttp",
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}Roo Code
In the MCP panel, click Edit Global MCP (or Edit Project MCP for .roo/mcp.json) and add:
{
"mcpServers": {
"bunce": {
"type": "streamable-http",
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}OpenCode
Add to ~/.config/opencode/opencode.json, or to opencode.json in a project. Set BUNCE_API_KEY in your environment. This is the OpenCode v2 format. For v1, put bunce directly under mcp.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"bunce": {
"type": "remote",
"url": "https://api.bunce.so/mcp",
"oauth": false,
"headers": {
"Authorization": "Bearer {env:BUNCE_API_KEY}"
}
}
}
}
}Kiro
Add to ~/.kiro/settings/mcp.json, or to .kiro/settings/mcp.json in a workspace. Set BUNCE_API_KEY in your environment and add it under Settings → Mcp Approved Env Vars.
{
"mcpServers": {
"bunce": {
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer ${BUNCE_API_KEY}"
}
}
}
}JetBrains Junie
Open Tools → Junie → MCP Settings and add the server, or edit ~/.junie/mcp/mcp.json.
{
"mcpServers": {
"bunce": {
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}LM Studio
In the Program tab, click Install → Edit mcp.json and add the server. Remote servers need LM Studio 0.3.17 or later.
{
"mcpServers": {
"bunce": {
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}Continue
Add .continue/mcpServers/bunce.yaml to your workspace. MCP tools work in agent mode, and custom headers need a recent version of Continue.
mcpServers:
- name: bunce
type: streamable-http
url: https://api.bunce.so/mcp
requestOptions:
headers:
Authorization: Bearer sk_live_...Other MCP clients
Most MCP clients accept one of two shapes.
If your client can send custom headers to a remote server, use the hosted URL:
{
"mcpServers": {
"bunce": {
"url": "https://api.bunce.so/mcp",
"headers": {
"Authorization": "Bearer sk_live_..."
}
}
}
}If your client can only start local servers, or cannot send custom headers, use the local npm package:
{
"mcpServers": {
"bunce": {
"command": "npx",
"args": ["-y", "@bunce/mcp"],
"env": {
"BUNCE_API_KEY": "sk_live_..."
}
}
}
}Bunce MCP does not use OAuth yet, so clients that only support OAuth sign-in cannot connect.
Available tools
The hosted MCP server provides these 32 tools. You do not call them by name: ask in plain language and your assistant picks the tool.
Customers
| Example prompt | Description | Tool |
|---|---|---|
| "Find the customer ada@example.com" | List customers, newest first, or search them by name, email or phone | bunce_list_customers |
| "Show me customer BUN-1042" | Get one customer by customer ID | bunce_get_customer |
| "Add ada@example.com as a customer named Ada Lovelace" | Create a customer, or update the one with the same ID or email | bunce_create_customer |
| "Change Ada's phone number to +2348012345678" | Update a customer. Only the fields you send change | bunce_update_customer |
| "Import these 200 customers" | Create or update up to 500 customers in one call | bunce_bulk_create_customers |
Attributes
| Example prompt | Description | Tool |
|---|---|---|
| "What customer attributes do we have?" | List customer attributes with their IDs and data types | bunce_list_attributes |
| "Create a text attribute called plan" | Create a customer attribute (text, numeric or timestamp) | bunce_create_attribute |
| "Set plan to Pro for ada@example.com" | Set attribute values on customers, creating customers that do not exist yet. Can start automations | bunce_set_customer_attributes |
Events
| Example prompt | Description | Tool |
|---|---|---|
| "List our events" | List events with their parameters | bunce_list_events |
| "Show the order_placed event" | Get one event by ID | bunce_get_event |
| "Create an event called order_placed with an amount parameter" | Create an event that can be tracked | bunce_create_event |
| "Track order_placed for ada@example.com with amount 49.99" | Track an event for a customer, creating the customer if needed. Can start automations that send messages | bunce_track_event |
Transactions
| Example prompt | Description | Tool |
|---|---|---|
| "Show our latest transactions" | List customer transactions, newest first | bunce_list_transactions |
| "Show transaction 01HZX3..." | Get one transaction by ID | bunce_get_transaction |
Recording new transactions through MCP is not available yet. Use the API for that.
Segments
| Example prompt | Description | Tool |
|---|---|---|
| "Show our segments" | List segments, newest first | bunce_list_segments |
| "How many customers are in the VIP segment?" | Get one segment with its customer count | bunce_get_segment |
| "Create a segment called VIP" | Create a manual segment, optionally with every customer in it | bunce_create_segment |
| "Rename VIP to VIP customers" | Rename a segment or change its description | bunce_update_segment |
| "Add ada@example.com to VIP" | Add customers to a manual segment, creating the ones that do not exist yet | bunce_add_customers_to_segment |
| "Remove ada@example.com from VIP" | Remove customers from a segment. The customers are not deleted | bunce_remove_customers_from_segment |
Transactional messages and templates
| Example prompt | Description | Tool |
|---|---|---|
| "Show the transactional messages we sent recently" | List the transactional messages you have sent | bunce_list_messages |
| "Show the message 01HZX4..." | Get one sent transactional message with its body | bunce_get_message |
| "What message templates do we have?" | List transactional message templates | bunce_list_message_templates |
| "Show the password reset template" | Get one template, including its message | bunce_get_message_template |
| "Create an email template for password resets with a code variable" | Create a template. Use {{variable}} placeholders in the message | bunce_create_message_template |
Broadcasts and delivery
| Example prompt | Description | Tool |
|---|---|---|
| "Show our recent broadcasts" | List broadcasts with delivery counts | bunce_list_broadcasts |
| "How did the March newsletter do?" | Get one broadcast with its message, delivery counts and tracked links | bunce_get_broadcast |
| "Show the delivery events for the welcome email this week" | List the delivery timeline per customer (sent, delivered, opened and so on), newest first. Covers the last 3 months | bunce_list_message_logs |
Sends
These tools send real messages to real recipients.
| Example prompt | Description | Tool |
|---|---|---|
| "Email ada@example.com her receipt from billing@yourdomain.com" | Send a transactional email from a verified domain | bunce_send_email |
| "Text +2348012345678 their login code" | Send a transactional SMS | bunce_send_sms |
| "Send Ada the order_shipped WhatsApp template" | Send a WhatsApp message with an approved WhatsApp template | bunce_send_whatsapp |
| "Send a push notification to Ada's phone" | Send a push notification to a device | bunce_send_push |
Each send is queued for delivery right away and cannot be undone.
Common workflows
Finding and updating a customer
This is the most common workflow: look someone up, then fix their details.
You: "Find ada@example.com and change her phone number to +2348012345678."
Assistant: Searches with bunce_list_customers, then calls bunce_update_customer:
{
"customer_id": "BUN-1042",
"phone_no": "+2348012345678"
}Result: "Done. Ada Lovelace (BUN-1042) now has the phone number +2348012345678."
Pro tips
- Search matches the start of a first name, last name, email or phone number. Search for
ada, notlovelace@. - Only the fields you mention change.
Importing customers into a segment
Perfect for adding a list of people, such as webinar attendees, to a segment.
You: "Create a segment called Webinar November and add these attendees: ada@example.com, grace@example.com."
Assistant: Calls bunce_create_segment, then bunce_add_customers_to_segment:
{
"segment_id": "01HZX5...",
"customers": [
{ "email": "ada@example.com", "first_name": "Ada" },
{ "email": "grace@example.com", "first_name": "Grace" }
]
}Result: "Created the segment Webinar November and added 2 customers. Grace was new, so she was created."
Pro tips
- Customers that do not exist yet are created.
- For more than 500 people, the assistant splits the list into several calls.
- Adding customers to a segment can start automations that use that segment.
Tracking events
Track what customers do so automations can respond.
You: "Track order_placed for ada@example.com with amount 49.99."
Assistant: Finds the event ID with bunce_list_events, then calls bunce_track_event:
{
"event_id": "01HZX6...",
"payload": {
"email": "ada@example.com",
"amount": 49.99
}
}Result: "Tracked order_placed for ada@example.com."
Requirements
- The event must exist. Create it first with "Create an event called order_placed with email and amount parameters".
- The payload must include the parameter that identifies the customer (email or customer ID).
- Tracking an event can start automations that message the customer, and it uses your quota or wallet balance.
Sending a transactional email
Send one email, such as a receipt or a login code, to one person.
You: "Send ada@example.com a welcome email from hello@yourdomain.com. Subject: Welcome to Acme."
Assistant: Calls bunce_send_email. Most AI apps ask you to approve the send first.
{
"email": "ada@example.com",
"sender_email": "hello@yourdomain.com",
"sender_name": "Acme",
"subject": "Welcome to Acme",
"html": "<p>Hi Ada, welcome to Acme.</p>"
}Result: "The email to ada@example.com is queued for delivery."
Requirements
- The sender email must be on a domain you have verified in Bunce.
- The send uses your email quota or wallet balance.
- To reuse a message, create a template once and send it with
template_idandvariables.
Checking delivery
Find out what happened to a message after it was sent.
You: "Did the welcome email we sent today get delivered?"
Assistant: Finds the message with bunce_list_messages, then calls bunce_list_message_logs:
{
"broadcast_id": "01HZX7...",
"from": "2026-11-12"
}Result: "It was delivered to ada@example.com at 10:02 and opened at 10:15."
Pro tips
- The delivery timeline covers the last 3 months.
- Use the timeline, not the count fields on messages, to check delivery.
Setting up custom attributes
Store extra details on customers, such as their plan.
You: "Create a text attribute called plan and set it to Pro for ada@example.com."
Assistant: Calls bunce_create_attribute, then bunce_set_customer_attributes:
{
"attributes": [
{
"id": "01HZX8...",
"value": "Pro",
"customer_email": "ada@example.com"
}
]
}Result: "Created the plan attribute and set it to Pro for ada@example.com."
Pro tips
- Attribute types are text, numeric and timestamp. Numeric values are numbers such as
42, timestamps are ISO 8601 dates such as2026-11-12T10:00:00Z. - Values are saved in the background and can start automations.
Troubleshooting
Frequently asked questions
Configuration issues
I get "401 Unauthorized" or "Invalid API Key".
The key is missing or wrong.
- Use your secret key (
sk_live_...), not your public key. - Send it as
Authorization: Bearer sk_..., with a space afterBearer. - If you regenerated your keys, update your AI app.
My AI app does not show any Bunce tools.
The app has not loaded the new config.
- Restart the app after you edit its config file.
- Check that the config file is valid JSON (or TOML or YAML).
- In Claude Code, run
/mcpto see the connection status.
The npm package says BUNCE_API_KEY must be a Bunce secret key that starts with sk_live_.
BUNCE_API_KEY is not set, or it is not your secret key.
- Set
BUNCE_API_KEYin theenvsection of your MCP config. - Check for quotes or spaces around the key.
My AI app says npx was not found.
The app cannot find Node.js.
- Install Node.js 20 or later.
- Use the full path to
npxincommand, for example/usr/local/bin/npx. Runwhich npxto find it.
Runtime issues
A tool fails with a validation error.
The request did not pass the same validation as the REST API. The error names the field.
- Ask the assistant to fix the field and try again.
- If your company identifies customers by email, do not send
customer_id, and the other way round.
A tool fails with "Too Many Requests".
You hit a rate limit.
- Each company can make 120 requests per minute to the MCP server.
- Rate limiting on the Bunce API also applies to each tool call.
- Use the bulk tools for large imports, and wait a minute before you retry.
A send or event fails with a quota or wallet error.
Your plan quota or wallet balance is too low.
- Top up your wallet or upgrade your plan in the dashboard.
An email send fails because of the sender.
The sender domain is not verified.
- Verify the domain in the Bunce dashboard, then try again.
A WhatsApp send fails.
- Check that the WhatsApp add-on is active for your company.
- Use an approved WhatsApp template.
Testing your setup
Check that the hosted server is reachable. A 401 means it is up and wants a key:
curl -s -o /dev/null -w "%{http_code}\n" -X POST https://api.bunce.so/mcpCheck that your key works. You get a JSON list of the Bunce tools:
curl -s https://api.bunce.so/mcp \
-H "Authorization: Bearer $BUNCE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Check the local npm package with the MCP Inspector:
npx -y @modelcontextprotocol/inspector --cli -e BUNCE_API_KEY=sk_live_... npx -y @bunce/mcp --method tools/listBest practices
Security
- Never share your secret key or commit it to version control. Read it from an environment variable where your AI app supports it.
- Let the assistant read data before you let it change anything.
- If a key leaks, regenerate it in Settings → API & Webhooks.
Performance
- Use
bunce_bulk_create_customersandbunce_add_customers_to_segmentfor many customers at once (up to 500 per call). - Ask for at most 100 items per page in lists.
Workflow tips
- Let the assistant look up IDs with the list tools before it changes anything.
- Name the exact customer, segment or event you mean.
- Ask the assistant to show what it will do before it does it.
Sends
- Keep approval prompts on for the send tools. Do not auto-approve them.
- Send new messages to your own email address or phone number first.
- Use templates with variables for messages you send often.
Quick reference card
Customers
"Find the customer ada@example.com"
"Add ada@example.com as a customer named Ada Lovelace"
"Import these customers"
Attributes
"Create a text attribute called plan"
"Set plan to Pro for ada@example.com"
Events
"Create an event called order_placed"
"Track order_placed for ada@example.com"
Segments
"Create a segment called VIP"
"Add ada@example.com to VIP"
Messages
"Show our message templates"
"Show our recent broadcasts"
"Did the welcome email get delivered?"
Sends
"Email ada@example.com from hello@yourdomain.com"
"Text +2348012345678 their login code"Alternative: local npm package
Most people should use the hosted server. If your AI app can only start local servers, or cannot send custom headers, use the @bunce/mcp npm package. It runs on your machine and connects to the hosted server, so the tools are the same.
{
"mcpServers": {
"bunce": {
"command": "npx",
"args": ["-y", "@bunce/mcp"],
"env": {
"BUNCE_API_KEY": "sk_live_..."
}
}
}
}The package connects to https://api.bunce.so/mcp. It needs Node.js 20 or later.
To run it by hand:
BUNCE_API_KEY=sk_live_... npx -y @bunce/mcpGet help
- Email hello@bunce.so.
- Suggest changes to this page with the link at the bottom.