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

# Storyblok

> Let the Dema Agent read and manage stories, components, assets, spaces, and workflows in your Storyblok space when you ask.

## Overview

Once Storyblok is connected, the Dema Agent can work with your Storyblok content directly inside a conversation — read and manage stories, components, assets, spaces, and workflows.

The agent only acts when you ask it to, and Dema asks you to confirm sensitive changes before they are applied.

<Note>
  This integration uses Storyblok's official hosted MCP server, currently offered through **Storyblok Labs**. Its capabilities may evolve over time.
</Note>

***

## Prerequisites

* A Storyblok account with permission to create a personal access token.
* The token must be a **Personal Access Token (Management Token)** — not a Content Delivery API token. The agent manages content, so it needs Management API access.

***

## Connect Storyblok

<Steps>
  <Step title="Create a personal access token in Storyblok">
    1. In the Storyblok app, go to **My Account → Account settings → Personal access tokens**.
    2. Click **Generate Token**.
    3. Name the token something recognizable, such as `Dema Agent`.
    4. Under **Scopes**, select the scopes the agent needs — Stories, Components, Assets, Spaces, and the workflow-related scopes — or enable **Full user permission** to grant the same access as your own account.
    5. Under **Spaces**, choose the spaces the agent should reach (defaults to all spaces you own).
    6. Optionally set an **expiration date**.
    7. Create the token and copy it now — Storyblok shows it only once.

    <Note>
      A token's scopes and spaces cannot be changed after it is created. To adjust them later, generate a new token.
    </Note>
  </Step>

  <Step title="Connect in Dema">
    In Dema, go to **Agents → Settings → Integrations**, find **Storyblok**, and click **Connect**. Enter:

    * **Personal access token** — the token you copied.

    Click **Add**. Dema marks the integration as Active.
  </Step>
</Steps>

***

## Rotating the key

To rotate, generate a new personal access token in Storyblok, click **Reconnect** on the Storyblok integration card in Dema, enter the new token, then delete the old token in Storyblok.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Dema cannot authenticate">
    Make sure the token is a **Personal Access Token (Management Token)** from **My Account → Personal access tokens**, not a Content Delivery API token from a space's access tokens. Only the Management token works here.
  </Accordion>

  <Accordion title="The agent cannot see a space">
    The token only covers the spaces you selected when you created it. Generate a new token with the right space scope and click **Reconnect**.
  </Accordion>

  <Accordion title="The agent says it is missing a permission">
    The token's scopes do not cover the action. Generate a new token with the needed scopes (or **Full user permission**) and reconnect.
  </Accordion>

  <Accordion title="I lost the token">
    Storyblok shows the token only once. Generate a new one and reconnect.
  </Accordion>
</AccordionGroup>

If you are still stuck, contact [support](mailto:info@dema.ai) with the error message you see.

***

## Additional resources

* [Storyblok MCP server](https://mcp.labs.storyblok.com/)
* [Storyblok access tokens](https://www.storyblok.com/docs/concepts/access-tokens)
