suno-mcp
by bycorekci
README.md
# suno-mcp
A small [Model Context Protocol](https://modelcontextprotocol.io) server that lets MCP clients (Claude, Cursor, etc.) generate music through a self-hosted [gcui-art/suno-api](https://github.com/gcui-art/suno-api) instance.
It runs as a Next.js route (`/api/mcp`), so it deploys to Vercel or any Node host, and protects the endpoint with a bearer token.
> This project is not affiliated with Suno. It only forwards requests to a `suno-api` instance you run yourself; make sure your use complies with Suno's terms.
## Tools
| Tool | What it does |
|---|---|
| `generate_song` | Starts a custom-mode generation (title, style tags, lyrics, instrumental flag). Returns clip IDs right away. |
| `get_clips` | Returns status and audio/video URLs for clip IDs (or recent clips if empty). Poll until `status` is `complete`. |
| `generate_lyrics` | Writes lyrics from a short description. |
| `get_credits` | Shows remaining credits and monthly usage. |
## Setup
1. Run a [gcui-art/suno-api](https://github.com/gcui-art/suno-api) instance and note its URL.
2. Configure and start this server:
```bash
cp .env.example .env.local # set SUNO_API_URL and MCP_SECRET
npm install
npm run dev
```
3. Point your MCP client at `http://localhost:3000/api/mcp` with the header `Authorization: Bearer <MCP_SECRET>`.
### Environment variables
| Name | Required | Description |
|---|---|---|
| `SUNO_API_URL` | yes | Base URL of your `suno-api` instance, no trailing slash. |
| `MCP_SECRET` | yes | Bearer token clients must send. Requests are rejected if it is unset. |
## Known limitations
Since Suno's v5.5 model, `audio_url` for new clips may come back as `.../api/forbidden` and direct CDN downloads are blocked (see [gcui-art/suno-api#289](https://github.com/gcui-art/suno-api/issues/289)). `generate_song`, `generate_lyrics` and `get_credits` still work; download finished tracks from suno.com.
## Deploying to Vercel
Import the repo, set the two environment variables, deploy. The route allows up to 300 s per request (`maxDuration`), which needs a plan that supports it.
## License
[MIT](LICENSE) © 2026 Bycorekci, VEFK Media and 3ON
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues