Dylan AndersenDylan Andersen's Docs
Cursor + SalesforceGetting Started with Cursor

First Steps

A comprehensive guide to using Cursor for Salesforce development with LWCs, MCP, and Agentforce

First Steps

What this guide covers

This guide is written for Salesforce SEs on a Mac getting Cursor set up for Agentforce, LWCs, Flows, and Apex. If you're on Windows or Linux, everything still works — the commands and screenshots lean macOS, but we call out the Windows path where it matters. If you haven't spent much time in pro-code tools, you're exactly who this was written for. It assumes nothing.

Don't want to run terminal commands?

Most of the steps in this guide include terminal commands. If you're not comfortable with a shell, you can ask Cursor's Agent to run them for you. A good prompt at any point is: "Follow the steps on this page, stopping to ask me before anything that touches my Salesforce org." The Agent can install tools, scaffold projects, and run sf commands on your behalf.

Foundations

Tools and integrations

Coding with Cursor

Agentforce

Why Cursor for Salesforce

The pitch in one sentence

Cursor gives an SE the same AI workflow an engineer gets, wired into the Salesforce CLI, Org Browser, and Agentforce DX, so you can build and ship a POC in the time it used to take to scope one.

Prerequisites

Before you start, you need:

  • A Mac (primary audience) or a Windows laptop — see What If I Use Windows?
  • Basic terminal comfort, or the willingness to let Cursor's Agent run commands for you
  • A Salesforce org to build in (Dev Edition, Trailhead Playground, scratch org, or sandbox)
  • Cursor installed

What you'll have at the end

  1. A configured Salesforce development environment
  2. A first Lightning Web Component deployed to an org
  3. Cursor talking to that org through MCP
  4. A starter set of rules and AGENTS.md in your repo
  5. A library of prompts, rules, and skills you can pull from on the next POC

Ready to start?

Start with macOS Environment Setup and follow the cards down the list. If you're on Windows, begin with What If I Use Windows? first.

On this page