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

Contentful MCP 连接 Microsoft Copilot

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

HC作者:HelpCode 团队更新于 5 分钟阅读 在 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 的客户端

摘要

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

引导式设置

2 分钟将 Contentful 连接到 Microsoft Copilot

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Contentful,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。

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

试试这样问

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 + Microsoft Copilot

让你的 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 — 在 Microsoft Copilot 中添加连接器

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

Microsoft Copilot 通过在 Copilot Studio 中构建的智能体使用 MCP 服务器:把 AnythingMCP 作为工具添加到智能体,然后把智能体发布到 Microsoft 365 Copilot 和 Teams。Copilot Studio 从 Microsoft 的云端通过 Streamable HTTP 连接,AnythingMCP 支持这种方式。

  1. 在 Copilot Studio 中打开你的智能体(或新建一个),进入 Tools,选择 Add a tool → New tool → Model Context Protocol。
  2. 填写 Server name(例如 AnythingMCP)、说明连接器用途的 Server description,以及 Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。Copilot Studio 根据描述决定何时调用该服务器。
  3. 身份验证选择 API key,把 Type 设为 Header,请求头名称填 X-API-Key,然后选择 Create。
  4. 在 Add tool 中选择 Create a new connection,粘贴 AnythingMCP 的 MCP API 密钥(MCP Servers → 你的服务器 → API keys),然后选择 Add to agent。
  5. 在智能体的 Test 窗格中试一试:提出需要用到 Contentful 的工具的请求。
  6. 选择 Publish,然后进入 Channels → Microsoft 365 and Microsoft Teams,保持勾选 Make agent available in Microsoft Copilot,再选择 Add channel。See agent in Teams 会为你安装该智能体;在 Microsoft 365 Copilot 中输入 @ 并选择该智能体。

希望每个用户各自登录?请选择 OAuth 2.0 → Dynamic discovery 代替 API 密钥:每个用户会在智能体首次调用时登录 AnythingMCP。

自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Copilot Studio 从 Microsoft 的云端连接,因此 localhost 无法使用。

可用工具

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

这适用于哪个 Copilot? 适用于工作中的 Microsoft 365 Copilot,通过 Copilot Studio 的智能体实现。面向个人账户的 Microsoft Copilot 应用无法添加自己的 MCP 服务器。

我需要什么? 一个可以使用 Copilot Studio 的工作账户(许可证或试用版),用于构建智能体。在 Microsoft 365 Copilot 或 Teams 中使用它的人需要拥有该智能体的访问权限:把它共享给他们,或请管理员为整个组织发布。如果你的组织对 Power Platform 连接器设置了数据策略,这些策略同样适用于 MCP 服务器。

智能体不调用工具。 检查请求头名称是否正好是 X-API-Key,密钥是否属于与 URL 相同的 MCP 服务器,并把 Server description 写得具体:Copilot Studio 根据它决定何时调用服务器。每次修改后重新发布智能体;在已打开的对话中输入 "start over" 即可使用新版本。

下一步

这份指南对你有帮助吗?

2 分钟将 Contentful 连接到 Microsoft Copilot

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Contentful,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。

相关指南

连接器

Contentful MCP 连接 ChatGPT

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

连接器

Contentful MCP 连接 Claude

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

连接器

Contentful MCP 连接 Cursor

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

连接器

Contentful MCP 连接 Gemini CLI

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

连接器

Contentful MCP 连接 Meta Muse

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

连接器

Contentful MCP 服务器:内容管理与发布

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