Table of contents

Developers building against Salesforce need to know the API names of fields, understand how relationships between objects work, and validate their SOQL queries against real data.
All of that lookup work currently means switching to Salesforce's Setup UI, the object manager, or their API reference, none of which are in the editor.
To help your developers query Salesforce data without leaving Cursor, we'll show you how to connect Salesforce with Merge Agent Handler's Salesforce MCP server.
Merge Agent Handler connects Cursor to Salesforce's API through the Merge CLI.
You install the CLI, authenticate once, and run a single setup command from your project root.
That command writes a ## Merge CLI section to your project's .cursorrules file, which tells Cursor's agent when to call merge search-tools and merge execute-tool to reach Salesforce.
Once connected, Merge handles your Salesforce OAuth credentials and session management so you don't store token state in your local environment.
Here's the command that registers the connection:
Related: The steps for connecting a Salesforce MCP with Codex
Before getting started, you'll need the following:
pipx --version to confirm, or install via pip install pipx)If you want to connect Merge Agent Handler's Salesforce MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Install with pipx: pipx install merge-api
Then confirm the installation: merge --version
Related: How to use a Salesforce MCP in Claude Code
Authenticate the CLI with your Merge Agent Handler account: merge login
This links your session to Merge so the CLI can make authorized requests against Salesforce on your behalf.
Run the following from the root of the project where you want to use Merge tools:
This writes a ## Merge CLI section to .cursorrules so Cursor knows to use the CLI for third-party services. The command is idempotent and safe to re-run if you need to reset.
Open a Cursor chat in your project and try: "List all fields on the Opportunity object in Salesforce, including their API names and field types, so I can map them to our internal data model."
The first time you invoke a Salesforce tool, a Magic Link will appear to complete connector authentication.

{{this-blog-only-cta}}
In case you have more questions on setting up and using the Salesforce MCP in Cursor, we've addressed several more commonly-asked questions below.
With Salesforce connected, Cursor can:
You can build against Salesforce's REST API directly. Salesforce's documentation is thorough, and for a developer working against a single org the initial setup is manageable: create a Connected App, obtain OAuth credentials, and start making requests.
The friction compounds at the team level.
Setting up a Connected App requires Salesforce administrator access, and each developer who needs agent access through Cursor ends up either managing their own credentials or sharing tokens in ways that are difficult to audit.
Salesforce's API surface is also broad. Covering Opportunities, Accounts, Contacts, Leads, Cases, and custom objects with correct field mappings, relationship traversal, and pagination is non-trivial to maintain as Salesforce releases API updates.
Merge Agent Handler handles that maintenance. It centralizes authentication and scopes access so each agent only touches what you explicitly allow, and logs every tool call with a full audit trail.
Developers writing Salesforce integrations have to understand the object model before they can write correct code against it.
What's the API name for the Opportunity owner field? What does a real Account response look like, including relationship fields? Which Stage values are valid in this org?
Those questions have specific answers that live in Salesforce, and getting them currently requires leaving the editor to check the Setup UI or API docs.
With the Salesforce MCP connected, Cursor can answer those questions inline.
You can pull a real Opportunity record to see the exact shape your parsing code will receive, look up a custom field's API name before referencing it in a SOQL query, or retrieve picklist values before writing validation logic.
The Salesforce data and the code that depends on it are in the same session, which removes the back-and-forth between the editor and Salesforce's admin tools.
Use Merge Agent Handler’s 150+ connectors (including Salesforce) to power reliable, secure, and powerful agents.