View as Markdown

Contentful Integration

Manage Contentful list spaces, get space, list entries, get entry, create entry

The Contentful integration provides access to manage Contentful list spaces, get space, list entries, get entry, create entry through the Integrate MCP server.

Installation

The Contentful integration is included with the SDK:

import { contentfulIntegration } from "integrate-sdk/server";

Setup

1. Create a Contentful OAuth App

  1. Create an OAuth application for Contentful
  2. Configure your redirect URI
  3. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Contentful integration to your server configuration. The integration automatically reads CONTENTFUL_CLIENT_ID and CONTENTFUL_CLIENT_SECRET from your environment variables:

import { createMCPServer, contentfulIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    contentfulIntegration({
      scopes: ["content_management_manage"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

contentfulIntegration({
  clientId: process.env.CUSTOM_CONTENTFUL_ID,
  clientSecret: process.env.CUSTOM_CONTENTFUL_SECRET,
      scopes: ["content_management_manage"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("contentful");
const result = await client.contentful.listSpaces({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, contentfulIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [contentfulIntegration()],
});

Configuration Options

export interface ContentfulIntegrationConfig {
  clientId?: string;

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • content_management_manage

Tools

contentful_list_spaces

List spaces

export interface ContentfulListSpacesParams { "limit"?: number;

contentful_get_space

Get space

export interface ContentfulGetSpaceParams { space_id: string }

contentful_list_entries

List entries

export interface ContentfulListEntriesParams { space_id: string;

contentful_get_entry

Get entry

export interface ContentfulGetEntryParams { space_id: string;

contentful_create_entry

Create entry

export interface ContentfulCreateEntryParams { space_id: string;

contentful_publish_entry

Publish entry

export interface ContentfulPublishEntryParams { space_id: string;

Notes

  • Category: Websites & CMS
  • Authentication mode: OAuth