Description
This plugin connects WordPress to Cursor Cloud Agents so the WordPress AI Client can generate text through the cursor provider.
This is an unofficial, third-party connector. It is not affiliated with, endorsed by, or sponsored by Cursor or Anysphere. “Cursor” is a trademark of Anysphere, Inc.
Features:
- Registers a
cursorprovider with the WordPress AI Client - Text generation via Cursor Cloud Agents (no-repository agents)
- Dynamic model discovery from
GET /v1/models - API key managed by WordPress Settings Connectors (or
CURSOR_API_KEY) - Plugin settings page for polling options, default model, and archive behavior
Requirements:
- WordPress 7.0 or higher (AI Client and Connectors API in core)
- PHP 7.4 or higher
- A Cursor API key from cursor.com/dashboard/api
External services
This plugin relies on the Cursor Cloud Agents API, operated by Anysphere, Inc. (cursor.com). Without a valid Cursor API key and an active internet connection, the plugin cannot generate text or list models.
When data is sent
Data is transmitted to Cursor when:
- WordPress or custom code uses the WordPress AI Client with the
cursorprovider (for example summarization, title generation, excerpts, or your ownAiClient::prompt()calls). - The plugin discovers available models for your account (for example when loading provider metadata).
- Optional: after a successful text generation, if Archive agent after run is enabled, the plugin asks Cursor to archive the finished Cloud Agent.
Saving your API key in WordPress stores it locally via Settings Connectors. The key is sent to Cursor only inside authenticated API requests, not to the plugin author.
What is sent
- Your Cursor API key (HTTP Basic authentication on every API request).
- Prompt text built from user and assistant messages, including any system instruction and any post or content text included in the AI request.
- Optional model ID when you or calling code selects a specific model.
- Agent and run identifiers when polling run status or archiving an agent.
API endpoints used
All requests go to https://api.cursor.com:
GET /v1/models— list models available to your accountPOST /v1/agents— create a Cloud Agent and start a text-generation runGET /v1/agents/{agentId}/runs/{runId}— poll run status and retrieve the generated textPOST /v1/agents/{agentId}/archive— optional cleanup after a successful run
Service links
- Cursor website: https://cursor.com/
- Cloud Agents API documentation: https://cursor.com/docs/cloud-agent/api/endpoints
- API keys dashboard: https://cursor.com/dashboard/api
- Terms of Service: https://cursor.com/terms-of-service
- Privacy Policy: https://cursor.com/privacy
Usage may be subject to Cursor account limits and billing. This plugin does not include a Cursor subscription.
Privacy
The Cursor API key is managed by WordPress Settings Connectors (connectors_ai_cursor_api_key) unless you configure CURSOR_API_KEY in wp-config.php or as an environment variable. Those constant and environment sources override the database value. This plugin does not read that Connectors option; WordPress core injects credentials into the AI Client.
This plugin stores only Cursor-specific behavior options in ai_provider_for_cursor_settings (default model, poll timeout, poll interval, archive after run).
When AI features use the Cursor provider, prompt content is sent to Cursor’s servers as described in External services above. This plugin does not send analytics or telemetry to the plugin author.
On uninstall, the plugin settings option is removed. The Connectors API key option is left for WordPress / Connectors to manage.
Configuration
- Create a Cursor API key at cursor.com/dashboard/api
-
Open Settings Connectors, find the Cursor card, and enter the API key
-
wp-config.php (recommended for production): add this line to
wp-config.phpabove/* That's all, stop editing! */:define( ‘CURSOR_API_KEY’, ‘your-cursor-api-key-here’ );
-
- You can also set a
CURSOR_API_KEYenvironment variable (same name). Environment and the PHP constant both override the database value.- Optionally open Settings AI Provider for Cursor to set:
- Default model ID (for example
composer-2) - Poll timeout — maximum seconds to wait for Cursor to finish
- Poll interval — how often (in seconds) WordPress asks Cursor whether the run is finished
- Archive agent after run — whether to clean up the finished Cloud Agent on Cursor’s side
- Confirm the Cursor connector shows as connected on Settings Connectors
Installation
- Upload the plugin files to
/wp-content/plugins/ai-provider-for-cursor/ - Activate the plugin through the Plugins screen in WordPress
- Configure the plugin (see Configuration below)
FAQ
-
Where do I enter the API key?
-
On Settings Connectors. For production, prefer defining
CURSOR_API_KEYinwp-config.php(see Configuration). Cursor-specific poll and model options are on Settings AI Provider for Cursor. -
How do I store the API key in wp-config.php?
-
Open
wp-config.phpin the root of your WordPress install and add this line above/* That's all, stop editing! */:define( 'CURSOR_API_KEY', 'your-cursor-api-key-here' );Replace the placeholder with your real Cursor API key. Reload Settings Connectors — WordPress should detect the constant as the key source.
-
What data does this plugin send to Cursor?
-
When the Cursor provider is used, WordPress sends your API key and the prompt text for that request (including system instructions and any content included by the calling feature) to
https://api.cursor.com. See External services for endpoints, timing, and links to Cursor’s terms and privacy policy. -
Does this require WordPress 7.0?
-
Yes. The WordPress AI Client and Connectors API shipped in WordPress 7.0.
-
Why can requests take a long time?
-
Cursor Cloud Agents run asynchronously. This plugin creates an agent, polls the run until it finishes, then returns the final
resulttext. Increase the poll timeout if your host allows longer PHP execution times. -
What is Poll timeout?
-
The maximum number of seconds WordPress will wait for a Cursor Cloud Agent run to finish. If Cursor has not finished by then, the request fails with a timeout error. Default is 120 seconds. Increase it if answers often fail with timeout; lower it only if you want failures to surface faster.
-
What is Poll interval?
-
How many seconds to wait between each status check while a Cloud Agent is still running. For example, with interval
2, WordPress asks Cursor roughly every 2 seconds whether the run is finished. The default (2) is a good balance for most sites: lower values check more often (slightly more API traffic); higher values check less often (slightly slower to notice completion). Most users can leave this at the default. -
What does Archive agent after run do?
-
Each text generation creates a Cloud Agent on Cursor’s side. When this option is enabled (the default), the plugin asks Cursor to archive that agent after a successful reply, so finished agents do not pile up in your Cursor dashboard. Turn it off only if you want to keep those agents visible in Cursor for inspection or follow-up. Archiving is best-effort: if the archive call fails, your generated text is still returned.
-
Recommended defaults for these options?
-
For most sites: poll timeout
120, poll interval2, and keep Archive agent after run enabled. Change them only if you hit timeouts, want fewer status checks, or need to keep agents listed in Cursor. -
How do I use Cursor from PHP?
-
After configuring the API key on Settings Connectors (or via
CURSOR_API_KEY):AiClient::prompt( 'Write a short product description.' )->usingProvider( 'cursor' )->generateTextResult();You can also select a model with
usingModel( 'composer-2' )(exact IDs come from your Cursor account viaGET /v1/models). -
Is this an official Cursor plugin?
-
No. It is a community / third-party WordPress plugin that uses Cursor’s public Cloud Agents API. It is not affiliated with, endorsed by, or sponsored by Cursor or Anysphere.
-
Will every AI feature in WordPress use Cursor automatically?
-
No. Only features and code that explicitly use the WordPress AI Client with
usingProvider( 'cursor' )(or select Cursor where supported) will call Cursor. Other plugins that hard-code their own provider list may ignore the Cursor provider even when it shows as connected under Settings Connectors.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“AI Provider for Cursor” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “AI Provider for Cursor” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.1.7 – 2026-07-30
- WordPress.org review: stop reading Connectors API keys; let Settings Connectors and core AI Client own credentials
- Remove custom Connectors card override so the native API key field is used
- Remove legacy basename shim and active_plugins / approval migrations
- Plugin settings page keeps only poll, model, and archive options
0.1.6 – 2026-07-28
- Fix Plugin Check findings: escape exception messages, sanitize numeric settings, protect autoload direct access, remove discouraged load_plugin_textdomain, drop unnecessary $_GET usage in admin enqueue, and remove hidden .gitignore from wordpress-org assets folder
- Rename main plugin file to ai-provider-for-cursor.php
0.1.5 – 2026-07-28
- Document Cursor API usage, data transmission, and privacy for WordPress.org review
- Add
load_plugin_textdomain()andDomain Pathheader for translations - Align license URI with readme; remove third-party product-specific FAQ entry
0.1.4 – 2026-07-28
- Fix: poll Get A Run when create returns FINISHED without
result, so summaries are not empty
0.1.3 – 2026-07-28
- Fix: raise HTTP timeout for Cloud Agent create/poll above the WordPress AI Client default of 30s
- Omit model id when it is
default/autoso Cursor resolves the account default
0.1.2 – 2026-07-27
- Fix: declare temperature and related model options so AI plugin features (summarization, titles, excerpts) pass text-generation support checks
0.1.1 – 2026-07-27
- Fix: expose Cursor as an
api_keyConnectors auth method so the WordPress AI plugin detects credentials - Sync the API key with the canonical
connectors_ai_cursor_api_keyoption - Declare credentials via
wpai_has_ai_credentialsandwpai_is_cursor_connector_configured
0.1.0 – 2026-07-27
- Initial release
- Cursor provider registration for the WordPress AI Client
- Settings page for API key, default model, and poll options
- Connectors card with Configure link only
- Text generation via no-repo Cloud Agents
