Title: AI Provider for Cursor
Author: Rafa Carvalhido
Published: <strong>August 2, 2026</strong>
Last modified: August 2, 2026

---

Search plugins

![](https://ps.w.org/ai-provider-for-cursor/assets/banner-772x250.png?rev=3632112)

![](https://ps.w.org/ai-provider-for-cursor/assets/icon.svg?rev=3632112)

# AI Provider for Cursor

 By [Rafa Carvalhido](https://profiles.wordpress.org/rafacarvalhido/)

[Download](https://downloads.wordpress.org/plugin/ai-provider-for-cursor.0.1.7.zip)

 * [Details](https://wordpress.org/plugins/ai-provider-for-cursor/#description)
 * [Reviews](https://wordpress.org/plugins/ai-provider-for-cursor/#reviews)
 *  [Installation](https://wordpress.org/plugins/ai-provider-for-cursor/#installation)
 * [Development](https://wordpress.org/plugins/ai-provider-for-cursor/#developers)

 [Support](https://wordpress.org/support/plugin/ai-provider-for-cursor/)

## Description

This plugin connects WordPress to [Cursor](https://cursor.com/) 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 `cursor` provider 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](https://cursor.com/dashboard/api)

### External services

This plugin relies on the **Cursor Cloud Agents API**, operated by Anysphere, Inc.(
[cursor.com](https://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 `cursor` provider(
   for example summarization, title generation, excerpts, or your own `AiClient::
   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 account
 * `POST /v1/agents` — create a Cloud Agent and start a text-generation run
 * `GET /v1/agents/{agentId}/runs/{runId}` — poll run status and retrieve the generated
   text
 * `POST /v1/agents/{agentId}/archive` — optional cleanup after a successful run

**Service links**

 * Cursor website: [https://cursor.com/](https://cursor.com/)
 * Cloud Agents API documentation: [https://cursor.com/docs/cloud-agent/api/endpoints](https://cursor.com/docs/cloud-agent/api/endpoints)
 * API keys dashboard: [https://cursor.com/dashboard/api](https://cursor.com/dashboard/api)
 * Terms of Service: [https://cursor.com/terms-of-service](https://cursor.com/terms-of-service)
 * Privacy Policy: [https://cursor.com/privacy](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

 1. Create a Cursor API key at [cursor.com/dashboard/api](https://cursor.com/dashboard/api)
 2. Open **Settings  Connectors**, find the Cursor card, and enter the API key
 3.  * **wp-config.php (recommended for production):** add this line to `wp-config.
       php` _above_ `/* That's all, stop editing! */`:
     * define( ‘CURSOR_API_KEY’, ‘your-cursor-api-key-here’ );

 * You can also set a `CURSOR_API_KEY` environment variable (same name). Environment
   and the PHP constant both override the database value.
    1. 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
    1. Confirm the Cursor connector shows as connected on **Settings  Connectors**

## Installation

 1. Upload the plugin files to `/wp-content/plugins/ai-provider-for-cursor/`
 2. Activate the plugin through the Plugins screen in WordPress
 3. Configure the plugin (see Configuration below)

## FAQ

### Where do I enter the API key?

On **Settings  Connectors**. For production, prefer defining `CURSOR_API_KEY` in`
wp-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.php` in 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 `result` text. 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 interval `2`, 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 via `GET /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.

Contributors

 *   [ Rafa Carvalhido ](https://profiles.wordpress.org/rafacarvalhido/)

[Translate “AI Provider for Cursor” into your language.](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-cursor)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/ai-provider-for-cursor/),
check out the [SVN repository](https://plugins.svn.wordpress.org/ai-provider-for-cursor/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/ai-provider-for-cursor/)
by [RSS](https://plugins.trac.wordpress.org/log/ai-provider-for-cursor/?limit=100&mode=stop_on_copy&format=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()` and `Domain Path` header 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`/`auto` so 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_key` Connectors auth method so the WordPress AI
   plugin detects credentials
 * Sync the API key with the canonical `connectors_ai_cursor_api_key` option
 * Declare credentials via `wpai_has_ai_credentials` and `wpai_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

## Meta

 *  Version **0.1.7**
 *  Last updated **18 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 7.0 or higher **
 *  Tested up to **7.0.2**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [AI](https://wordpress.org/plugins/tags/ai/)[artificial intelligence](https://wordpress.org/plugins/tags/artificial-intelligence/)
   [connector](https://wordpress.org/plugins/tags/connector/)[cursor](https://wordpress.org/plugins/tags/cursor/)
 *  [Advanced View](https://wordpress.org/plugins/ai-provider-for-cursor/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/ai-provider-for-cursor/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/ai-provider-for-cursor/reviews/)

## Contributors

 *   [ Rafa Carvalhido ](https://profiles.wordpress.org/rafacarvalhido/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/ai-provider-for-cursor/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://linknabio.gg/rafa_carvalhido_wp)