Picture this: your retail website testing team is doing their daily rounds and discovers that the navigation menu has stopped working. Clicks go nowhere. Dropdowns don't drop. The whole thing is broken.
What happens next? In most orgs, the tester opens a browser tab, navigates to Salesforce, logs in, finds the right queue, and manually fills out a case form. By the time the case is raised, ten minutes have passed and the tester's flow is completely broken.
There's a better way. Let's build a custom Salesforce MCP server and wire it up to Claude so that raising a case becomes a single conversational message — no Salesforce login required.
The old workflow — and why it hurt
Tester finds a bug → opens Salesforce → logs in → navigates to case creation → fills subject, description, priority manually → assigns to Website Errors Queue → saves → back to testing.
Tester finds a bug → opens Claude → describes the issue in natural language → Claude creates the Salesforce case automatically, pre-filled and assigned correctly. Done.
The architecture at a glance
Here's what we're building: a Salesforce autolaunched flow that accepts inputs and creates a Case, a Salesforce MCP server that exposes that flow as a callable tool, and a custom connector in Claude that ties everything together.
Part 1 — Build the autolaunched flow
Head to Setup → Process Automation → Flows and create a new Autolaunched Flow. This is the engine that will actually create the Salesforce case when Claude calls the MCP server. Here's exactly how the flow is structured:
-
1Create three input variables —
Subject(Text),Description(Text), andPriority(Text). Mark all three as "Available for Input" so the MCP server can pass values into them at runtime. -
2Get Record Type — add a Get Records element. Object: RecordType. Filter:
Name = "Case"andSobjectType = "Case". Store the Id in a variable likeCaseRecordTypeId. -
3Get Queue — add another Get Records element. Object: Group. Filter:
Name = "Website Errors Queue"andType = "Queue". Store the Id inQueueId. -
4Create Help Request — add a Create Records element and map the fields: Subject →
{!Subject}, Description →{!Description}, Priority →{!Priority}, Origin →"Website"(hardcoded), Status →"New", OwnerId →{!QueueId}, RecordTypeId →{!CaseRecordTypeId}. -
5Add a Fault path on the Create Records element — the fault connects to an Assign Error Message assignment element, then to an End. This ensures Claude gets a meaningful error back if case creation fails rather than a silent timeout.
-
6Check if CaseId is Null — a Decision element after the create step verifies the record was successfully created. Route to a success path if the CaseId is populated, or handle gracefully if not.
-
7Save and activate the flow. Give it a meaningful API name like
Log_Case_for_Website_Errors— you'll see this name again when adding it to the MCP server.
Part 2 — Create the Salesforce MCP server
-
8Go to Setup → MCP Servers and click "Create Salesforce MCP Server". Give it a label (e.g., Website Error Case Logger), an API name, and a short description — Claude uses this to understand when to invoke the server.
-
9On the MCP server record, click "Add Server Assets" → "Add Tools". In the popup, switch the filter to Flows, search for your autolaunched flow, and click "Add Tool".
-
10Navigate to the Tools tab on the MCP server record. Your flow will be listed as a tool with Subject, Description, and Priority automatically mapped as input parameters from the flow's input variables.
-
11Activate the MCP server using the toggle on the record. The server is not callable until it's active.
Part 3 — Create the external client app
Before Claude can talk to the MCP server, you need an External Client App in Salesforce to handle OAuth authentication. The detailed walkthrough — including OAuth scopes, callback URLs, and where to find your consumer key and secret — is covered step by step in this video. Follow it to generate your Auth Key and Auth Secret.
Part 4 — Connect the MCP server to Claude
-
12In Claude, go to Settings → Connectors → Add Custom Connector.
-
13Fill in the Connector Name (e.g., My Salesforce Org), paste the MCP Server URL from your Salesforce Setup page, then enter your Auth Key and Auth Secret from the External Client App.
-
14Click Connect. Claude will verify the credentials and the connector will show a green connected status. Your Salesforce MCP server is now a live tool Claude can invoke.
Part 5 — Seeing it in action
Here's the moment it all comes together. A tester types one natural sentence into Claude. No Salesforce tab, no case form, no queue navigation. Watch what happens:
Notice a few things happening in that conversation that make this truly powerful:
-
1Claude searches available tools first. The "Searched available tools" indicator shows Claude automatically discovered the connected Salesforce MCP server and identified it as the right tool for this request — without being told.
-
2Claude asks exactly the right clarifying questions. Instead of guessing, it surfaces the two things the flow actually needs beyond what was provided — a detailed description of the issue and the priority level. Nothing more, nothing less.
-
3Claude calls the flow by name. The "Log Case for Website Errors" indicator confirms Claude invoked your exact MCP tool — your autolaunched flow ran in Salesforce at that moment.
-
4A complete, well-written case is created. Subject, description, and priority are all populated — with Claude composing the description from the tester's conversational answer, not just copy-pasting it.
Why this matters
This isn't just about saving a few clicks — it's about removing an entire context switch from a tester's workflow. When testers don't have to leave their environment to report bugs, they report more bugs, more accurately, with better descriptions (because Claude helps them articulate what they found).
The same pattern works far beyond website bug logging. Any autolaunched flow — lead creation, approval submissions, record updates — can be exposed as an MCP tool and handled conversationally through Claude. Salesforce MCP servers make the whole platform accessible through natural language.
Questions? Find me on sfdcgirl.com — always happy to geek out about Salesforce automation.



0 Comments