# Cursor — how to use (mcp.ai)

Connect your Cursor account and use 5 tools for developer tools straight from your AI agent. Connect with your own API key. Cursor is an AI-powered code editor built on VSCode. The API provides access to Cloud Agents, Admin, Analytics, and AI Code Tracking features.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_cursor?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `cursor_get_agent_conversation`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/cursor`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/cursor/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/cursor/get/agent/conversation` — Tool to retrieve the conversation history for a specific cloud agent. Use when you need to view the messages exchanged between the user and the agent. Returns error with status 404 if the agent is not
  - body: { id: string }
- `POST https://api.mcp.ai/api/cursor/get/me` — Tool to retrieve API key information including the key name, creation date, and owner email. Use when you need to verify API key details or validate authentication.
- `POST https://api.mcp.ai/api/cursor/list/agents` — Tool to retrieve a paginated list of all Cursor Cloud agents. Use when you need to view existing agents, their status, or iterate through agents with pagination.
  - body: { limit?: integer, cursor?: string }
- `POST https://api.mcp.ai/api/cursor/list/models` — Tool to retrieve the list of available AI models in Cursor. Use when you need to discover which models are available for API requests.
- `POST https://api.mcp.ai/api/cursor/list/repositories` — Tool to list GitHub repositories accessible to the authenticated user. Use when you need to retrieve all repositories the user has access to through their Cursor account.

## Example prompts
- "What can I do in Cursor?"
- "Show me a summary of my Cursor account"

## More
- Page: https://mcp.ai/cursor
- Agent spec (llms.txt): https://mcp.ai/cursor/llms.txt
- Postman collection: https://mcp.ai/cursor/postman.json
