连接器指南阅读约 4 分钟20 个 MCP 工具7 种语言

如何通过 MCP 将 Contentful 连接到 ChatGPT

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

HC作者:HelpCode 团队更新于 4 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Contentful

Contentful

Let your AI work with your Contentful content: search entries and assets, read content types, locales and tags, and create, change, publish or unpublish entries. Delivery token for reads, management token for writes.

个工具

20

区域

INTL

类别

CMS

身份验证

API credentials

所需环境变量

CONTENTFUL_SPACE_IDCONTENTFUL_ENVIRONMENTCONTENTFUL_DELIVERY_URLCONTENTFUL_DELIVERY_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Contentful,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

试试这样问

Contentful 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Contentful · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Contentful、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Contentful + ChatGPT

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

CONTENTFUL_SPACE_ID, CONTENTFUL_ENVIRONMENT, CONTENTFUL_DELIVERY_URL, CONTENTFUL_DELIVERY_TOKEN

步骤 1 — 获取凭证

  1. 在 Contentful(https://app.contentful.com)中打开你的空间,然后进入 Settings → API keys → Add API key。为密钥命名(例如 "AnythingMCP"),勾选它可以读取的环境(至少 master),然后保存。
  2. 将 Space ID 复制到 CONTENTFUL_SPACE_ID,将 Content Delivery API access token 复制到 CONTENTFUL_DELIVERY_TOKEN。
  3. 将 CONTENTFUL_ENVIRONMENT 设为环境 ID,通常是 master。其他环境列在 Settings → Environments 中。
  4. 将 CONTENTFUL_DELIVERY_URL 设为 https://cdn.contentful.com;如果空间位于欧盟数据区域,则设为 https://cdn.eu.contentful.com,末尾不要加斜杠。如果希望 AI 也能读取草稿,请改用 https://preview.contentful.com(或 https://preview.eu.contentful.com),并搭配同一密钥的 Content Preview API access token。
  5. 如需写入,请创建个人访问令牌:头像菜单 → Account settings → CMA tokens → Create personal access token。选择有效期后立即复制令牌,因为 Contentful 只显示一次。将它粘贴到 CONTENTFUL_MANAGEMENT_TOKEN(不要加 Bearer 字样),并将 CONTENTFUL_MANAGEMENT_URL 设为 https://api.contentful.com(或 https://api.eu.contentful.com)。该令牌以你的身份操作,在你可以编辑的每个空间中都有效。
  6. 如果你的组织需要批准个人访问令牌,请组织管理员打开 Organization settings,在个人访问令牌的访问设置中找到该令牌并授予访问权限。在此之前,写入工具会返回 401 OrganizationAccessGrantRequired;使用 Delivery 令牌的读取不受影响。
  7. 安装连接器,先运行 contentful_get_space:它会返回空间名称及其语言区域,可以快速确认 Space ID 和 Delivery 令牌是否匹配。

两个令牌是有意为之:Delivery 令牌只能读取已发布的内容(使用 Preview 令牌时还能读取草稿),因此只配置了四个必填值的连接器可以查找所有内容,但不会做任何修改。写入、未发布的草稿、空间和环境都通过 Content Management API 并使用个人访问令牌处理。如果 CONTENTFUL_MANAGEMENT_URL 和 CONTENTFUL_MANAGEMENT_TOKEN 留空,管理类工具只会提示它们缺失。

发布会改变线上网站:contentful_publish_entry 和 contentful_unpublish_entry 会改变访客在你的网站或应用中看到的内容,因此 AI 会先说明是哪个条目以及会产生什么影响,并等待你确认。contentful_delete_entry 在安装时处于关闭状态,因为删除的条目无法恢复。

修改的工作方式:contentful_list_content_types 提供内容类型和字段的 ID,contentful_list_locales 提供语言区域代码。字段值先按字段 ID、再按语言区域组织,例如 {"title": {"en-US": "Hello"}}。每次修改前,AI 会用 contentful_get_entry_for_editing 读取条目以获取当前的 sys.version;如果期间有其他人保存过,Contentful 会返回 409 VersionMismatch,AI 会重新读取。contentful_update_entry 会替换全部字段,未包含的字段会被删除;只改一两个字段时,AI 会使用 contentful_patch_entry。只有发布新版本后,修改才会上线。

搜索:contentful_list_entries 接受 content_type、全文搜索 query,以及 fields.slug=hello 或 fields.date[gte]=2026-01-01 等其他筛选条件。按字段筛选或排序时需要 content_type。关联的条目和资源会在 includes 中返回;资源 URL 以 // 开头,AI 会补上 https:。

分页:列表返回 total、skip 和 limit(最多 1,000);下一页从 skip + limit 开始。

常见错误:401 AccessTokenInvalid 表示令牌错误或已过期,或者在 Preview 主机上使用了 Delivery 令牌(或反之)。404 NotFound 表示 ID 错误,或者令牌未覆盖该空间或环境:此时 Contentful 返回 404 而不是 403。400 "A Content Type ID is required" 表示按字段筛选时缺少 content_type。422 ValidationFailed 会指出为空或违反校验规则的字段。429 RateLimitExceeded:Management API 每秒约允许 7 个请求,请稍候重试。

该连接器不会上传资源,不会创建或编辑内容类型,不管理环境、Webhook、角色和应用,也不使用 GraphQL API。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 ChatGPT 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

ChatGPT 通过开发者模式(Developer mode)将 MCP 服务器作为自定义应用接入,仅付费套餐可用,免费套餐不可用。在 Business 和 Enterprise 工作区中,可能需要管理员先开启。

  1. 在 ChatGPT 中打开 Settings → Security and login,开启 Developer mode。
  2. 前往 chatgpt.com/plugins,点击 +。
  3. 填写名称和简短描述,例如 Name: Contentful。
  4. 在 Connection 下填入 MCP 服务器 URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,然后创建连接。
  5. ChatGPT 提示时,登录 AnythingMCP(OAuth)并允许访问。

可用工具

ToolWhat it does
contentful_get_spaceRead the space the connector is set up for (Content Delivery API): its name and locales with the default locale
contentful_list_content_typesList the content types of the environment (Content Delivery API): for each its sys.id (the id entries are filtered by), name, displayField…
contentful_get_content_typeRead one content type by id (Content Delivery API): its fields with id, name, type (Symbol, Text, RichText, Integer, Number, Date, Boolean…
contentful_list_entriesSearch published entries (Content Delivery API)
contentful_get_entryRead one published entry by id (Content Delivery API): sys (id, contentType, createdAt, updatedAt, revision), metadata.tags and fields
contentful_list_assetsSearch published assets (images, documents, videos) via the Content Delivery API
contentful_get_assetRead one published asset by id (Content Delivery API): title, description and file with url (prefix https:), fileName, contentType, size…
contentful_list_localesList the locales of the environment (Content Delivery API): code (e.g. en-US, de-DE), name, default flag and fallbackCode
contentful_list_tagsList the public content tags of the environment (Content Delivery API) with sys.id and name
contentful_list_spacesList the spaces the management token can reach (Content Management API), with sys.id and name
contentful_list_environmentsList the environments of the space (Content Management API), e.g. master, staging, with sys.id, name, status and aliases
contentful_list_all_entriesSearch all entries including drafts and changed-but-unpublished versions (Content Management API)
contentful_get_entry_for_editingRead the latest version of an entry, draft changes included (Content Management API): fields with every locale, metadata.tags and…
contentful_create_entryCreate a draft entry of a content type (Content Management API). fields maps each field id to its values per locale, e.g. {"title"…
contentful_update_entryReplace the fields of an entry (Content Management API)
contentful_patch_entryChange single fields of an entry with JSON Patch operations (Content Management API), leaving the rest untouched
contentful_publish_entryPublish an entry, making its current version visible on the website or app through the delivery API (Content Management API). version must…
contentful_unpublish_entryUnpublish an entry: it disappears from the delivery API, so from the website or app, and stays as a draft (Content Management API)
contentful_delete_entryDelete an entry for good (Content Management API)
contentful_create_tagCreate a content tag in the environment (Content Management API)

示例提示

  • “找出我们过去 30 天内发布的博客文章,列出每篇的标题、slug 和作者。”
  • “哪些条目有已保存但尚未发布的修改?”
  • “列出我们本月上传的图片,以及它们的文件大小和尺寸。”
  • “把春季促销落地页的标题改为‘春季促销:全场 8 折’,在我确认后发布。”

FAQ

ChatGPT 免费套餐能用自定义 MCP 连接器吗? 不能。自定义 MCP 连接需要开发者模式,只有付费套餐提供。

下一步

这份指南对你有帮助吗?

你的 Contentful 智能体只差一次点击。

安装连接器,粘贴密钥,向 ChatGPT 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Contentful 连接到 Claude

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

连接器

如何通过 MCP 将 Contentful 连接到 Cursor

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

连接器

如何通过 MCP 将 Contentful 连接到 Gemini

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

连接器

如何通过 MCP 将 Contentful 连接到 Meta Muse

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

连接器

Contentful 接入 MCP:从任意 AI 代理驱动 Contentful

让你的 AI 处理 Contentful 中的内容:搜索条目和资源,读取内容类型、语言区域和标签,并创建、修改、发布或取消发布条目。读取使用 Delivery 令牌,写入使用 Management 令牌。

连接器

如何通过 MCP 将 Canva 连接到 ChatGPT

让你的 AI 在 Canva 中工作:查找和读取设计,创建新设计,将设计导出为 PDF、PNG、PowerPoint 或视频并获取下载链接,整理文件夹,通过链接上传图片,读取品牌模板,并在设计上发表评论。