Suno MCP Agent: Music Generation Through a Signed-In Browser Session
An MCP server that drives Suno's web app in a persistent browser profile, with verified downloads and beat-matching tools.
Status, create, fetch, list and score tools; credit math fixed; encrypted-stream trap avoided by fetching the real MP3; captcha gating surfaced instead of silently failing; beat-period search for cutting video to music.

- Session-based auth with no stored secrets
- Download verification against the real MP3 header
- Captcha and credit states reported truthfully
- Beat-period search instead of quantised BPM
Suno has no public API, and its support team's advice was to automate the logged-in web app. This project does that cleanly: a persistent browser profile holds the session (short-lived bearer tokens are never saved), and a stdio MCP server exposes creation, polling, download and listing as tools any agent can call, alongside CLI equivalents.
The details that make it reliable were each learned the hard way. Available credits are the monthly limit minus usage plus top-ups, not the raw credits field that reads zero on a healthy subscription. The page's audio element points at an encrypted stream that passes every naive success check and opens in no decoder; the real file lives at a separate CDN path and the agent verifies the MP3 header. The generation endpoint returns a batch id at the top level that never renders, so clips are read from the right array. UI selectors are re-learned by a probe script after redesigns, and when generation is captcha-gated the server reports it and waits for a human rather than attempting to solve it.
Beat matching lives here too: a recut tool trims video end-freezes and snaps shots to whole beats using a beat-period search on actual onsets rather than a quantised tempo estimate, picking takes by pulse clarity.
How it works
- Agent calls suno_create with lyrics and style
- Server drives the composer in the signed-in profile
- Clip ids are polled until audio is ready
- Real MP3 is fetched and verified
- Optional recut snaps video shots to the track's beats