Cursor MCP server for AI agents

Live

BEARER TOKEN

CODING AGENTS

Developer Tools

Cursor gives your agent control of Cursor Cloud Agents: start coding agents on a GitHub repository, send follow-up prompts, track runs and token usage, and manage saved cloud agent environments.

  • Per-user credentials: each call uses the actual user's access token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Cursor
agent · Acme Q3
Run
Is the flaky-tests Cloud Agent done, and did it open a pull request?
S
cursor_agent_get
104ms
Coding agent
The flaky-tests agent is active and its latest run has finished. It worked on branch fix/flaky-auth-tests and opened pull request #482.
Sources: 1 Cloud Agent, latest run
cursor
1 agent
18:29
Message Claude...

Tools your coding agent reaches for on Cursor, scoped per user.

CALL ANY TOOL
24 tools for Cursor Cloud Agents: create coding agents and send follow-up prompts, track runs and token usage, list artifacts, and manage saved cloud agent environments and their builds.
cursor_agent_create
Create agent
Create a Cursor Cloud Agent and start its first run on a prompt, optionally against a GitHub repository, branch, or pull request. Returns the new agent (id, name, status, url, repos) and its first run (id, status CREATING or RUNNING). Use this to start new work. Use cursor_run_create to send a follow-up prompt to an existing agent. Poll cursor_run_get with the returned agent and run IDs to see when the run finishes.
Parameters
Name
Type
Required
Description
prompt
string
Required
Task instruction for the agent, in plain language. This becomes the prompt of the agent's first run. Example: Add a README with setup instructions
agent_id
string
Optional
Optional client-supplied agent ID in bc-<uuid> form, used for idempotency: re-sending the same agent_id returns 409 agent_id_conflict instead of creating a duplicate agent. Omit it to let Cursor generate the ID. Example: bc-00000000-0000-0000-0000-000000000001
auto_create_pr
boolean
Optional
Whether Cursor opens a pull request when the run completes. Defaults to false. Example: true
environment_name
string
Optional
Name of the saved Cursor-hosted environment, Team Pool, or self-hosted machine to run in. Only used when environment_type is set. A named cloud environment brings its own repositories, so do not also set repository_url. For type pool it defaults to the pool named default. Example: Release workspace
environment_type
string
Optional
Where the agent runs. 'cloud' uses Cursor-hosted VMs; 'pool' and 'machine' route to self-hosted workers. Omit it to use the default Cursor-hosted environment. Example: cloud. One of: `cloud`, `pool`, `machine`.
image_urls
array
Optional
Optional list of up to 5 HTTP or HTTPS image URLs that Cursor fetches and attaches to the initial prompt (PNG, JPEG, GIF, or WebP, up to 15 MB each). Example: ["https://example.com/screenshot.png"]
mode
string
Optional
Conversation mode for this run. 'plan' explores the code and drafts a plan before coding; 'agent' implements changes directly. Defaults to agent. Example: plan. One of: `agent`, `plan`.
model_id
string
Optional
Explicit model ID to run the agent with, as returned by cursor_models_list. Omit it to use the account's configured default model. Example: composer-2
model_params
array
Optional
Optional per-model parameters such as reasoning effort or max mode, only used when model_id is set. Each entry pairs a parameter id with a string value; use only parameters that cursor_models_list reports for the chosen model. Example: [{"id": "thinking", "value": "high"}]
name
string
Optional
Display name for the agent, 1 to 100 characters. Cursor derives one from the prompt when omitted. Example: Add README with setup instructions
pr_url
string
Optional
GitHub pull request URL to work on. The agent uses that PR's branches and starting_ref is ignored. repository_url must still be set to the PR's repository. Example: https://github.com/your-org/your-repo/pull/123
repository_url
string
Optional
GitHub repository URL the agent works in. Required when pr_url or starting_ref is set. Omit it, together with environment_name, to start an agent with no repository. Do not combine with a named cloud environment (environment_name with environment_type cloud). Example: https://github.com/your-org/your-repo
skip_reviewer_request
boolean
Optional
Whether to skip requesting the API key's user as a reviewer on the pull request Cursor opens. Only applies when auto_create_pr is true. Defaults to false. Example: false
starting_ref
string
Optional
Branch name or commit SHA in repository_url to start from. Ignored when pr_url is set. Example: main
work_on_current_branch
boolean
Optional
When false (the default), Cursor pushes commits to a new auto-generated cursor/... branch. When true, Cursor pushes directly to starting_ref, or to the PR's head branch when pr_url is set. Example: false
cursor_agent_get
Get agent
cursor_agent_usage_get
Get agent usage
cursor_agents_list
List agents
cursor_artifact_download_url_get
Get artifact download url
cursor_artifacts_list
List artifacts
cursor_environment_active_build_get
Get environment active build
cursor_environment_build_get
Get environment build
cursor_environment_builds_list
List environment builds
cursor_environment_create
Create environment
cursor_environment_get
Get environment
cursor_environment_history_list
List environment history
cursor_environment_secrets_list
List environment secrets
cursor_environment_update
Update environment
cursor_environments_list
List environments
cursor_me_get
Get me
cursor_models_list
List models
cursor_repositories_list
List repositories
cursor_run_cancel
Cancel run
cursor_run_create
Create run
cursor_run_get
Get run
cursor_runs_list
List runs
cursor_secrets_list
List secrets
cursor_team_secrets_list
List team secrets
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Cursor tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cursor"], toolNames: [
    "cursor_agent_create",
    "cursor_run_get",
    "cursor_artifacts_list"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Start a Cloud Agent on acme/web to fix the failing login test" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cursor"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Start a Cloud Agent on acme/web to fix the failing login test" }],
  tools,
});

// Execute the tool call with the user's vaulted Cursor access token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cursor"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Start a Cloud Agent on acme/web to fix the failing login test" }],
  tools,
});

// Tool call runs with the user's vaulted Cursor access token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cursor"] }, pageSize: 100,
});

const agent = new Agent({
  name: "coding_agent",
  model: "gemini-2.5-pro",
  instruction: "Cursor tools scoped to this user",
  tools,
});

await agent.run("Start a Cloud Agent on acme/web to fix the failing login test");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Cursor tool. Click to copy, paste into your agent, done.
Cloud Agents
Copy the prompt
Copied
Start a Cloud Agent on acme/web to fix the failing login test.
Copy the prompt
Copied
List my Cloud Agents working on pull request #482.
Copy the prompt
Copied
Tell the docs agent to also update the README.
Runs and usage
Copy the prompt
Copied
Show the status of the latest run on the flaky-tests agent.
Copy the prompt
Copied
How many tokens did the refactor agent use across its runs?
Copy the prompt
Copied
Cancel the active run on the migration agent.
Environments and artifacts
Copy the prompt
Copied
List the saved cloud agent environments for our team.
Copy the prompt
Copied
Show the build history of the backend environment.
Copy the prompt
Copied
List the screenshots and logs the QA agent saved.
SEE HOW AUTH WORKS
Each user connects their own Cursor access token once, and Scalekit sends it with every call. Tokens stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Cursor
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Cursor
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
Cursor
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Cursor
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other developer tools and AI connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Engineering Teams
Engineering standup agent
Pulls commits from GitHub and GitLab, tracks issue movement in Jira, and posts a per-engineer standup brief to Slack. Each engineer's activity is read on their own delegated OAuth.
Test other agents
See the same per-user auth pattern across other developer tools and AI connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
ENGINEERING
Engineering standup agent
Pull commits from GitHub and GitLab, track Jira issue movement, and post a per-engineer standup brief to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Cursor access token looks fine in a demo. In production every agent run looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Cursor today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Cursor as the user or through a shared access token?
As the user. Each user connects their own Cursor access token once, and Scalekit sends it with every call. Cloud Agents, runs, and environment changes the agent makes are attributed to that user in your audit trail, not a shared service account.
Where is the Cursor access token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new access token. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Cursor?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the list and get tools without cursor_agent_create and cursor_run_create, which start new agent work. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Cursor access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent read Cursor secret values?
No. cursor_secrets_list, cursor_team_secrets_list, and cursor_environment_secrets_list return secret names and versions, never values. The agent can see which secrets exist for the team, the user, and saved environments, while the values stay in Cursor.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""cursor"": {
""url"": ""https://mcp.scalekit.com/cursor"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.cursor]
url = ""https://mcp.scalekit.com/cursor""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""cursor"": {
""url"": ""https://mcp.scalekit.com/cursor"",
""type"": ""http""
}
}
}