FlexSite Plugin for Cursor and Claude Code
Applies to: All
Overview
The FlexSite plugin brings FlexSite into Cursor and Claude Code. Ask your coding agent to create a site, run it locally, deploy it, or move an existing Drupal site to FlexSite. The agent walks you through each step and waits for your yes before it spends credits, pushes code, or replaces a database.
The plugin is open source under the MIT license: github.com/Flexsite-io/flexsite-plugin.
Before you start
- A FlexSite account.
- git, and Node.js 22 or later for the FlexSite CLI:
npm install -g @flexsiteio/cli. The agent tells you when it needs it. - DDEV or Lando, only to run the site locally.
Steps — install
Claude Code: run these two commands in Claude Code.
/plugin marketplace add Flexsite-io/flexsite-plugin
/plugin install flexsite@flexsite
Cursor: open Customize in the sidebar, search for FlexSite, and select Install.
The first time the agent uses a FlexSite tool, your editor opens a FlexSite sign-in page. Approve the connection there. No token is pasted into the chat.
What you can ask
| Say this | What happens |
|---|---|
| “Create a new Drupal 11 site on FlexSite” | Lists project types and templates, shows a preview with the credits it costs, creates the project after you confirm, then clones its FlexLab repository. |
| “Run my FlexSite site locally” | Starts the project’s DDEV or Lando config, pulls the database and files, and checks drush status. |
| “Deploy my changes to dev” | Checks that no rollout is running, pushes the branch mapped to dev, and reports the pipeline, build, image and rollout. If the pipeline fails, it reads the job log and proposes a fix. |
| “Move this Drupal site to FlexSite” | Checks composer.json for hosting blockers, creates the project, merges the platform files, deploys the code, then imports the database and files after you confirm each one. |
| “Add a draft blog post about our spring opening” | Creates unpublished content on a Drupal site with AI agent access turned on. |
| “Is my site healthy? Did the last deploy finish?” | Reads environment health, issues, deployments and backups. |
WordPress: creating a WordPress project, running it locally and deploying it work today. Moving an existing site and editing content are Drupal only for now.
Tokens for git, the database and files
Git, database and file transfers go through the FlexSite CLI, which uses a personal access token. Create it under Profile → Tokens, then run flexsite auth login in your own terminal. Do not paste the token into the chat. The agent names the scopes each task needs:
| Task | Token scopes |
|---|---|
| Clone and deploy | repo:write |
| Pull the database and files to your machine | repo:write, backup:read, files:read, backup:create, files:create |
| Move an existing site | repo:write, database:import, files:import |
Run flexsite git setup once so git asks the CLI for credentials, and no token ends up in the repository’s remote URL.
What the plugin contains
The plugin is markdown and JSON only: five skills, one rule, and the connection to https://agents.flexsite.io/mcp. It has no hooks, scripts or binaries, and it collects no telemetry. Commands such as flexsite, git, ddev, lando, composer and drush run in your project under your editor’s own approval rules.
To disconnect, open your user menu in the FlexSite dashboard, select Connected apps, and select Revoke.