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

# Contentful

> Let the Dema Agent search, create, and publish entries and assets, audit the content model, and run AI Actions in Contentful when you ask.

## Overview

Once Contentful is connected, the Dema Agent can work with your content directly inside a conversation. It can find entries missing key fields before a launch, bulk-update entries (pricing, seasonal copy), create and publish new entries, upload and publish assets, audit the content model — content types, tags, and locales — for localization gaps, and invoke reusable AI Actions to localize or refresh content.

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

<Note>
  Installing the MCP app in Contentful and connecting in Dema are **both required**. The MCP app gates which tools work in each space and environment, so a connection in Dema only reaches the spaces and environments where the app is installed and authorized.
</Note>

***

## Prerequisites

* A Contentful account with permission to install Marketplace apps in the target space.
* The Contentful MCP app installed and configured per space and per environment (see below).
* Your data region — Global/US or EU — which determines the MCP URL.

***

## Connect Contentful

<Steps>
  <Step title="Install and configure the Contentful MCP app (per space + environment)">
    1. Log in to the Contentful web app (use `be.eu.contentful.com` if your org is EU-resident, otherwise `be.contentful.com`).
    2. In the top navigation open **Apps** then **Marketplace**.
    3. Find the **Contentful MCP** app and click **Install**.
    4. Select the target space and environment and click **Authorize access**.
    5. Choose which tool categories are enabled and set each to **read-only** or **read/write** (start read-only). Save.
    6. Repeat for every space + environment the agent needs.

    <Tip>
      Start with everything read-only and enable write only on the spaces and environments where you actually want the agent to make changes.
    </Tip>
  </Step>

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

    * **MCP URL** — your region's URL: Global/US `https://mcp.contentful.com/mcp` or EU `https://mcp.eu.contentful.com/mcp`.

    Click **Add**. Complete the one-click OAuth sign-in and select the space/environment pair(s) in Contentful's configuration UI. Dema marks the integration as Active.

    <Note>
      Reference the **environment ID**, not an alias. Environment aliases are not supported and cause a `Forbidden` error.
    </Note>
  </Step>
</Steps>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="The agent has nothing to work on">
    You must select the space/environment in Contentful's configuration UI on each connection, and the MCP app must also be installed in that space + environment. Confirm both, then reconnect.
  </Accordion>

  <Accordion title="Failed to fetch app installation: Forbidden">
    Reference the environment ID directly — environment aliases are not supported. Replace the alias with the actual environment ID and reconnect.
  </Accordion>

  <Accordion title="EU data residency">
    If your org is EU-resident, use `https://mcp.eu.contentful.com/mcp` and sign in via `be.eu.contentful.com`.
  </Accordion>
</AccordionGroup>

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

***

## Additional resources

* [Contentful MCP server](https://www.contentful.com/developers/docs/tools/mcp-server/)
* [App installation (App Framework)](https://www.contentful.com/developers/docs/extensibility/app-framework/app-installation/)
* [EU data residency](https://www.contentful.com/help/faq/eu-data-residency/)
