Skip to main content

Cursor — Connect to aprity

This guide walks through connecting Cursor (the AI-first IDE) to your aprity-scanned Salesforce org. Once connected, Cursor's AI panel can answer questions about your org, describe object behaviour, and draft user stories from your latest aprity scan -- directly alongside your code.

See Remote MCP Server for the feature overview, plan availability and quotas.

aprity's Remote MCP Server is an OAuth 2.1 endpoint at https://mcp.aprity.ai/v1/mcp. You point Cursor at that URL and it walks you through an OAuth 2.1 + PKCE sign-in that authenticates you with Salesforce SSO. There is no token to copy or paste by hand.

Prerequisites

  • Your aprity tenant is on the Intelligence or Trial plan (the Remote MCP Server is not available on Documentation), with the feature.mcpRemoteServer feature enabled.
  • Cursor installed on macOS, Windows, or Linux, on a version that supports remote MCP servers over HTTP with OAuth.
  • A Salesforce login for the org that aprity has scanned (you sign in with this during the OAuth flow).

Step 1 — Add the aprity MCP server

Cursor reads MCP server definitions from a JSON config file:

  • macOS / Linux : ~/.cursor/mcp.json
  • Windows : %USERPROFILE%\.cursor\mcp.json

Open or create the file and add the aprity entry inside the mcpServers object — just the URL, no token:

{
"mcpServers": {
"aprity": {
"url": "https://mcp.aprity.ai/v1/mcp"
}
}
}

If the file already has other MCP servers, keep them and add the aprity entry inside the existing mcpServers object -- do not overwrite the whole file.

Step 2 — Restart Cursor

Quit Cursor fully (Cmd+Q on macOS, Alt+F4 on Windows) and reopen it. Cursor only reads mcp.json at startup -- a reload window is not enough.

Step 3 — Sign in with Salesforce SSO

The first time Cursor connects to the aprity server, it opens the OAuth 2.1 + PKCE flow in your browser:

  1. Sign in with Salesforce SSO -- the same credentials you use for your aprity-scanned org.
  2. aprity resolves your tenant from your Salesforce org.
  3. Approve the connection. Cursor receives a short-lived token automatically.

Verify the connection

In the Cursor AI panel, type a sanity check like "What does aprity know about my Opportunity object?". The answer should cite specific automations, validations, or fields from your scan.

You can also list available tools explicitly with "List the aprity tools available" -- Cursor will enumerate the aprity tools (Answer a question, Describe object behaviour, Draft a user story), all backed by aprity's deterministic knowledge tools over your latest scan.

Disconnect or reconnect

  • Stop using the connection : remove the aprity entry from mcp.json and restart Cursor.
  • Reconnect : add the entry back and restart; Cursor runs the Salesforce SSO sign-in again.

Disconnect when the device is decommissioned, the connection is no longer needed, or the Salesforce user who authorized it leaves the company.

Limitations specific to Cursor

  • The mcp.json config is per-user, not per-workspace. Each team member adds their own aprity entry and signs in with their own Salesforce identity.
  • Cursor only reads the config at startup -- changes require a full quit + reopen.
  • The connection is tied to the Salesforce user who signed in via SSO.

Troubleshooting

SymptomWhere to start
Cursor does not detect the aprity server after editing mcp.jsonFully quit and reopen Cursor (Cmd+Q / Alt+F4). Cursor only reads the config at startup.
The OAuth sign-in fails or loopsMCP authentication failed. Confirm you sign in with the correct Salesforce identity for your aprity-scanned org.
401 Unauthorized on every tool callMCP authentication failed
Tools missing after the server loadsConfirm your plan includes the Remote MCP Server. See Plan Comparison.
The "aprity" entry does not appear in Cursor's MCP servers listConfirm the JSON file is valid (no trailing commas, correct nesting) and that the URL is exactly https://mcp.aprity.ai/v1/mcp.

For anything else, contact support@aprity.ai.