> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rocket.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Strapi

> Connect Strapi to Rocket and build blogs, documentation sites, and e-commerce catalogs from your headless CMS: no copy-pasting content or API setup.

export const LlmsDirective = () => <blockquote className="llms-directive">
    For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
    For a lightweight markdown version of this page, append .md to the URL.
  </blockquote>;

<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.

<Note>
  This connector is only available for **Next.js TypeScript** web build tasks.
</Note>

<Divider />

## 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

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 it from the Strapi Admin Panel and create a new one.
</Warning>

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

<Divider />

## 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="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-chat-light.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=3032698b5eb2bb53fc6b8068fbfc4f0f" alt="Rocket chat panel showing a Connect prompt for Strapi." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/strapi/web-browser/strapi-chat-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-chat-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=aa5ce57babbfcc72f97fb25149e54de1" alt="Rocket chat panel showing a Connect prompt for Strapi." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/strapi/web-browser/strapi-chat-dark.webp" />
    </Frame>

    **Option 2: From the Connectors tab**

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

    <Frame caption="Open Connectors from the toolbar">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/2lqYWidv_xVHKfL6/images/build-docs/connectors/shared/connectors-tab-open-light.webp?fit=max&auto=format&n=2lqYWidv_xVHKfL6&q=85&s=7bd785a0e878564054e08328b2aa3d6b" alt="Toolbar dropdown with Connectors option highlighted." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/shared/connectors-tab-open-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/2lqYWidv_xVHKfL6/images/build-docs/connectors/shared/connectors-tab-open-dark.webp?fit=max&auto=format&n=2lqYWidv_xVHKfL6&q=85&s=d047040372d776cb47e4e483de8eeb8d" alt="Toolbar dropdown with Connectors option highlighted." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/shared/connectors-tab-open-dark.webp" />
    </Frame>

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

    <Frame caption="Strapi card in the Connectors panel">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-connectors-tab-light.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=44b755d92bd037aaca3fc195fa9c44e2" alt="Connectors panel showing the Strapi card with a Connect button." className="theme-image light-image" width="1814" height="525" data-path="images/build-docs/connectors/strapi/web-browser/strapi-connectors-tab-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-connectors-tab-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=0f35d004bb24c23655b5c15e49c26c8e" alt="Connectors panel showing the Strapi card with a Connect button." className="theme-image dark-image" width="1815" height="522" data-path="images/build-docs/connectors/strapi/web-browser/strapi-connectors-tab-dark.webp" />
    </Frame>

    **After clicking Connect**

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

    <Frame caption="Connect Strapi popup">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-popup-light.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=e35014a431df444111c58139dfca8aa5" alt="Connect Strapi popup with Instance URL and API token fields." className="theme-image light-image" width="840" height="650" data-path="images/build-docs/connectors/strapi/web-browser/strapi-popup-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-popup-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=bba77c7af8b55717758b99c678b1fa06" alt="Connect Strapi popup with Instance URL and API token fields." className="theme-image dark-image" width="840" height="650" data-path="images/build-docs/connectors/strapi/web-browser/strapi-popup-dark.webp" />
    </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="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-disconnect-light.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=d9e9476efdd0aaf931310da26efb9933" alt="Strapi card showing Edit and Disconnect buttons." className="theme-image light-image" width="1816" height="521" data-path="images/build-docs/connectors/strapi/web-browser/strapi-disconnect-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/strapi/web-browser/strapi-disconnect-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=78215d7f2962a89878fe2a03a2bd4b94" alt="Strapi card showing Edit and Disconnect buttons." className="theme-image dark-image" width="1814" height="536" data-path="images/build-docs/connectors/strapi/web-browser/strapi-disconnect-dark.webp" />
    </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

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 theme={null}
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

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

    ```bash wrap theme={null}
    npm install @sensinum/strapi-plugin-mcp @strapi/admin@latest
    ```
  </Step>

  <Step title="Update plugin config">
    Update `config/plugins.ts`:

    ```js wrap theme={null}
    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 theme={null}
    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

| 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

* **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 />

## What's next?

<CardGroup cols={2}>
  <Card title="Directus" icon="cubes" href="./directus">
    Comparing headless CMS options? See how Directus works with Rocket.
  </Card>

  <Card title="Supabase" icon="database" href="./supabase/overview">
    Pair Strapi content with Supabase auth and user management.
  </Card>

  <Card title="Resend" icon="paper-plane" href="./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>
