> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Contentful GraphQL in Metorial for AI agents
URL: https://metorial.com/docs/integrations/contentful-graphql
Last updated: 2026-11-24

Share Contentful GraphQL with your team in Claude, ChatGPT and Cursor through Metorial: content delivery API token sign-in, 5 tools, all read-only.

---

To give your team Contentful GraphQL in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Contentful GraphQL integration in a Metorial portal, and each person connects with a content delivery API token. Agents can read Contentful published or preview content through native GraphQL queries, inspect generated schemas, and optionally discover account spaces with a separate management token. The integration has 5 tools, all read-only, plus 3 triggers.

**What you will learn**

- How an admin shares Contentful GraphQL in a portal and how each person connects
- What Contentful GraphQL asks for when you connect, and where to find it
- How to check the connection with `metorial call`

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- A content delivery API token from Contentful GraphQL for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in method

| Method | Type | What a person provides |
| --- | --- | --- |
| **Content Delivery API Token** | API token | `token`, `previewToken` and `managementToken` |

### Content Delivery API Token

To connect, a person enters these values:

- `token`: Content Delivery API (CDA) access token for querying published content. Found under Settings > API keys in Contentful.
- `previewToken` (optional): Content Preview API (CPA) access token for querying draft/unpublished content. Found under Settings > API keys in Contentful.
- `managementToken` (optional): Content Management API (CMA) personal access token. Required for automatic webhook registration in triggers. Found under Settings > CMA tokens.

### Setup settings

Setup also asks for:

- `spaceId`: The Contentful Space ID. Found in Settings > General in the Contentful web app.
- `environmentId` (optional): The environment ID within the space (e.g. "master"). Defaults to "master".
- `region` (optional): Data residency region. Use "eu" for European data residency (graphql.eu.contentful.com). One of "us", "eu".

## Admin: share Contentful GraphQL in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Contentful GraphQL. For how members connect, choose **Each person connects** so everyone enters their own content delivery API token, or **Shared connection** to enter one content delivery API token for everyone.

3. **Choose who gets it**

   Add the access groups that should see Contentful GraphQL. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Contentful GraphQL integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search "contentful graphql"
```

## Employee: connect Contentful GraphQL

### In the portal

1. **Open Contentful GraphQL in the catalog**

   Sign in to your portal and open Contentful GraphQL. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your content delivery API token (token).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search "contentful graphql"
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your Contentful GraphQL connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list "contentful graphql"
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Every Contentful GraphQL tool only reads, so the connection is read-only as it is.

## Check it worked

```bash
metorial list "contentful graphql"
metorial tools <integration-id>
metorial call <integration-id> list_content_types -d '{}'
```

`metorial tools` lists the 5 tools, minus any you rejected. `list_content_types` takes no input. It lists all available top-level query fields from the Contentful GraphQL schema.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (5)

- `list_content_types`: List all available top-level query fields from the Contentful GraphQL schema.
- `query_content`: Execute a GraphQL query against published content in Contentful. Needs `query`.
- `preview_content`: Execute a native read-only GraphQL query with a Content Preview API token. Needs `query`.
- `introspect_schema`: Discover the GraphQL schema for your Contentful space.
- `list_spaces`: Discover space IDs and names accessible to the optional Content Management API token.

## Triggers

Contentful GraphQL has 3 triggers, which fire on events in Contentful GraphQL:

- `asset_events`: Triggers when an asset is created, saved, published, unpublished, archived, unarchived, or deleted in your Contentful space.
- `content_type_events`: Triggers when a content type is created, saved, or deleted in your Contentful space.
- `entry_events`: Triggers when an entry is created, saved, published, unpublished, archived, unarchived, or deleted in your Contentful space.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Contentful GraphQL there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Contentful GraphQL on metorial.com](https://metorial.com/integrations/contentful-graphql): the integration overview