# Set up your account with the MusicAPI MCP server
URL: https://musicapi.com/docs/ai/mcp-server.md

> Connect Claude Code, Cursor, Claude Desktop or ChatGPT to the MusicAPI MCP server, and let your AI agent set up and run your partner account. Install steps and all 26 tools.

Product: MusicAPI Core and MusicAPI Managed Transfers. Section: Guides for AI.

The MusicAPI MCP server lets an AI agent work on your partner account: read its setup, add integrations, set return URLs, make API keys, set up webhooks and alert rules, check usage, and search these docs. It acts as your dashboard account, after you allow it on a consent page.

```url
https://api.musicapi.com/mcp
```

- Transport: Streamable HTTP.
- Sign-in: OAuth 2.1 with PKCE and dynamic client registration. Your agent registers itself and opens the consent page on `app.musicapi.com`. You sign in to the dashboard as usual and press **Allow**.
- Scopes: `account:read` for the read tools, `account:write` for the write and delete tools.
- An access token lives 1 hour. The agent renews it with a refresh token for up to 30 days.

## Install

**Claude Code**

```bash
claude mcp add --transport http musicapi https://api.musicapi.com/mcp
```

Then run `/mcp` in Claude Code, pick **musicapi** and sign in.

**Cursor**

Add the server to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "musicapi": {
      "url": "https://api.musicapi.com/mcp"
    }
  }
}
```

Cursor shows a **Needs login** button for the server. Press it to open the consent page.

**Claude Desktop**

Open **Settings → Connectors → Add custom connector**, name it `MusicAPI` and paste the server URL. Or add it to `claude_desktop_config.json` through the `mcp-remote` bridge:

```json
{
  "mcpServers": {
    "musicapi": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.musicapi.com/mcp"]
    }
  }
}
```

Restart Claude Desktop. The consent page opens in your browser.

**ChatGPT**

1. In ChatGPT, open **Settings → Apps & Connectors**, and turn on **Developer mode** under **Advanced settings**.
2. Choose **Create** to add a connector.
3. Name it `MusicAPI`, paste the server URL, and pick **OAuth** as the authentication.
4. Save, then sign in on the consent page.
5. In a chat, turn the connector on from the tools menu.

## Try it

Ask your agent things like:

- "Which music services are set up on my MusicAPI account, and which are off?"
- "Add <https://app.example.com/callback> to my return URLs."
- "Create a webhook for transfer.completed and match.report\_ready to <https://api.example.com/webhooks/musicapi>, then send a test event."
- "Page me when more than 5% of calls fail over 15 minutes."
- "How many requests did we make this month?"

## The tools

### Read

| Tool                      | What it does                                                                                        |
| ------------------------- | --------------------------------------------------------------------------------------------------- |
| `get_account`             | Your account: name, slug, return URLs, Managed Transfers settings, evaluation status.               |
| `list_integrations`       | The music services set up on your account, whether each is on, and which content types it may move. |
| `list_api_keys`           | Your API keys: each Client ID in full, each Client Secret masked.                                   |
| `list_integration_users`  | The users who connected a service, newest first, 20 per page. No service tokens.                    |
| `list_transfers`          | Your Managed Transfers runs, newest first, with status and counts.                                  |
| `get_transfer`            | One run: status, progress, groups and the reason when it failed.                                    |
| `list_webhooks`           | Your webhook endpoints, their events and their deliveries of the last 30 days. Secrets masked.      |
| `list_webhook_deliveries` | The delivery log of one endpoint: event, status, attempts, your server's answer.                    |
| `list_alert_rules`        | Your alert rules and whether each one fires now. Secrets masked.                                    |
| `get_usage_summary`       | Billed requests this month and last month, from the same table as the invoices.                     |
| `list_services`           | The services a user can connect, what each supports, and which the catalog search covers.           |
| `search_docs`             | Searches these docs and answers the best pages with an excerpt.                                     |
| `get_doc_page`            | Reads one docs page as Markdown, by its path or URL.                                                |

### Write

| Tool                                | What it does                                                                                                                             |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `create_integration`                | Adds a music service with your own developer app credentials.                                                                            |
| `update_integration`                | Turns an integration on or off, sets its OAuth client id and secret, or its content types.                                               |
| `set_return_urls`                   | Replaces the whole list of Accepted Return URLs.                                                                                         |
| `create_api_key`                    | Makes a Client ID and a Client Secret. The secret shows once, in the answer.                                                             |
| `create_webhook`                    | Adds an endpoint for the events you pick. The signing secret shows once.                                                                 |
| `update_webhook`                    | Changes the URL, the events or the on/off switch of one endpoint.                                                                        |
| `send_test_webhook`                 | Sends a test `transfer.completed` to one endpoint. One per endpoint per minute.                                                          |
| `create_alert_rule`                 | Adds a rule that emails or pages you when a metric passes its threshold.                                                                 |
| `update_alert_rule`                 | Changes one rule.                                                                                                                        |
| `update_managed_transfers_settings` | Changes the branding, the custom domain and the destination of your hosted flow, the transfer emails and the attach-only browser tokens. |

### Delete

These tools carry the MCP `destructiveHint`. A good agent asks you before it runs one.

| Tool                | What it does                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------- |
| `delete_api_key`    | Revokes one key, both halves. Calls with it fail at once. The account's original key cannot be deleted. |
| `delete_webhook`    | Removes one endpoint and its delivery log.                                                              |
| `delete_alert_rule` | Removes one alert rule.                                                                                 |

## What the server never does

- No tool deletes a connected end user, and no tool reads a user's music-service tokens.
- No tool shows a Client Secret or a signing secret again after it was made.

## Revoke access

Open **Settings → Connected apps** in the dashboard. **Apps and AI agents** lists every app that you allowed. **Revoke** stops its tokens at once.
