drafty
Twilio logo

Build a Twilio messaging dashboard with Claude

Connect the Twilio MCP server to Claude, ask for a messaging and delivery-rate dashboard from your live numbers, and publish it to a link your team comments on directly — no BI tool, no screenshots pasted into Slack.

What you'll build
A self-contained messaging dashboard — messages sent, delivery rate, failures by error code, spend, and a recent-messages log — generated by Claude from your real Twilio data, then published to a drafty.im/canvas/… link. Your team clicks the exact chart or number they want changed and leaves a note. Claude reads the comments and ships a revised version to the same URL.

This is an end-to-end example: connect a data source over MCP, generate a dashboard from live numbers, and close the review loop on one link. Total time, start to shared link, is under fifteen minutes. The same shape works for any of the other examples — only the connection step changes.

Here's the finished dashboard, published to a canvas — click any tile or number to leave a comment, exactly as your team would:

Live canvas — comment on any elementOpen ↗

The three moving parts

  1. The Twilio MCP server gives Claude access to your Twilio account — messages, delivery status, phone numbers, usage — through a controlled set of tools generated from Twilio's own API specs. You authenticate with a scoped API key and choose which services it exposes.
  2. Claude pulls the numbers and writes a single self-contained HTML dashboard. You iterate on it in the artifact panel until it's right.
  3. Drafty turns that HTML into a stable link your team reviews. Comments pin to the exact element; Claude ships the fix to the same URL.

The generation step is fast now. The part this example is really about is the third one — getting the dashboard in front of people without losing their feedback to a screenshot circled in Preview.

Step 1 — Connect the Twilio MCP server

Twilio publishes an official MCP server as the @twilio-alpha/mcp package. It runs locally over npx and authenticates with an Account SID plus an API Key and Secret — formatted as a single SID/KEY:SECRET string — so you never paste your full Auth Token into a config file.

In Claude Code:

claude
claude mcp add twilio -- npx -y @twilio-alpha/mcp "YOUR_ACCOUNT_SID/YOUR_API_KEY:YOUR_API_SECRET"

Replace the placeholders with a real Account SID and an API Key/Secret pair from the Twilio Console (Account → API keys & tokens → Create API key). Then run /mcp inside Claude Code to confirm the twilio server connected.

In Claude Desktop: open Settings → Developer → Edit Config, and add the server under mcpServers:

claude
{ "mcpServers": { "twilio": { "command": "npx", "args": ["-y", "@twilio-alpha/mcp", "YOUR_ACCOUNT_SID/YOUR_API_KEY:YOUR_API_SECRET"] } } }

To keep the tool surface small and read-shaped, scope it to messaging with the --services or --tags flags — for example append --services twilio_api_v2010 so Claude only loads the core messaging and usage APIs.

Safety first
Create a dedicated API key for this rather than reusing your account Auth Token, and treat it as read-only by only ever asking Claude to fetch and summarize — a reporting dashboard has no reason to send messages or buy numbers. Never commit the SID/KEY:SECRET string to a repo, and revoke the key in the Console if it's exposed.

Step 2 — Pull the numbers

Ask Claude in plain language. It uses the MCP server's read tools to fetch real data from the Messages and Usage APIs:

claude
Using the Twilio MCP server, pull everything we need for a messaging dashboard: total messages sent in the last 30 days, the delivery rate (delivered vs. sent), counts of failed and undelivered messages broken down by error code, messaging spend this month vs. last month, and the 10 most recent outbound messages with their status. Summarize the figures before you build anything.

Claude calls Twilio, returns the figures, and you sanity-check them against the Twilio Console before going further. This is the moment to catch a wrong assumption — a test-credential SID, a date range off by a timezone, a status you're counting as "delivered" that's really "sent" — while it's cheap.

Step 3 — Build the dashboard

Once the numbers look right, ask for the artifact:

claude
Build a single self-contained HTML dashboard from those figures. Delivery rate as the hero number with month-over-month change, then tiles for messages sent, failures, and spend. Add a breakdown of failures by error code and a recent-messages log at the bottom. Clean, no external dependencies — inline the CSS and any chart code.

Claude renders it live in the artifact panel. Iterate in place — you're not regenerating from scratch:

Step 4 — Publish to Drafty for review

A Claude artifact link is a preview, not a stable URL — iterate the artifact and the link you already sent now shows the old version. Ask Claude to publish it to a Drafty canvas instead, so the link you share always stays current:

claude
Publish this dashboard to Drafty as a canvas and give me the shareable link.

Claude pushes the dashboard and hands back a drafty.im/canvas/… link that renders on any device. Send it — your team opens it in a browser, no login and no Claude account needed.

Step 5 — The review loop

This is the part that's not obvious until you've done it once.

A reviewer clicks the specific tile, chart, or number they want changed and leaves a pinned comment — "this delivery rate looks high, are we counting queued messages as delivered?" The comment is anchored to that element, not floating in a Slack thread. Claude reads the comments through the CLI, reruns the relevant Twilio query if needed, and pushes a revised dashboard to the same URL. The reviewer refreshes and sees the change; the thread stays attached to the element.

The mechanic matters because of what it removes. A Slack message about a chart produces "the number on the left looks wrong." A pinned comment on the actual tile produces "this — exclude queued messages from the delivered count." One of those produces a correct revision; the other produces a guess.

Keeping it fresh

An MCP-generated dashboard is a snapshot — it holds the numbers Claude pulled when it built it; it doesn't re-query Twilio when someone opens the link. For a weekly review or a board-ready snapshot, that's fine.

To make it a live canvas that always shows today's figures, copy this prompt — Claude sets up the refresh for you and schedules it to run on its own:

claude
Turn this Twilio dashboard into a live canvas: every morning, re-pull the latest messaging and delivery numbers from Twilio via the MCP server, rebuild the dashboard, and push a new version to the same canvas URL so the link always shows today's figures. Schedule it to run daily on its own.

The link stays stable while the content updates underneath it — see keeping a canvas updated automatically.

What to watch for

Twilio dashboard with Claude — FAQ

Do I need to paste my Twilio Auth Token anywhere?
No. The Twilio MCP server authenticates with an Account SID plus a dedicated API Key and Secret, passed as a single SID/KEY:SECRET string. Create the API key in the Twilio Console rather than reusing your account Auth Token, and never commit the string to a repo. Revoke the key in the Console if it's ever exposed.
Is the dashboard live or a snapshot?
A snapshot. It contains the numbers Claude pulled when it built the file; it does not re-query Twilio when someone opens the link. To refresh it, ask Claude to repull and re-push to the same URL — or put that on a daily schedule so the stable link always shows current numbers.
Can my team comment without a Twilio or Claude account?
Yes. The dashboard is published to a Drafty canvas link that renders in any browser. Reviewers click the exact element they want changed and leave a pinned comment with no login required. Only the person connecting Twilio needs access to the account.
Is it safe to give Claude access to my Twilio account?
Connect with a dedicated, scoped API key and keep the task read-only — only ask Claude to fetch and summarize messaging data, never to send messages or buy numbers. Scope the MCP server to the services you need with the --services flag, and in Claude you approve tool calls. Don't reuse a full-access credential for a read-only reporting task.
How is this different from Twilio's own Console or Insights?
The Console and Messaging Insights give you Twilio's standing, governed reporting — the right choice for live monitoring and alerting at scale. This approach is for a fast, shareable snapshot you can spin up in minutes, shape exactly how you want by talking to Claude, then collect feedback on inline. Different jobs: one is a standing system, the other is a quick reviewable deliverable.