MCP Server
Mushu includes an MCP (Model Context Protocol) server that lets AI assistants like Claude and Cursor interact with your Mushu account directly. You can create organizations, manage tenants, and send push notifications through natural language.
What is MCP?
The Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. Mushu's MCP server provides tools for authentication, organization management, and push notifications.
Setup
Prerequisites
- Node.js 18 or later
- Mushu CLI installed and authenticated (
mushu auth login)
Claude Desktop
Add Mushu to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mushu": {
"command": "npx",
"args": [
"-y",
"mushu-mcp"
]
}
}
} Restart Claude Desktop to load the server.
Cursor
Add to your Cursor MCP settings:
{
"mushu": {
"command": "npx",
"args": [
"-y",
"mushu-mcp"
]
}
} Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"mushu": {
"command": "npx",
"args": [
"-y",
"mushu-mcp"
]
}
}
} Authentication
The MCP server uses the same credentials as the CLI. Make sure you've
authenticated with mushu auth login before using the MCP tools.
Available Tools
Authentication
| Tool | Description |
|---|---|
auth_status | Check if authenticated and get current user info |
auth_validate | Validate the current auth token |
auth_user | Get the current user profile |
Organizations
| Tool | Description |
|---|---|
org_create | Create a new organization |
org_list | List organizations you belong to |
org_get | Get organization details |
org_delete | Delete an organization (owner only) |
org_list_members | List organization members |
org_add_member | Add a member to an organization (admin only) |
org_update_member | Organization ID |
org_remove_member | Remove a member from an organization (admin only) |
org_my_membership | Get your membership in an organization |
Tenants
| Tool | Description |
|---|---|
notify_list_tenants | List all notification tenants for an organization |
notify_create_tenant | Create a new notification tenant with APNs credentials |
Devices
| Tool | Description |
|---|---|
notify_register_device | Register a device token for push notifications |
notify_list_devices | List registered devices for a tenant |
Push Notifications
| Tool | Description |
|---|---|
notify_send_push | Send a push notification to a user |
other
| Tool | Description |
|---|---|
pay_list_tenants | List pay tenants for an organization |
pay_create_tenant | Create a new pay tenant with Stripe credentials |
pay_get_tenant | Get a pay tenant by ID |
pay_delete_tenant | Delete a pay tenant |
pay_list_products | List products for a pay tenant |
pay_create_product | Create a product (credit pack or subscription) |
pay_get_customer | Get or create a customer and their balance |
pay_get_balance | Pay tenant ID |
pay_modify_credits | Add or deduct credits for a customer |
pay_create_checkout | Create a Stripe checkout session for a product |
pay_create_api_key | Create an API key for a pay tenant |
pay_list_api_keys | List API keys for a pay tenant |
media_list | List media items for an organization |
media_get | Get a media item by ID |
media_get_image_urls | Get image variant URLs (thumbnail, small, medium, large, original) |
media_get_video_info | Get video info and playback URLs (HLS, DASH) |
media_get_upload_url | Get a presigned URL to upload an image |
media_get_video_upload_url | Get a direct upload URL for video (Cloudflare Stream) |
media_confirm_upload | Confirm an image upload after uploading to presigned URL |
media_delete | Delete a media item |
Tool Reference
auth_status
Check if authenticated and get current user info
No parameters required.
auth_validate
Validate the current auth token
No parameters required.
auth_user
Get the current user profile
No parameters required.
org_create
Create a new organization
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
name | string | Organization name | Yes |
org_list
List organizations you belong to
No parameters required.
org_get
Get organization details
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
org_delete
Delete an organization (owner only)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
org_list_members
List organization members
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
org_add_member
Add a member to an organization (admin only)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
userId | string | User ID to add | Yes |
role | string | Role to assign (default: member) | No |
org_update_member
Organization ID
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
userId | string | User ID to update | Yes |
role | string | New role | Yes |
org_remove_member
Remove a member from an organization (admin only)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
userId | string | User ID to remove | Yes |
org_my_membership
Get your membership in an organization
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
notify_list_tenants
List all notification tenants for an organization
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID to list tenants for | Yes |
notify_create_tenant
Create a new notification tenant with APNs credentials
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID that will own this tenant | Yes |
bundleId | string | iOS app bundle ID (e.g., com.myapp.ios) | Yes |
teamId | string | Apple Developer Team ID | Yes |
keyId | string | APNs Key ID | Yes |
privateKey | string | APNs private key (.p8 file contents) | Yes |
useSandbox | boolean | Use APNs sandbox environment (default: true) | No |
notify_register_device
Register a device token for push notifications
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Tenant ID | Yes |
userId | string | User ID to associate with the device | Yes |
token | string | APNs device token | Yes |
platform | string | Device platform | Yes |
appVersion | string | App version (optional) | No |
apiKey | string | Tenant API key (optional, uses auth token if not provided) | No |
notify_list_devices
List registered devices for a tenant
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Tenant ID | Yes |
userId | string | Filter by user ID (optional) | No |
apiKey | string | Tenant API key (optional) | No |
notify_send_push
Send a push notification to a user
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Tenant ID | Yes |
userId | string | User ID to send notification to | Yes |
title | string | Notification title | No |
body | string | Notification body | No |
badge | number | Badge count (optional) | No |
sound | string | Sound name (optional) | No |
data | object | Custom data payload (optional) | No |
silent | boolean | Send as silent/background notification | No |
apiKey | string | Tenant API key (optional) | No |
pay_list_tenants
List pay tenants for an organization
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
pay_create_tenant
Create a new pay tenant with Stripe credentials
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
name | string | Tenant name | Yes |
mode | string | Integration mode (default: direct) | No |
stripeSecretKey | string | Stripe secret key (required for direct mode) | No |
stripeWebhookSecret | string | Stripe webhook secret (optional) | No |
pay_get_tenant
Get a pay tenant by ID
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
pay_delete_tenant
Delete a pay tenant
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
pay_list_products
List products for a pay tenant
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
apiKey | string | Tenant API key (optional) | No |
pay_create_product
Create a product (credit pack or subscription)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
name | string | Product name | Yes |
billingModel | string | Billing model | Yes |
priceCents | number | Price in cents (1000 = $10) | Yes |
credits | number | Credits to grant on purchase (for one_time) | No |
apiKey | string | Tenant API key (optional) | No |
pay_get_customer
Get or create a customer and their balance
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
customerId | string | Customer ID (your user ID) | Yes |
email | string | Customer email (optional) | No |
apiKey | string | Tenant API key (optional) | No |
pay_get_balance
Pay tenant ID
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
customerId | string | Customer ID | Yes |
apiKey | string | Tenant API key (optional) | No |
pay_modify_credits
Add or deduct credits for a customer
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
customerId | string | Customer ID | Yes |
amount | number | Credits to add (positive) or deduct (negative) | Yes |
description | string | Description of the transaction | Yes |
apiKey | string | Tenant API key (optional) | No |
pay_create_checkout
Create a Stripe checkout session for a product
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
customerId | string | Customer ID | Yes |
productId | string | Product ID to purchase | Yes |
successUrl | string | URL to redirect after successful payment | Yes |
cancelUrl | string | URL to redirect on cancel | Yes |
apiKey | string | Tenant API key (optional) | No |
pay_create_api_key
Create an API key for a pay tenant
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
name | string | API key name | Yes |
pay_list_api_keys
List API keys for a pay tenant
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
tenantId | string | Pay tenant ID | Yes |
media_list
List media items for an organization
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
media_get
Get a media item by ID
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
mediaId | string | Media ID | Yes |
media_get_image_urls
Get image variant URLs (thumbnail, small, medium, large, original)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
mediaId | string | Media ID of the image | Yes |
media_get_video_info
Get video info and playback URLs (HLS, DASH)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
mediaId | string | Media ID of the video | Yes |
media_get_upload_url
Get a presigned URL to upload an image
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
filename | string | Filename for the upload | Yes |
contentType | string | Content type (e.g., image/png, image/jpeg) | Yes |
sizeBytes | number | File size in bytes | Yes |
tenantId | string | Optional tenant ID for tenant-specific media | No |
media_get_video_upload_url
Get a direct upload URL for video (Cloudflare Stream)
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
orgId | string | Organization ID | Yes |
filename | string | Filename for the upload | Yes |
maxDurationSeconds | number | Maximum video duration in seconds (default: 3600) | No |
tenantId | string | Optional tenant ID for tenant-specific media | No |
media_confirm_upload
Confirm an image upload after uploading to presigned URL
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
mediaId | string | Media ID from the upload URL response | Yes |
media_delete
Delete a media item
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
mediaId | string | Media ID to delete | Yes |
Example Workflows
Send a push notification
Ask Claude: "Send a push notification to user abc123 with the title 'Hello' and body 'Test message'"
List your organizations
Ask Claude: "What organizations do I belong to?"
Create a new tenant
Ask Claude: "Create a new tenant for my app com.example.myapp with this APNs key: [paste key contents]"
Troubleshooting
Tools not appearing
- Restart your AI assistant after updating the config
- Verify the config JSON is valid
- Check that Node.js is installed and in your PATH
Authentication errors
- Run
mushu auth statusto verify you're logged in - Run
mushu auth refreshif tokens are expired