drafty
Salesforce logo

Build a Salesforce pipeline dashboard with Claude

Connect the Salesforce DX MCP server to Claude, ask for a pipeline and forecast dashboard from your live CRM data, 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 sales dashboard — open pipeline by stage, weighted forecast vs. quota, win rate, average deal size, deals slipping this quarter, and the top open opportunities — generated by Claude from your real Salesforce data via SOQL, then published to a drafty.im/canvas/… link. Your team clicks the exact stage bar 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 Salesforce DX MCP server gives Claude read access to your org — opportunities, accounts, forecasts, users — through a controlled set of tools, including a SOQL query tool. It runs locally and uses the org you've already authorized with the Salesforce CLI; you pick which toolsets are exposed.
  2. Claude runs the SOQL, 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 your sales leaders without losing their feedback to a screenshot circled in Preview.

Step 1 — Connect the Salesforce DX MCP server

Salesforce publishes an official MCP server, @salesforce/mcp. It runs locally via npx and talks to whatever org you've authorized with the Salesforce CLI — so no token is pasted into a config file.

First, authorize your org. Install the Salesforce CLI if you don't have it, then log in through the browser over OAuth:

claude
sf org login web

Then add the MCP server to Claude Code, scoped to the data toolset so it can query but not deploy or modify metadata:

claude
claude mcp add salesforce -- npx -y @salesforce/mcp --orgs DEFAULT_TARGET_ORG --toolsets data

Run /mcp inside Claude Code to confirm it connected. The data toolset includes the run_soql_query tool — that's all this dashboard needs.

In Claude Desktop: open Settings → Connectors → Edit config, and add the same npx -y @salesforce/mcp --orgs DEFAULT_TARGET_ORG --toolsets data command as a custom MCP server.

Safety first
Scope the server to the data toolset only — that exposes querying, not metadata deploys or user changes. Authorize a Salesforce user whose profile and field-level security already limit them to read access on the objects you need; the MCP server respects your org's sharing rules and permissions, so the dashboard can only ever see what that user can see. Don't grant write or admin toolsets for a read-only reporting task.

Step 2 — Pull the numbers

Ask Claude in plain language. It uses the MCP server's run_soql_query tool to fetch real data from your org:

claude
Using the Salesforce MCP server, pull everything we need for a sales pipeline dashboard for the current fiscal quarter: total open pipeline amount grouped by stage, count and amount of open opportunities, weighted forecast (amount × probability) vs. the team quota, closed-won vs. closed-lost this quarter for win rate, average deal size, count of open deals whose close date has slipped past its original date, and the 10 largest open opportunities with owner, stage, amount and close date. Use SOQL and summarize the figures before you build anything.

Claude runs the SOQL, returns the figures, and you sanity-check them against a Salesforce report before going further. This is the moment to catch a wrong assumption — a sandbox org, a custom fiscal calendar, opportunity records you didn't expect in the open set — 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. Weighted forecast vs. quota as the hero with attainment percentage, then a horizontal bar chart of open pipeline by stage, tiles for total pipeline, win rate, and average deal size, and a table of the top open opportunities 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 sales leaders open 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 stage bar, tile, or number they want changed and leaves a pinned comment — "this forecast looks high, are we excluding the deals stuck in Negotiation past their close date?" The comment is anchored to that element, not floating in a Slack thread. Claude reads the comments through the CLI, reruns the relevant SOQL 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 opportunities with a past close date from the weighted forecast." 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 Salesforce when someone opens the link. For a weekly pipeline 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 Salesforce dashboard into a live canvas: every morning, re-run the SOQL queries against Salesforce via the MCP server, rebuild the dashboard, and push a new version to the same canvas URL so the link always shows today's pipeline and forecast. 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

Salesforce dashboard with Claude — FAQ

Do I need to paste my Salesforce credentials anywhere?
No. You authorize your org once with the Salesforce CLI (sf org login web), which logs in through the browser over OAuth and stores the connection locally. The @salesforce/mcp server reuses that authorized org, so no username, password, or token goes into a config file or repo.
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 Salesforce when someone opens the link. To refresh it, ask Claude to rerun the SOQL and re-push to the same URL — or put that on a daily schedule so the stable link always shows current pipeline and forecast.
Can my team comment without a Salesforce 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 Salesforce needs access to the org.
Is it safe to give Claude access to my Salesforce org?
Scope the MCP server to the data toolset (querying, not metadata or admin), and authorize a user whose profile, field-level security, and sharing rules already limit them to read access on the objects you need. The server enforces your org's security model, so Claude can only see what that user can see. Don't expose write toolsets for a read-only reporting task.
How is this different from a Salesforce report or CRM Analytics dashboard?
Reports and CRM Analytics query live data against dashboards you build and govern in-org — the right choice for standing reporting at scale. This approach is for a fast, shareable snapshot you can spin up in minutes and iterate by talking to Claude, then collect feedback on inline. Different jobs: one is a standing system, the other is a quick reviewable deliverable.