KosmoKrator

other

Cursor CLI for AI Agents

Use the Cursor CLI from KosmoKrator to call Cursor tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

4 functions 4 read 0 write API key auth

Cursor CLI Setup

Cursor can be configured headlessly with `kosmokrator integrations:configure cursor`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure cursor --set api_key="$CURSOR_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor cursor --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key CURSOR_API_KEY Secret secret yes API Key
url CURSOR_URL URL url no API URL

Call Cursor Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call cursor.cursor_list_workspaces '{}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:cursor cursor_list_workspaces '{}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs cursor --json
kosmo integrations:docs cursor.cursor_list_workspaces --json
kosmo integrations:schema cursor.cursor_list_workspaces --json
kosmo integrations:search "Cursor" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Cursor.

cursor.cursor_list_workspaces

Read read

List all Cursor workspaces accessible to the authenticated user. Returns workspace IDs you can use with other Cursor tools.

Parameters
none

Generic CLI call

kosmo integrations:call cursor.cursor_list_workspaces '{}' --json

Provider shortcut

kosmo integrations:cursor cursor_list_workspaces '{}' --json

cursor.cursor_get_workspace

Read read

Get details for a specific Cursor workspace by its ID.

Parameters
workspace_id

Generic CLI call

kosmo integrations:call cursor.cursor_get_workspace '{"workspace_id":"example_workspace_id"}' --json

Provider shortcut

kosmo integrations:cursor cursor_get_workspace '{"workspace_id":"example_workspace_id"}' --json

cursor.cursor_list_team_members

Read read

List all team members in a Cursor workspace. Returns member names, emails, and roles.

Parameters
workspace_id

Generic CLI call

kosmo integrations:call cursor.cursor_list_team_members '{"workspace_id":"example_workspace_id"}' --json

Provider shortcut

kosmo integrations:cursor cursor_list_team_members '{"workspace_id":"example_workspace_id"}' --json

cursor.cursor_list_extensions

Read read

List all extensions installed in a Cursor workspace. Returns extension names, identifiers, and versions.

Parameters
workspace_id

Generic CLI call

kosmo integrations:call cursor.cursor_list_extensions '{"workspace_id":"example_workspace_id"}' --json

Provider shortcut

kosmo integrations:cursor cursor_list_extensions '{"workspace_id":"example_workspace_id"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

cursor.cursor_list_workspaces

List all Cursor workspaces accessible to the authenticated user. Returns workspace IDs you can use with other Cursor tools.

Operation
Read read
Schema command
kosmo integrations:schema cursor.cursor_list_workspaces --json
ParameterTypeRequiredDescription
No parameters.

cursor.cursor_get_workspace

Get details for a specific Cursor workspace by its ID.

Operation
Read read
Schema command
kosmo integrations:schema cursor.cursor_get_workspace --json
ParameterTypeRequiredDescription
workspace_id string yes The workspace identifier.

cursor.cursor_list_team_members

List all team members in a Cursor workspace. Returns member names, emails, and roles.

Operation
Read read
Schema command
kosmo integrations:schema cursor.cursor_list_team_members --json
ParameterTypeRequiredDescription
workspace_id string yes The workspace identifier.

cursor.cursor_list_extensions

List all extensions installed in a Cursor workspace. Returns extension names, identifiers, and versions.

Operation
Read read
Schema command
kosmo integrations:schema cursor.cursor_list_extensions --json
ParameterTypeRequiredDescription
workspace_id string yes The workspace identifier.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.