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.
7 天免费 · 无需信用卡 · EU 托管
问 Contentful 任何事
通过 AnythingMCP 对 Contentful 试一个真实提示 — Claude 调用工具并返回答案。在你的消息上按 Enter 即可在 Cloud 安装。
在 Cloud 上安装 ContentfulClaude 是 AI,可能会出错。请核对回答。
2 分钟设置
- 1在 cloud.anythingmcp.com 开始免费试用。
- 2在连接器商店点击 Contentful。提示时粘贴凭据。
- 3生成 MCP API 密钥,将 AI 客户端指向生成的 MCP URL。
Contentful 指南
面向主流 AI 客户端的逐步设置。
配置 Contentful
直接来自连接器定义:在哪里获取凭据、需要哪些权限,以及该适配器调用的是哪个 API。 由连接器作者以英文提供。
Contentful
This connector works with one Contentful space and environment. It reads published content through the Content Delivery API (https://cdn.contentful.com, read-only, delivery token) and writes through the Content Management API (https://api.contentful.com, personal access token): content types, entries, assets, locales and tags, plus creating, changing, publishing and unpublishing entries.
Two tokens, by design. Reads go to the delivery API with a delivery token that can only read published content. Writes, drafts, spaces and environments need the management API and a personal access token that acts with the full rights of its user. The management variables are optional: without them every read works, and the management tools answer that CONTENTFUL_MANAGEMENT_URL or CONTENTFUL_MANAGEMENT_TOKEN is missing.
Setup (about 5 minutes)
- In https://app.contentful.com open the space, then Settings → API keys → Add API key. Tick the environments it may read (master at least) and save.
- Copy the Space ID into
CONTENTFUL_SPACE_IDand the Content Delivery API access token intoCONTENTFUL_DELIVERY_TOKEN. - Set
CONTENTFUL_ENVIRONMENTto the environment id, usuallymaster. - Set
CONTENTFUL_DELIVERY_URLtohttps://cdn.contentful.com(orhttps://cdn.eu.contentful.comfor a space in the EU data region). To read drafts too, usehttps://preview.contentful.com(orhttps://preview.eu.contentful.com) with the Content Preview API access token of the same key instead. - For writes: avatar menu → Account settings → CMA tokens → Create personal access token, pick an expiry, copy the token at once (shown only once) into
CONTENTFUL_MANAGEMENT_TOKEN, and setCONTENTFUL_MANAGEMENT_URLtohttps://api.contentful.com(orhttps://api.eu.contentful.com). The token acts as you, in every space you can edit. - Install and run
contentful_get_space.
Publishing changes the live website or app: confirm first. contentful_publish_entry and contentful_unpublish_entry change what visitors see. State the entry and the effect and wait for the user's yes. contentful_delete_entry is installed switched off.
Read before you write
contentful_list_content_typesgives the content type ids and field ids;contentful_list_localesthe locale codes.- Field values are keyed by field id and then by locale:
{"title": {"en-US": "Hello"}}. Links are{"sys": {"type": "Link", "linkType": "Entry", "id": "..."}}(or"linkType": "Asset"). - Every write after the first needs the entry's current
sys.version: read it withcontentful_get_entry_for_editingright before writing. A stale version fails with 409VersionMismatch; read again and retry. contentful_update_entryreplaces all fields (anything left out is deleted). For one or two fields usecontentful_patch_entry.- A change is live only after
contentful_publish_entrywith the new version.
Searching: contentful_list_entries takes content_type, full-text query, and further search parameters in filters as a query string (fields.slug=hello or fields.date[gte]=2026-01-01&sys.id[nin]=a,b). Filtering or sorting by a field needs content_type. Linked entries and assets come back in includes (depth via include). Asset URLs start with //: add https:.
Paging: lists return total, skip and limit (up to 1000). Ask for the next page with skip = previous skip + limit.
Common errors
- 401
AccessTokenInvalid: wrong or expired token, or a delivery token used on the preview host (or the other way round). - 404
NotFound: wrong id, or the space or environment is not covered by the token (Contentful answers 404, not 403). - 400
BadRequest"A Content Type ID is required": addcontent_typewhen filtering by fields. - 409
VersionMismatch: read the entry again and pass its currentsys.version. - 422
ValidationFailed: a required field is empty or a value breaks a validation; the details name the field. - 429
RateLimitExceeded: the management API allows about 7 requests a second; wait and retry.
Out of scope here: uploading assets, creating or editing content types, environments, webhooks, roles, apps and GraphQL.
401 OrganizationAccessGrantRequired on the management tools: the organization only accepts personal access tokens it has granted. An organization admin opens Organization settings, finds the token under the access settings for personal access tokens and grants it access, then the write tools work. Read tools on the delivery token are not affected.