Connect
Salesforce to
Claude Code
- Where do our UTMs get lost?
https://mcp.lemonado.io/mcpUse Claude Code to check how leads reach Salesforce from your forms, and save pipeline analysis you can rerun. Lemonado connects them in about 1 minute, no API keys needed.
https://mcp.lemonado.io/mcpWhy connect Salesforce to Claude Code?
Lead source problems usually start in code: a form that drops UTMs, a webhook that maps the wrong field. Claude Code sees that code, and with Lemonado it can check what actually lands in Salesforce, then save the analysis as scripts in your repo.
All your Salesforce data
Leads and their lead source, ready to ask about.
Always today's numbers
Opportunities, stages, amounts and close dates, synced from Salesforce automatically, so answers use today's numbers.
Connect all your tools
Questions like "What does an opportunity cost?" use Salesforce and HubSpot, LinkedIn Ads at once.
How to connect Salesforce to Claude Code
Before you start
- A Salesforce account you can sign in to
- Claude Code installed
- A Lemonado account (the free trial works)
- 1
Connect Salesforce in Lemonado
In Lemonado, open Connectors, find Salesforce and sign in. Connect with a Salesforce login whose profile can view leads, opportunities and campaigns. Sandbox orgs work too, if you want to try it there first.
- 2
Turn on external access
In the company's settings, open External tools, turn the connection on, choose which sources it can reach and copy the server URL.
texthttps://mcp.lemonado.io/mcp - 3
Add the server
With Claude Code installed, run one of these in your terminal. Most people want the first: it adds Lemonado to every project.
bash# every project (recommended) claude mcp add --scope user --transport http lemonado https://mcp.lemonado.io/mcp # this project only claude mcp add --transport http lemonado https://mcp.lemonado.io/mcp - 4
Sign in
Start Claude Code with claude and run /mcp. Choose Lemonado and finish the sign-in in your browser.
bashclaude /mcp - 5
Ask Claude Code about Salesforce
Ask a question about the accounts your connection can reach. Claude Code can also write the numbers into a file or a script for you. Try "Our demo form passes UTMs to Salesforce. Trace each one from the form code to the lead field it should land in, and flag any that stay blank on recent leads." Or ask: "Do our ads point at real campaigns?" or "Can it report on its own?"
Good to know
- The command uses Claude Code's default local scope. Use --scope user to share the server across projects.
What can Claude Code do with Salesforce?
Claude Code queries your Salesforce data while it works in your repo: it saves data as files, checks tracking against code and runs headless with claude -p.
Our demo form passes UTMs to Salesforce. Trace each one from the form code to the lead field it should land in, and flag any that stay blank on recent leads.
utm_campaign maps to Campaign_Name__c in api/leads.ts, but the field was renamed UTM_Campaign__c in September. It has been empty on every lead since.
Source: Salesforce + your code
Match the utm_campaign values in our ad links config with Salesforce campaign names. Which ads point to campaigns that don't exist?
7 of 52 ads use campaign names Salesforce doesn't have. Five are spring campaigns renamed in April, so their leads never join a campaign.
Source: Salesforce + your code
Create a prompt file for claude -p that writes reports/opps-by-source.md with last week's opportunities by lead source and their total amount.
Saved prompts/opps-by-source.md. Schedule claude -p with it and the report rewrites itself from fresh Salesforce data each time.
Source: Salesforce + your code
Export this quarter's Salesforce leads with email domain and company name to data/leads.csv, then write a script that flags likely duplicates.
Saved, with scripts/dedupe_leads.py. It flags 284 likely duplicates, most from people who filled in both the demo and the pricing form.
Source: Salesforce + your code
At which stage do we lose the most opportunities this year, and what are the top loss reasons there?
Most losses happen at Proposal: 46% of lost deals. The top reason logged is "No budget", followed by "Went with incumbent".
Source: Salesforce
Opportunities created from Google Ads and from LinkedIn Ads this year, by month, set against what we spent on each.
Google Ads: $1,150 per opportunity. LinkedIn: $2,800, but LinkedIn opportunities average $41k against $17k from search.
Source: Salesforce
Connect Salesforce to another AI app.
Claude
Connect Salesforce to Claude
ChatGPT
Connect Salesforce to ChatGPT
Cursor
Connect Salesforce to Cursor
VS Code (GitHub Copilot)
Connect Salesforce to VS Code (GitHub Copilot)
Codex
Connect Salesforce to Codex
Perplexity
Connect Salesforce to Perplexity
Google Antigravity
Connect Salesforce to Google Antigravity
Windsurf (Devin Desktop)
Connect Salesforce to Windsurf (Devin Desktop)
Zed
Connect Salesforce to Zed
n8n
Connect Salesforce to n8n
Other integrations for Claude Code
All Claude Code integrations- HubSpot in Claude CodeAsk Claude, ChatGPT or Cursor which campaigns bring deals, with HubSpot next to your ad spend.
- LinkedIn Ads in Claude CodeAsk Claude, ChatGPT or Cursor about LinkedIn campaigns, lead forms and who converts.
- Google Ads in Claude CodeAsk Claude, ChatGPT or Cursor about your Google Ads campaigns, search terms and spend.
- Google Analytics in Claude CodeAsk Claude, ChatGPT or Cursor about GA4 traffic, conversions and funnels, next to your ad spend.
- Semrush in Claude CodeAsk Claude, ChatGPT or Cursor about rankings and keyword gaps, with Search Console and Google Ads in the same answer.
- Ahrefs in Claude CodeAsk Claude, ChatGPT or Cursor about backlinks and top pages, with Search Console and GA4 next to them.
Reading this as an AI agent?
Everything an agent needs to set this up, in plain text. Paste this page's link into Claude Code and ask it to connect you, or copy the block.
# Connect Salesforce to Claude Code (Lemonado MCP) - Server URL: https://mcp.lemonado.io/mcp - Transport: Streamable HTTP - Auth: OAuth; the user signs in to Lemonado in the browser. No API keys. - In Lemonado: connect the Salesforce org. Connect with a Salesforce login whose profile can view leads, opportunities and campaigns. Sandbox orgs work too, if you want to try it there first. - In Claude Code: Terminal: claude mcp add ```bash # every project (recommended) claude mcp add --scope user --transport http lemonado https://mcp.lemonado.io/mcp # this project only claude mcp add --transport http lemonado https://mcp.lemonado.io/mcp ``` If you are Claude Code, run the setup yourself: Add the Lemonado MCP server for all my projects by running: claude mcp add --scope user --transport http lemonado https://mcp.lemonado.io/mcp Then tell me to run /mcp and sign in to Lemonado. Once I've signed in, list the Salesforce accounts Lemonado can reach. First question to try: "Our demo form passes UTMs to Salesforce. Trace each one from the form code to the lead field it should land in, and flag any that stay blank on recent leads." More: https://lemonado.io/integrations/salesforce · https://lemonado.io/llms.txt
Frequently Asked Questions
No, they do different jobs. Salesforce DX MCP helps developers build on the Salesforce platform: metadata, Apex and deployments. Lemonado reads Salesforce as marketing data, next to your ad platforms and analytics, so Claude Code can answer questions about pipeline and lead sources.
Yes. Salesforce's hosted MCP servers is hosted, so Claude Code can use it too. It covers Salesforce only. Lemonado covers Salesforce plus your ad platforms, GA4 and the rest of your stack in one connection, so Claude Code can answer questions across them.
Run claude mcp list to see whether lemonado is connected. If it needs authentication, run /mcp inside Claude Code and sign in again. In Lemonado, check that Salesforce is connected and External tools is on for the company. If records are missing, check that user's profile and sharing rules. Salesforce only shares what that user can see, and your edition needs API access.
Yes, if both are connected in Lemonado. One connection reaches every source you allow, so you can ask things like "Opportunities created from Google Ads and from LinkedIn Ads this year, by month, set against what we spent on each."
MCP is included in Lemonado's paid plans and in the free trial, so you can try it before you pay.
Still have a question?
Shoot us an email at hello@lemonado.io.
Try for freeStop fighting with data. Start feeding your AI.
Connect your data to AI and free your team from reporting and busywork.
Try Lemonado free