NetlifyDiscord MCP

Post failed Netlify deploys to Discord

A Netlify + Discord MCP agent flow

Front-end teams that ship through Netlify live in Discord, not in the Netlify activity feed. So a failed production deploy can sit unnoticed until someone reloads the marketing site and finds yesterday's build. This recipe closes that loop. The agent reads the latest deploy for each site with netlify-deploy-services-reader, checks the deploy state, and when it comes back error it posts into a Discord channel with discord_send: the site name, the deploy state, the branch, and the deploy id. Netlify answers on request rather than pushing, so the agent polls on a cadence and keeps the last deploy id it saw per site, which means a broken build is announced once instead of on every loop.

The flow

Netlifynetlify-deploy-services-reader

Reads deployment information: get a deploy by id or get the latest deploy for a site (get-deploy, get-deploy-for-site).

Discord MCPdiscord_send

Send a message to a specified channel.

Step by step

  1. Read the latest deploy

    The agent calls netlify-deploy-services-reader with get-deploy-for-site for each site id. The response includes the deploy state (building, ready, error), the branch, the commit, and the deploy id.

  2. Flag the errors

    Hold the last deploy id you reported for each site. A deploy whose state is error and whose id you have not seen is a new failure. Ready and building deploys are ignored, so the channel only hears about breakage.

  3. Send to Discord

    For each new failed deploy the agent calls discord_send with the channel and a short message: site, state, branch, and a link built from the deploy id. The team sees it in the channel where they already triage.

Tell your agent

Every three minutes, read the latest Netlify deploy for the marketing and docs sites, and if a deploy state is error and you have not posted it before, send the site, branch, and deploy link to the #deploys Discord channel.

Setup

This flow needs both servers connected to your agent. Follow each install guide:

Worth knowing

  • get-deploy-for-site returns the single most recent deploy, not a history; if two deploys fail back to back between polls you see only the latest, so keep the poll interval tight on busy sites.
  • The deploy state error covers build and deploy failures alike. If you need the reason, follow up with get-deploy by id, which carries the error summary.

Questions

Can it announce successful production deploys?
Yes. Add ready to the states you post on and filter to the production branch if you want a deploy-shipped notice. Most teams keep failures only so the channel stays scannable.
Does this work for preview deploys on pull requests?
The reader returns the latest deploy regardless of context. Filter on the branch field if you want to alert only on production and skip noisy per-PR preview failures.