Where does the bug appear (feature/product)?
Cursor SDK
Describe the Bug
Python cursor-sdk fails on service RPCs with InternalServerError: internal error (HTTP 500, empty details), while the same Integrations API key works on the Cloud Agents REST API (GET v1/me → 200). Affected calls include Cursor.models.list() and Agent.create() with local=LocalAgentOptions (with and without MCP). Cloud Agents work in the Cursor UI; only the Python SDK / bridge path fails.
Steps to Reproduce
Create a User API Key in Cursor Dashboard → Integrations → User API Keys (e.g. name dd-agent, scope Admin, crsr_ token).
Export the key: export CURSOR_API_KEY=‘…’ (or set -a && source .env && set +a).
Confirm REST works:
curl -sS -w “\nHTTP_CODE:%{http_code}\n” https://api.cursor.com/v1/me
-H “Authorization: Bearer $CURSOR_API_KEY”
Expected here: HTTP 200 and JSON with apiKeyName, userId, userEmail.
Install SDK: pip install cursor-sdk (Python 3.12 venv on macOS).
Run:
import os
from cursor_sdk import Cursor
print(len(Cursor.models.list(api_key=os.environ[“CURSOR_API_KEY”])))
Actual: cursor_sdk.errors.InternalServerError: internal: internal error (code internal, status 500, details: ).
Optional second repro:
import os
from cursor_sdk import Agent, AgentOptions, LocalAgentOptions
with Agent.create(AgentOptions(
api_key=os.environ[“CURSOR_API_KEY”],
model=“composer-2.5”,
local=LocalAgentOptions(cwd=“.”),
)) as agent:
print(agent.agent_id)
Actual: same 500 internal before agent_id is returned.
Expected Behavior
Cursor.models.list(api_key=…) returns a list of available models (non-empty).
Agent.create(…) with local=LocalAgentOptions(cwd=…) returns a valid agent_id so runs can be started via agent.send().
Errors, if any, should be actionable (e.g. 401/403 with a clear message), not a generic 500 internal with empty details when the same key succeeds on GET /v1/me.
Operating System
MacOS
Version Information
python --version
Name: cursor-sdk
Version: 0.1.5
Summary: Python client for the Cursor SDK bridge.
Home-page: https://cursor.com
Author: Cursor
Author-email:
License: Proprietary
Location: /Users/joshua.daza/projects/dd-fill-agent/.venv/lib/python3.12/site-packages
Requires: httpx
Required-by: dd-fill-agent
Python 3.12.13
Additional Information
API key name: dd-agent (Integrations → User API Keys, scope Admin).
REST success response (200): apiKeyName, userId, userEmail, userFirstName, userLastName returned from /v1/me.
SDK failure: InternalServerError, message: internal error, code: internal, status: 500, retryable: False, details: .
Not environment-specific to our app: fails in minimal one-liners; MCP not required to reproduce.
Use case: local agent + MCP for an internal automation POC; blocked until SDK RPCs work.
Question for your team: Is Python SDK / bridge access gated separately from Cloud Agents API (beta)? /v1/me works but SDK ListModels / CreateAgent do not.
Does this stop you from using Cursor
No - Cursor works, but with this issue