Skip to main content
Clientell AI MCP / VS Code

How do I connect VS Code to Salesforce with MCP?

To connect VS Code to the Clientell AI MCP (Model Context Protocol) server, add a servers entry to .vscode/mcp.json with "type": "http", the endpoint https://mcp.clientell.ai/mcp and an Authorization header that carries your Clientell AI token. Then start the server from the Command Palette. The server is hosted, so there is nothing to install.

Book a call with an expert Start the 14-day trialFull setup documentation
Install config

What goes in mcp.json?

Create .vscode/mcp.json in the workspace, or use the user file if you want the server in every project. Replace the token placeholder and keep the word Bearer and the space after it.

mcp.json
{
  "servers": {
    "clientell": {
      "type": "http",
      "url": "https://mcp.clientell.ai/mcp",
      "headers": { "Authorization": "Bearer <YOUR_TOKEN>" }
    }
  }
}

Clientell AI hosts the server, so nothing runs on your machine. The top-level key is servers, not mcpServers. This is the mistake we would check first when the server does not show up, because the Cursor and Claude Desktop blocks use the other spelling. The token is a Clientell AI workspace credential, not a Salesforce one. You get it in the Clientell AI web app after you start the trial.

Do not commit the token

A workspace .vscode/mcp.json sits inside your repository. With the token pasted in, a commit hands it to everyone who can read the repo. Use the user-level file, add the workspace file to .gitignore, or use the prompt method below.

Better for shared repos

How do you keep the token out of the file?

VS Code can ask for the token the first time the server starts and store it, so the file holds no secret.

mcp.json with a prompt
{
  "inputs": [
    {
      "type": "promptString",
      "id": "clientell-token",
      "description": "Clientell AI token",
      "password": true
    }
  ],
  "servers": {
    "clientell": {
      "type": "http",
      "url": "https://mcp.clientell.ai/mcp",
      "headers": { "Authorization": "Bearer ${input:clientell-token}" }
    }
  }
}

Paste only the token at the prompt. The word Bearer and the space are already in the header. This pattern comes from VS Code’s MCP configuration reference. Input variables work in VS Code’s own format only, not in portable .mcp.json files.

Check it

How do you start the server and see what it says?

Open the Command Palette and run MCP: List Servers. Pick clientell and choose Start Server. After you change the config, choose Restart Server. If it fails to start, choose Show Output and read the log before you retry. The log carries the HTTP status and the server’s own error text.

Workspace servers follow Workspace Trust. In Restricted Mode they do not start at all, which looks exactly like a broken config. Trust the folder first. VS Code documents all of this in Manage and troubleshoot MCP servers.

To test the endpoint outside the editor, run curl -I https://mcp.clientell.ai/mcp. A 401 or 403 means the server is up and wants a valid token.

First prompt

What should you ask first?

Open a Salesforce project and ask the org a question before you edit a file. Example prompt, not a saved run.

Agent chat prompt
I want to rename Account.Custom_Segment__c to Account.Customer_Tier__c.
Before you change any files in this repo, use the clientell MCP to list
everything in the org that reads or writes Account.Custom_Segment__c.
Then tell me which dependents are not in force-app. Do not edit anything yet.

A good answer separates what it found in your files from what exists only in the org. If it says the result was truncated, treat it as incomplete and narrow the question. Any change after that runs through your own sf CLI, and Clientell AI asks before it changes anything in production.

Known issues

Why does the server not appear, or fail on start?

The server is not in MCP: List Servers
What it means

The top-level key is mcpServers instead of servers, or the file is in the wrong place.

Fix

Rename the key to servers. The workspace file is .vscode/mcp.json.

The server is listed but never starts
What it means

Either the workspace is in Restricted Mode, or the start failed and the reason is in the output.

Fix

Trust the workspace, then choose Show Output for the server. A 401 there means the token is wrong or has a space at one end. A missing /mcp on the URL shows up as an endpoint-not-found message.

VS Code connects, but Salesforce sign-in fails
What it means

That is the second connection, between Clientell AI and your org.

Fix

Match the Salesforce error to a cause on why you cannot connect Claude, Cursor or Codex to Salesforce.

FAQ

Questions people ask.

Which file does VS Code read the MCP server from?

A workspace file at .vscode/mcp.json, or a user-profile mcp.json. VS Code uses servers as the top-level key. The mcpServers key that Cursor and Claude Desktop use is the wrong one here.

Can I keep the token out of mcp.json?

Yes. Define an input of type promptString with password set to true, then reference it as ${input:id} in the Authorization header. VS Code asks for the value when the server first starts and stores it for you.

Why does my server show in Cursor but not VS Code?

VS Code wants servers, not mcpServers. Rename the top-level key in mcp.json and reload the window.

Keep going

Related pages.