Appearance
Run MCP connectors as the signed-in user
On Cursor hosting, a cursorAccount: true MCP connection defaults to credentials: "shared". Every turn calls the MCP server through the deployment's service account.
Set credentials: "individual" to run a connector as the signed-in person whose message started the turn instead.
Per-user connections are available to teams where Cursor has enabled the feature, and require @grok/agent-sdk 0.7.0 or newer.
| Aspect | Shared ("shared", default) | Individual ("individual") |
|---|---|---|
| Whose account runs calls | The deployment's service account | The signed-in person who sent the message |
| Who connects it | Agent Owners and team admins | Each team member connects their own account (when enabled for the team) |
| Unattended turns | Supported | Refused; never falls back to a shared account |
Declare shared and individual connections
Put each Cursor account connection in bot/mcp-connections/ and set credentials: "individual" on the servers that must act as the message sender.
ts
// bot/mcp-connections/linear.ts
import { defineConnection } from "@grok/agent-sdk/connections";
export default defineConnection({
cursorAccount: true,
credentials: "individual",
servers: ["Linear"],
});An agent can combine individual and shared connections in separate files:
ts
// bot/mcp-connections/docs.ts
import { defineConnection } from "@grok/agent-sdk/connections";
export default defineConnection({
cursorAccount: true,
credentials: "shared",
servers: ["Notion"],
});Declaration rules:
credentialsworks only withcursorAccount: trueunderbot/mcp-connections/. Non-cursorAccountconnections andbot/host-connections/reject it.- An individual connection must list
serversby name as they appear in Cursor's MCP settings (for example,["Linear"]). Omittingserversor passing"*"is rejected. - If an agent declares any individual connection, every shared
cursorAccount: trueconnection in that agent must also listserversby name instead of"*"or omittingservers. On0.7.0, Cursor enforces this rule only at deploy;0.7.1also catches it duringagent-sdk validate. - An individual connection can't set
advertiseTools: trueor the model-side options that require it (tools,disallowedTools,effects, andoptional). - Server tools can't call an individual connection through
ctx.host.mcp, because host calls run without a turn user.
Manage connectors on Deployed Agents
On the deployment's page in Deployed Agents, Cursor splits MCP connectors into Shared and Individual sections.
- Shared: Only the agent's Owners and team admins can authorize or disconnect shared MCP connectors; other team members who can view the deployment see shared connector status without connect or disconnect actions. See Access for how Owner access is granted.
- Individual: On teams where per-user connections are enabled, each team member who opens the deployment page sees their own status for each server declared with
credentials: "individual"and can connect their own account there before chatting in Slack or the hosted playground.
Connect in Slack
Enable toolApprovals: true on slackChannel (or spread buildToolApprovalEvents into events) so the channel can post Link Account prompts and Connect cards and handle Connected and Cancel clicks:
ts
// bot/channels/slack.ts
import { slackChannel } from "@grok/agent-sdk/channels/slack";
export default slackChannel({
toolApprovals: true,
});Each sender's Slack account must be linked to a Cursor account on the deployment's team. When an unlinked person messages the agent in Slack, the bot sends a message visible only to them with a Link Account button pointing to Cursor integrations.
When the agent requests authorization for a server that a linked person hasn't connected yet, the bot sends a Connect card visible only to them with Connect <connection>, Connected, and Cancel buttons. After finishing sign-in in the browser, they select Connected to start a follow-up turn using their own account, or Cancel to continue without that server.
In a shared thread, each person sees and settles only their own Connect prompt. If a turn fails because the server isn't connected and no Connect card appears, connect the server in the deployment's Individual section on Deployed Agents and ask again.
No fallback to a shared account
On Cursor hosting, an individual connection runs a call only when Cursor verifies the signed-in user for that turn. Without a verified user, the call fails and never falls back to the deployment's service account or another person's credentials.
Any MCP server declared on an individual connection is withheld from shared sign-in on the same deployment, even if a shared connection lists that server too.
Turns without a signed-in user
Only turns started by a verified team member carry a user identity for individual connections: hosted Slack messages from a linked team member, and hosted playground or HTTP session requests authenticated with a personal Cursor account.
Turns without a signed-in user can't call individual connections on Cursor hosting:
- Service-account API keys: HTTP API and CLI session requests authenticated with a team service-account API key carry no user identity, so individual connections refuse those calls. Authenticate with a personal Cursor account when a session needs individual connections, or keep automation-driven tools on a shared connection.
- Unattended triggers: Schedules, reminders, webhooks (GitHub, GitLab, Bitbucket, PagerDuty, and custom webhooks), and evals run with no human sender.
- Microsoft Teams: Teams doesn't link senders to Cursor accounts yet, so Teams turns carry no signed-in user and individual connections refuse them.
Local runs (agent-sdk dev and agent-sdk serve) don't sign turn users. Use a shared cursorAccount: true connection or Host MCP OAuth during local development, and test per-user connections on Cursor hosting.