Cursor Cloud Agents
Start og gennemgå Cursor Cloud Agents via MCP. Start agents på GitHub-repos, følg op med runs, og inspicér resultater og artifacts med en API-nøgle.
Overblik
Forbind Cursor Cloud Agents, så AI-klienter kan starte cloud agents på dine repositories, sende opfølgende prompts, og gennemgå run-status, resultater og artifacts via Cloud Agents API.
stackgate.ai gemmer din Cursor API-nøgle krypteret og kalder https://api.cursor.com på dine vegne. Værktøjsresultater returneres til din AI-klient for den pågældende forespørgsel.
Automations (planer, GitHub/Slack-triggers, tilladelsesscopes) konfigureres i Cursor Automations. Denne integration dækker start og gennemgang af cloud agents via den offentlige API - ikke oprettelse eller aktivering af Automations-definitioner.
Forudsætninger
- En Cursor-konto med adgang til Cloud Agents
- GitHub forbundet i Cursor til repo-baserede agents
- En stackgate.ai-konto
Hent credentials
- Log ind på Cursor og åbn Dashboard → API Keys.
- Opret en bruger-API-nøgle eller en service account-nøgle. Kopiér den én gang (ofte med præfiks
crsr_). - Åbn Mine integrationer → Cursor Cloud Agents i stackgate.ai, indsæt nøglen, og klik Connect & enable.
- Angiv valgfrit et standard environment-navn (et navngivet Cursor cloud-environment fra dit Cloud Agents-dashboard). Når det er sat, kan
create_agentbruge det environment, hvis du udeladerrepo_url.
Behandl nøglen som en adgangskode. Tilbagekald eller roter den i Cursor, hvis den bliver eksponeret.
Brug med AI-klienter
- Dedikeret endpoint:
POST /mcp/cursormed et Sanctum bearer-token - Private gateway: én config til alle integrationer - brug
cursor__*-navngivne værktøjer
Se Dokumentation for HTTP-godkendelse og private gateway-opsætning.
Anbefalet workflow
get_api_key_info/list_models- bekræft nøglen og vælg model om nødvendigt.list_agents/get_agent- find eksisterende agents.create_agentmedprompt_textogrepo_url(eller brugdefault_environment/environment_name).get_run- poll indtil FINISHED / ERROR / CANCELLED / EXPIRED; læsresultoggit.create_runtil opfølgning;cancel_runhvis agenten er busy.list_artifacts/download_artifacttil walkthrough-filer;archive_agentnår du er færdig.
Fejlfinding
- 422 integration not configured - indsæt en Cursor API-nøgle i Mine integrationer.
- 401 Unauthorized - regenerér nøglen under Dashboard → API Keys og opdatér Mine integrationer.
- Provide repo_url or environment -
create_agentunderstøtter ikke no-repo agents. Angivrepo_url, eller sætdefault_environment/environment_name. Navngivne environments og eksplicitte repos er gensidigt udelukkende upstream. - 409 agent_busy - vent på det aktive run, eller kald
cancel_run, og brug dereftercreate_run. - 429 Too many requests - Cursor håndhæver team-rate limits; vent og prøv igen. Undgå at polle
list_repositories(ca. 1/min og 30/time pr. bruger). - Automations-styring - aktiver/deaktiver triggers og tilladelser i Cursor-UI; denne MCP eksponerer ikke en Automations control API.
Tilgængelige værktøjer
-
get_api_key_info
Get metadata for the connected Cursor API key (name, user email when user-scoped).
-
list_models
List recommended models and parameters for create_agent model.id / model.params.
-
list_agents
List Cursor cloud agents for den forbundne konto.
-
get_agent
Get durable metadata for a Cursor cloud agent. Use latestRunId with get_run for execution status.
-
create_agent
Opret en Cursor cloud agent og start det første run.
-
list_runs
List runs for a Cursor cloud agent, newest first.
-
get_run
Hent status og resultat for et agent-run.
-
create_run
Send a follow-up prompt to an existing active agent. Returns 409 if another run is already CREATING or RUNNING.
-
cancel_run
Cancel the active run for an agent. Cancellation is terminal; create a new run to continue.
-
archive_agent
Archive a Cursor cloud agent. Archived agents remain readable but cannot accept new runs until unarchived.
-
unarchive_agent
Unarchive a Cursor cloud agent so it can accept new runs again.
-
get_agent_usage
Get token usage for an agent, optionally scoped to a single run.
-
list_artifacts
List artifacts produced by a Cursor cloud agent (paths relative to artifacts/).
-
download_artifact
Get a temporary presigned URL to download an agent artifact. Pass the path from list_artifacts.
-
list_repositories
List GitHub repositories accessible via Cursor GitHub App installation. Very strict rate limits (about 1 request per user per minute and 30 per hour) - do not poll.
MCP-endpoint:
https://stackgate.ai/mcp/cursor
(HTTP) eller via
private gateway.