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

# Directus

> Connect Directus to Rocket and build content-driven apps, product catalogs, and multi-language sites: all from chat.

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

Describe the content experience you want in chat and Rocket generates pages, listing views, and dynamic layouts that pull directly from your Directus collections.

<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 or content site" icon="newspaper">
    Publish articles, tutorials, and news posts managed entirely through Directus.
  </Card>

  <Card title="Product catalog" icon="tags">
    Display products with images, descriptions, pricing, and variant options from Directus.
  </Card>

  <Card title="Multi-language site" icon="language">
    Serve content in multiple languages using Directus translations with a language switcher.
  </Card>

  <Card title="FAQ or knowledge base" icon="circle-question">
    Searchable help center powered by Directus content, grouped by category.
  </Card>

  <Card title="Rich media collections" icon="images">
    Image-heavy collections like projects, case studies, or creative work with filtering and detail views.
  </Card>
</CardGroup>

<Divider />

## Before you connect

You need a running Directus instance and an access token.

<Card icon="arrow-up-right-from-square" horizontal href="https://directus.io/docs/guides/ai/mcp/installation#generate-access-token" arrow="true">
  **Get your Directus access token** from the Directus documentation.
</Card>

<Steps>
  <Step title="Open your User Profile">
    Open your Directus project and go to your **User Profile**.
  </Step>

  <Step title="Generate a new token">
    Scroll to the **Token** field and click **Generate New Token**.
  </Step>

  <Step title="Copy the token and URL">
    Copy the token and note your **project URL** (e.g., `https://your-project.directus.app`).
  </Step>
</Steps>

<Warning>
  Never paste your Directus access token directly into Rocket chat. Always use the secure connection flow. If you think your token has been exposed, regenerate it from your Directus User Profile.
</Warning>

<Divider />

## Connect Directus

<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 Directus, for example `Connect Directus and build a blog listing page from my articles collection`. Rocket detects the intent and shows a **Connect** button inline. Click it to open the credentials popup.

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

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/directus/web-browser/directus-chat-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=b865653e919edaa512f86475bfb88e8f" alt="Rocket chat panel showing a Connect prompt for Directus." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/directus/web-browser/directus-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 **Directus** card, then click **Connect**.

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

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

    **After clicking Connect**

    A popup opens. Enter your **Project URL** and **Access Token**, then click **Save**.

    <Frame caption="Directus credentials popup">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/directus/web-browser/directus-popup-light.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=5c80335908685ebebf19495591fe6070" alt="Popup showing Project URL and Access Token fields for Directus." className="theme-image light-image" width="840" height="650" data-path="images/build-docs/connectors/directus/web-browser/directus-popup-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/directus/web-browser/directus-popup-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=a02e462d0397f5efe1d63106289847e3" alt="Popup showing Project URL and Access Token fields for Directus." className="theme-image dark-image" width="840" height="650" data-path="images/build-docs/connectors/directus/web-browser/directus-popup-dark.webp" />
    </Frame>

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

    **Update or disconnect**

    Open [**Connectors > Directus**](#connect-directus) and click the card. Replace the existing credentials to update, or click **Disconnect** to remove the integration.

    <Frame caption="Edit or disconnect Directus">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/directus/web-browser/directus-disconnect-light.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=b5458a2e87accf7a2d572cd84945a432" alt="Directus card in edit state showing Disconnect option." className="theme-image light-image" width="1816" height="528" data-path="images/build-docs/connectors/directus/web-browser/directus-disconnect-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/PMhgGqf0Gxy-8x42/images/build-docs/connectors/directus/web-browser/directus-disconnect-dark.webp?fit=max&auto=format&n=PMhgGqf0Gxy-8x42&q=85&s=455e859e90819668123628fdef78a1a3" alt="Directus card in edit state showing Disconnect option." className="theme-image dark-image" width="1813" height="527" data-path="images/build-docs/connectors/directus/web-browser/directus-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 Directus. Rocket detects the intent and shows a **Connect** button inline. Tap it to open the credentials screen.

    **Option 2: From the Connectors tab**

    Tap the **More** button in the header, then tap **Integrations**. Tap the **Directus** card, then tap **Connect**.

    **After tapping Connect**

    Enter your **Project URL** and **Access Token**, then tap **Done** to save. A green dot appears next to Directus when the connection is active.

    **Update or disconnect**

    Go back to the **Directus** card in Integrations. Update your credentials anytime or tap **Disconnect** to remove the integration.
  </Tab>
</Tabs>

<Divider />

## Example prompts

| What you want    | Prompt to use                                                                                          |
| :--------------- | :----------------------------------------------------------------------------------------------------- |
| Blog listing     | `Show all articles from my Directus posts collection with thumbnails and publish dates.`               |
| Detail page      | `When a user clicks an article, open a detail page with the full rich-text body from Directus.`        |
| Product catalog  | `Create a product grid from my Directus products collection with images, prices, and a detail modal.`  |
| Multi-language   | `Add a language switcher that toggles content between English and Spanish from Directus translations.` |
| FAQ page         | `Build an FAQ accordion from my Directus faqs collection, grouped by category.`                        |
| Search           | `Add a full-text search bar to my Directus-powered blog listing page.`                                 |
| Media gallery    | `Display images from my Directus media collection in a responsive grid with lightbox preview.`         |
| Filtered listing | `Show Directus products filtered by category with a sidebar navigation.`                               |
| Pagination       | `Add pagination to my Directus blog listing, showing 10 posts per page.`                               |
| Admin view       | `Create a simple admin table for my Directus collection with inline editing and a delete button.`      |

<Divider />

## Tips

* **Choose token permissions carefully.** The access token inherits the permissions of the Directus user that generated it. Use a dedicated service account with scoped permissions for production apps.
* **Your access token is stored securely.** Rocket encrypts it at rest and never exposes it in client-side code.
* **Directus must be publicly reachable.** Local-only instances will not work. Your Directus URL must be accessible from the internet.
* **Deleting content must happen in Directus.** Rocket can create and update records, but content and asset deletion should be managed directly in your Directus admin panel.
* **One Directus project per Rocket project.** Each Rocket project connects to one set of credentials. Use different Rocket projects for different Directus instances.
* **Licensing.** Directus is licensed under [BSL 1.1](https://directus.io/docs/self-hosting/overview). Organizations with over \$5 million in total finances require a commercial license. Smaller organizations and individuals can use Directus commercially without a license.

<Divider />

## What's next?

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

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

  <Card title="Resend" icon="envelope" href="./resend">
    Send notification emails when new content is published from Directus.
  </Card>

  <Card title="Netlify" icon="cloud" href="./netlify">
    Deploy your Directus-powered site to Netlify with one prompt.
  </Card>
</CardGroup>
