# Strapi (/build/connectors/strapi)

<LlmsDirective />

Point Rocket at your Strapi instance and describe the content experience you want in chat. Rocket reads your content types, generates the pages, and wires up the data.

<Divider />

## What you can do [#what-you-can-do]

<CardGroup cols={2}>
  <Card title="Blog with rich content" icon="blog">
    Publish articles with images, categories, and author profiles managed in Strapi.
  </Card>
  <Card title="Documentation site" icon="book">
    Structured docs with sidebar navigation and versioned content from Strapi.
  </Card>
  <Card title="Product catalog" icon="store">
    Display products with images, descriptions, pricing, and variant options from Strapi.
  </Card>
  <Card title="Dynamic page sections" icon="wand-magic-sparkles">
    Render pages from Strapi content types with modular blocks like heroes, feature grids, and CTAs.
  </Card>
  <Card title="Team or directory page" icon="users">
    Showcase team members, partners, or directory listings pulled from Strapi.
  </Card>
</CardGroup>

<Divider />

## Before you connect [#before-you-connect]

You need two things: your **Strapi project URL** (e.g. `https://your-project.strapiapp.com`) and an **API token** from your Strapi Admin Panel.

<Card icon="arrow-up-right-from-square" horizontal href="https://docs.strapi.io/cms/features/api-tokens" arrow="true">
  **Get your Strapi API token** from the Strapi documentation.
</Card>

<Warning>
  Never paste your API token directly into chat. Always use the secure connection popup. If a token is ever exposed, [revoke or rotate it](#revoke-or-rotate-your-api-token) immediately.
</Warning>

<Note>
  Strapi is a **task-level** connector. Each Rocket task connects to its own Strapi instance independently.
</Note>

<Divider />

## Connect Strapi [#connect-strapi]

<Tabs>
  <Tab title="Web Browser">

    You can connect from two places. Both do the same thing.

    **Option 1: From chat**

    Type a prompt that mentions Strapi, for example `Connect Strapi and display blog posts from my CMS`. Rocket detects the intent and shows a **Connect** button inline. Click it to open the credentials popup.

    <Frame caption="Strapi connection prompt in chat">
      <img src="/images/build/connectors/strapi/web-browser/strapi-chat-light.webp" alt="Rocket chat panel showing a Connect prompt for Strapi." className="theme-image light-image" />
      <img src="/images/build/connectors/strapi/web-browser/strapi-chat-dark.webp" alt="Rocket chat panel showing a Connect prompt for Strapi." className="theme-image dark-image" />
    </Frame>

    **Option 2: From the Connectors tab**

    Click the **`...`** button in the preview toolbar, then select **Connectors**.

    <ConnectorsToolbarFrame />

    Click the **Strapi** card, then click **Connect**.

    <Frame caption="Strapi card in the Connectors panel">
      <img src="/images/build/connectors/strapi/web-browser/strapi-connectors-tab-light.webp" alt="Connectors panel showing the Strapi card with a Connect button." className="theme-image light-image" />
      <img src="/images/build/connectors/strapi/web-browser/strapi-connectors-tab-dark.webp" alt="Connectors panel showing the Strapi card with a Connect button." className="theme-image dark-image" />
    </Frame>

    **After clicking Connect**

    A popup opens. Enter your **Instance URL** and **API token**, then click **Connect**.

    <Frame caption="Connect Strapi popup">
      <img src="/images/build/connectors/strapi/web-browser/strapi-popup-light.webp" alt="Connect Strapi popup with Instance URL and API token fields." className="theme-image light-image" />
      <img src="/images/build/connectors/strapi/web-browser/strapi-popup-dark.webp" alt="Connect Strapi popup with Instance URL and API token fields." className="theme-image dark-image" />
    </Frame>

    A green dot appears next to Strapi when the connection is active.

    **Update or disconnect**

    Open [**Connectors > Strapi**](#connect-strapi) and click the card. Click **Edit** to update your credentials or **Disconnect** to remove the integration from this task.

    <Frame caption="Edit and Disconnect options on a connected Strapi card">
      <img src="/images/build/connectors/strapi/web-browser/strapi-disconnect-light.webp" alt="Strapi card showing Edit and Disconnect buttons." className="theme-image light-image" />
      <img src="/images/build/connectors/strapi/web-browser/strapi-disconnect-dark.webp" alt="Strapi card showing Edit and Disconnect buttons." className="theme-image dark-image" />
    </Frame>

  </Tab>

  <Tab title="Mobile App">

    You can connect from two places. Both do the same thing.

    **Option 1: From chat**

    Type a prompt that mentions Strapi. Rocket detects the intent and shows a **Connect** button inline. Tap it to open the credentials screen.

    **Option 2: From the Connectors tab**

    <Steps>
      <Step title="Open the More menu">
        Tap the **More** button in the header.
      </Step>
      <Step title="Go to Integrations">
        Tap **Integrations**.
      </Step>
      <Step title="Connect Strapi">
        Tap the **Strapi** card, then tap **Connect**.
      </Step>
    </Steps>

    **After tapping Connect**

    A popup opens. Enter your **Instance URL** and **API token**, then tap **Done**.

    A green dot appears next to Strapi when the connection is active.

    **Update or disconnect**

    Go back to the **Strapi** card in Integrations. Tap **Edit** to update credentials or **Disconnect** to remove it from this task.

  </Tab>
</Tabs>

<Divider />

## Set up your Strapi instance [#set-up-your-strapi-instance]

Skip this section if you already have a running Strapi instance with the MCP plugin installed.

<Note>
  The MCP plugin is required for both Strapi Cloud and self-hosted projects.
</Note>

**Option A: Strapi Cloud**

<Steps>
  <Step title="Create an account">
    Go to [Strapi Cloud](https://cloud.strapi.io) and create an account.
  </Step>
  <Step title="Connect your repository">
    Connect your repository from GitHub or GitLab, or pick a default template.
  </Step>
  <Step title="Deploy from the dashboard">
    Deploy from the cloud dashboard.
  </Step>
  <Step title="Install the MCP plugin">
    Continue to [Install the MCP plugin](#install-the-mcp-plugin) below.
  </Step>
</Steps>

**Option B: Self-hosted**

Create a new Strapi project locally:

```bash wrap
npx create-strapi@latest
```

Answer the setup questions and wait for installation to complete.

Continue to [Install the MCP plugin](#install-the-mcp-plugin) below.

### Install the MCP plugin [#install-the-mcp-plugin]

<Steps>
  <Step title="Install dependencies">
    Inside your Strapi project folder:

    ```bash wrap
    npm install @sensinum/strapi-plugin-mcp @strapi/admin@latest
    ```
  </Step>
  <Step title="Update plugin config">
    Update `config/plugins.ts`:

    ```js wrap
    module.exports = ({ env }) => {
      const allowedIPs = env('MCP_ALLOWED_IPS');
      const ipConfig = !allowedIPs
        ? '*'
        : allowedIPs === '*'
          ? '*'
          : allowedIPs.split(',').map(ip => ip.trim());

      return {
        mcp: {
          enabled: true,
          config: {
            session: {
              type: 'memory',
              max: 20,
              ttlMs: 600000,
              updateAgeOnGet: true
            },
            allowedIPs: ipConfig,
          }
        }
      };
    };
    ```
  </Step>
  <Step title="Build and start the project">
    ```bash wrap
    npm run build && npm run develop
    ```

    Strapi starts at `http://localhost:1337`. For Strapi Cloud, commit and push to trigger deployment.
  </Step>
</Steps>

**Create content types and set permissions**

<Steps>
  <Step title="Open the Admin Panel">
    Open the **Strapi Admin Panel**. For Strapi Cloud, click the **Visit app** button in your project dashboard to open the admin panel.
  </Step>
  <Step title="Create content types">
    Go to **Content-Type Builder** and create your content types (e.g., Blog, Product, Page).
  </Step>
  <Step title="Add fields">
    Add fields and save.
  </Step>
  <Step title="Add sample content">
    Go to **Content Manager** and add sample records.
  </Step>
  <Step title="Open permissions settings">
    Go to **Settings > Users & Permissions > Roles**.
  </Step>
  <Step title="Enable public access">
    Select the **Public** role and enable `find` and `findOne` for your content types.
  </Step>
  <Step title="Save permissions">
    Save.
  </Step>
</Steps>

<Divider />

## Example prompts [#example-prompts]

| What you want | Prompt to use |
|:--------------|:--------------|
| Blog listing | `Show all articles from my Strapi blog content type with thumbnails and dates.` |
| Article detail page | `When a user clicks an article, show the full rich-text body and author bio from Strapi.` |
| Documentation site | `Build a docs site with sidebar navigation from my Strapi docs collection.` |
| Product catalog | `Create a product grid from Strapi with images, prices, and a detail page for each item.` |
| Dynamic page sections | `Render pages from Strapi page-sections with hero, features, and CTA block types.` |
| Search | `Add a search bar to my Strapi blog that filters articles by title and content.` |
| Category filter | `Add category tabs to my Strapi product listing that filter items by type.` |
| Pagination | `Add pagination to my Strapi blog listing, showing 12 posts per page.` |
| Image gallery | `Display images from my Strapi media library in a responsive masonry grid.` |

<Divider />

## Tips [#tips]

- **Your API token is stored securely.** Rocket encrypts it at rest and never exposes it in client-side code.
- **Strapi must be publicly accessible.** Your instance needs to be reachable from the internet. Local-only instances will not work unless tunnelled.
- **One Strapi project per task.** Each Rocket task connects to one set of Strapi credentials. Use different tasks for different Strapi instances.
- **Content deletion happens in Strapi.** Rocket can create and update records, but delete content and assets directly from your Strapi admin panel.
- **Use the right token type.** Full Access works for development. Use a Read-only token for production apps that only display content.

<Divider />

## Revoke or rotate your API token [#revoke-or-rotate-your-api-token]

Disconnecting in Rocket only stops using the token in this task. To invalidate the token itself, delete or regenerate it in your Strapi Admin Panel.

1. Open the [Strapi API Tokens](https://docs.strapi.io/cms/features/api-tokens) docs, then in Strapi Admin go to **Settings → Global settings → API Tokens**.
2. Find the token you connected to Rocket.
3. Click the delete icon to remove it, or open the token and click **Regenerate** to issue a new value (the old value stops working).
4. If you still need Strapi in Rocket, create or copy the new token and update it with **Edit** on the connector card.

<Card title="Strapi API Tokens documentation" icon="arrow-up-right-from-square" href="https://docs.strapi.io/cms/features/api-tokens" horizontal arrow="true">
  Delete or regenerate the token in Strapi Admin.
</Card>

<Warning>
  After you delete or regenerate the token, any Rocket task still using the old value will fail until you connect a new one.
</Warning>

<Divider />

## What's next? [#whats-next]

<CardGroup cols={2}>
  <Card title="Directus" icon="cubes" href="/build/connectors/directus">
    Comparing headless CMS options? See how Directus works with Rocket.
  </Card>
  <Card title="Supabase" icon="database" href="/build/connectors/supabase/overview">
    Pair Strapi content with Supabase auth and user management.
  </Card>
  <Card title="Resend" icon="paper-plane" href="/build/connectors/resend">
    Send notification emails when new content is published from Strapi.
  </Card>
  <Card title="All connectors" icon="plug" href="/build/connectors/overview">
    Browse every available integration.
  </Card>
</CardGroup>
