Get started in three steps
Try the demo org, connect your own org, then ask. You need Node.js 20 or later. Connecting your own org also needs the Salesforce CLI.
Try the demo org
The demo org is built in: a made-up solar-installation company called Verdant. There is nothing to log in to, and it takes about two minutes. Pick your assistant, add the snippet, and restart the assistant.
Claude Code
claude mcp add --scope user sf-intelligence-demo -- npx -y sf-intelligence demo
Then start
claudeand ask a question./mcpshows the server as connected.Claude Desktop
{ "mcpServers": { "sf-intelligence-demo": { "command": "npx", "args": ["-y", "sf-intelligence", "demo"] } } }Merge this into the file if it already lists other servers, then fully quit and reopen Claude Desktop.
Cursor
{ "mcpServers": { "sf-intelligence-demo": { "command": "npx", "args": ["-y", "sf-intelligence", "demo"] } } }Cursor doesn't reload this file by itself: turn the server off and on in Settings → MCP. Or add the demo to Cursor in one click.
VS Code + Copilot
{ "servers": { "sf-intelligence-demo": { "type": "stdio", "command": "npx", "args": ["-y", "sf-intelligence", "demo"] } } }VS Code reads the
serverskey, notmcpServers. With the wrong key it loads nothing and shows no error. Use Copilot Chat in Agent mode.Codex
codex mcp add sf-intelligence-demo -- npx -y sf-intelligence demo
[mcp_servers.sf-intelligence-demo] command = "npx" args = ["-y", "sf-intelligence", "demo"] startup_timeout_sec = 30
Codex uses TOML. A longer start-up timeout gives the first download time to finish. Check it with
codex mcp list.Then ask, for example: “Can I delete the Amount field on Invoice?”, “Who can edit Invoices?” or “What runs when a Project is saved?” You can see the answers first.
Connect your own org
Before you start
- Node.js 20 or later. Check with
node --version. - The Salesforce CLI, logged in to your org. Run
sf org login web --alias my-orgif you haven’t yet. - A folder to work in. Run it from your Salesforce project folder, or any empty folder:
initcreatessfdx-project.jsonif there isn’t one.
Read your org once
From that folder, run these two commands. sf-intelligence reads your org’s metadata, read-only, into an
org-kbfolder next to your project. The first read takes a few minutes on a typical sandbox. Runrefreshagain whenever your org changes.npx -y sf-intelligence init --target-org my-org npx -y sf-intelligence refresh
Use the alias you logged in with. It never deploys or changes anything in your org.
Add it to your assistant
Pick your assistant and copy the snippet. Every snippet points at your
org-kbfolder with--vault; use the full path, because most assistants don’t start the server inside your project.Claude Code
claude mcp add --scope project sf-intelligence -- npx -y sf-intelligence mcp --vault "$PWD/org-kb"
--scope projectwrites a.mcp.jsonyou can commit for your team. Check it with/mcp.Claude Desktop
{ "mcpServers": { "sf-intelligence": { "command": "npx", "args": ["-y", "sf-intelligence", "mcp", "--vault", "/full/path/to/your-project/org-kb"] } } }Use the full path to your
org-kbfolder (on Windows, double the backslashes). Merge this into the file if it already lists other servers, then fully quit and reopen Claude Desktop.Cursor
{ "mcpServers": { "sf-intelligence": { "command": "npx", "args": ["-y", "sf-intelligence", "mcp", "--vault", "/full/path/to/your-project/org-kb"] } } }Use the full path to your
org-kbfolder. Cursor doesn't reload this file by itself: turn the server off and on in Settings → MCP.VS Code + Copilot
{ "servers": { "sf-intelligence": { "type": "stdio", "command": "npx", "args": ["-y", "sf-intelligence", "mcp", "--vault", "${workspaceFolder}/org-kb"] } } }VS Code reads the
serverskey, notmcpServers. With the wrong key it loads nothing and shows no error. Use Copilot Chat in Agent mode.Codex
codex mcp add sf-intelligence -- npx -y sf-intelligence mcp --vault /full/path/to/your-project/org-kb
[mcp_servers.sf-intelligence] command = "npx" args = ["-y", "sf-intelligence", "mcp", "--vault", "/full/path/to/your-project/org-kb"] startup_timeout_sec = 30
Codex uses TOML. A longer start-up timeout gives the first download time to finish. Check it with
codex mcp list.- Node.js 20 or later. Check with
Ask
Ask in plain words, the way you would ask a colleague. For example:
- Can I delete this field?
- Who can edit this object?
- What runs when an Opportunity is saved?
- What sets Stage to Closed Lost?
- Is this deployment risky? (paste a package.xml or a git diff file list)
- Brief me on the Case object.
If you connect the assistant before the first
refreshfinishes, the server starts in setup mode and tells your assistant what to run next. Ask it “what do you need from me?”
The details
Checking the connection, tool profiles, keeping the snapshot fresh, and fixing common problems.
Check that it’s connected
- Claude Code: run
/mcp. The server should be listed as connected. - VS Code: run MCP: List Servers from the command palette.
- Codex: run
codex mcp list. - Any assistant: ask it to run
sfi.health_check. Ahealthyresult means everything is wired up.
Step-by-step guides, with Windows notes, for each host: Claude Code, Claude Desktop, Cursor and VS Code + GitHub Copilot.
Tool profile
By default your assistant sees a small core set of tools, which keeps its tool list short. Every other analysis is still reachable through sfi.run_analysis. To list all 226 tools directly, add this to the server’s config:
"env": { "SFI_TOOL_PROFILE": "full" }
See the configuration reference for every option.
A shorter command
npx -y sf-intelligence … works without installing anything. Install it globally to get a short sfi command instead:
npm install -g sf-intelligence
Keeping the snapshot fresh
Answers come from the last refresh. Every answer is stamped with when that was, and sfi.health_check flags a snapshot older than a week. When your org changes, run npx -y sf-intelligence refresh again.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| VS Code shows no server and no error | The config uses mcpServers | VS Code reads servers. Use the VS Code snippet above. |
| Only a setup tool appears | The server can’t find your org-kb folder: no --vault, a relative path, or no refresh yet | Run refresh, then pass the full path to org-kb. |
| Cursor doesn’t show the tools | Cursor didn’t reload its MCP config | Turn the server off and on in Settings → MCP, or restart Cursor. |
| Codex times out on first start | The first download is slow | Set startup_timeout_sec = 30 in ~/.codex/config.toml. |
refresh fails to retrieve | The Salesforce CLI isn’t logged in, or the alias is wrong | sf org login web --alias my-org, then run refresh again. |
For anything else, run npx -y sf-intelligence doctor. It checks the Salesforce CLI, the snapshot, your login and the graph, and prints a fix for each problem.
Claude Code plugin
Installing sf-intelligence as a Claude Code plugin adds 26 skills that switch on when you talk about Salesforce, and 5 slash commands such as /sfi-onboard, a guided first run. The plugin registers the same server, so you don’t need a separate claude mcp add. It can’t know where your org-kb folder is, though: either set SFI_VAULT to the full path of that folder (in your shell profile, so Claude Code inherits it) or start Claude Code from the folder that holds org-kb. If answers come back empty, ask “is the server set up?” and it says where it looked.
/plugin marketplace add PranavNagrecha/Salesforce-Intelligence /plugin install sf-intelligence@sf-intelligence
The Claude Code guide covers the plugin, the one-command install and the Windows notes.
Uninstall
Nothing is installed in Salesforce, so there is nothing to remove there. On your computer:
- Remove the server from your assistant. Claude Code:
claude mcp remove sf-intelligence. Other hosts: delete thesf-intelligenceblock from the config file you added it to, then restart the host. - If you installed the Claude Code plugin:
/plugin uninstall sf-intelligence@sf-intelligence. - If you installed it globally:
npm uninstall -g sf-intelligence. Withnpxthere is nothing to uninstall. - If you started the drift watcher:
npx -y sf-intelligence watch stopin the project folder. - Delete the data: the
org-kbfolder next to your project, and~/.sf-intelligencein your home folder (the demo cache, live-mode consent and local feedback).
Live data, multiple orgs and other options
Answers come from the snapshot by default. To turn on the opt-in, read-only live lookups (record counts, samples, org limits), or to work with several orgs, see the configuration reference.