Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the Contentful in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
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.
Try asking
Example prompts for Contentful
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Contentful, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Contentful + Gemini
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.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
CONTENTFUL_SPACE_ID, CONTENTFUL_ENVIRONMENT, CONTENTFUL_DELIVERY_URL, CONTENTFUL_DELIVERY_TOKEN
Step 1 — Get credentials
- In Contentful (
https://app.contentful.com), open your space, then Settings → API keys → Add API key. Name it (for example "AnythingMCP"), tick the environments it may read (at leastmaster) 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. Other environments are listed under Settings → Environments. - Set
CONTENTFUL_DELIVERY_URLtohttps://cdn.contentful.com, orhttps://cdn.eu.contentful.comfor a space in the EU data region, without a trailing slash. To let the AI read drafts as well, usehttps://preview.contentful.com(orhttps://preview.eu.contentful.com) together with the Content Preview API access token of the same key. - For writes, create a personal access token: avatar menu → Account settings → CMA tokens → Create personal access token. Pick an expiry and copy the token right away, as Contentful shows it only once. Paste it into
CONTENTFUL_MANAGEMENT_TOKEN, without the word Bearer, and setCONTENTFUL_MANAGEMENT_URLtohttps://api.contentful.com(orhttps://api.eu.contentful.com). The token acts as you, in every space you can edit. - If your organization has to approve personal access tokens, an organization admin opens Organization settings, finds the token in the access settings for personal access tokens and grants it access. Until then the write tools answer 401
OrganizationAccessGrantRequired; reads with the delivery token are not affected. - Install the connector and start with
contentful_get_space: it returns the space name and its locales, a quick check that the space ID and the delivery token belong together.
Two tokens, on purpose: the delivery token reads published content and nothing else (drafts too, with the preview token), so a connector set up with only the four required values can look everything up but changes nothing. Writes, unpublished drafts, spaces and environments go through the Content Management API with the personal access token. Leave CONTENTFUL_MANAGEMENT_URL and CONTENTFUL_MANAGEMENT_TOKEN empty and the management tools simply report that they are missing.
Publishing changes your live site: contentful_publish_entry and contentful_unpublish_entry change what visitors see on your website or app, so the AI names the entry and the effect and waits for your yes. contentful_delete_entry is switched off at install, as a deleted entry cannot be restored.
How edits work: contentful_list_content_types gives the content type and field ids, contentful_list_locales the locale codes. Field values are keyed by field id and then by locale, for example {"title": {"en-US": "Hello"}}. Before each change the AI reads the entry with contentful_get_entry_for_editing to get its current sys.version; if someone else saved in between, Contentful answers 409 VersionMismatch and the AI reads again. contentful_update_entry replaces all fields, so anything left out is deleted; for one or two fields the AI uses contentful_patch_entry. A change goes live only when the new version is published.
Searching: contentful_list_entries takes a content_type, a full-text query and further filters such as fields.slug=hello or fields.date[gte]=2026-01-01. Filtering or sorting by a field needs content_type. Linked entries and assets come back in includes, and asset URLs start with //, so the AI adds https:.
Paging: lists return total, skip and limit (up to 1,000); the next page starts at skip + limit.
Common errors: 401 AccessTokenInvalid means a wrong or expired token, or a delivery token used on the preview host (or the other way round). 404 NotFound is a wrong id, or a space or environment the token does not cover: Contentful answers 404 here, not 403. 400 "A Content Type ID is required" means a field filter without content_type. 422 ValidationFailed names the field that is empty or breaks a validation. 429 RateLimitExceeded: the management API allows about 7 requests a second, so wait and retry.
The connector does not upload assets, create or edit content types, or manage environments, webhooks, roles and apps, and it does not use the GraphQL API.
Step 2 — Install the 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
Step 3 — Add the connector in Gemini
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart
gemini. - Run
/mcpinside Gemini CLI (orgemini mcp listin your shell):anythingmcpshould show as connected. - Start prompting: Gemini CLI can now call the
Contentfultools.
Available tools
| Tool | What it does |
|---|---|
contentful_get_space | Read the space the connector is set up for (Content Delivery API): its name and locales with the default locale |
contentful_list_content_types | List 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_type | Read one content type by id (Content Delivery API): its fields with id, name, type (Symbol, Text, RichText, Integer, Number, Date, Boolean… |
contentful_list_entries | Search published entries (Content Delivery API) |
contentful_get_entry | Read one published entry by id (Content Delivery API): sys (id, contentType, createdAt, updatedAt, revision), metadata.tags and fields |
contentful_list_assets | Search published assets (images, documents, videos) via the Content Delivery API |
contentful_get_asset | Read one published asset by id (Content Delivery API): title, description and file with url (prefix https:), fileName, contentType, size… |
contentful_list_locales | List the locales of the environment (Content Delivery API): code (e.g. en-US, de-DE), name, default flag and fallbackCode |
contentful_list_tags | List the public content tags of the environment (Content Delivery API) with sys.id and name |
contentful_list_spaces | List the spaces the management token can reach (Content Management API), with sys.id and name |
contentful_list_environments | List the environments of the space (Content Management API), e.g. master, staging, with sys.id, name, status and aliases |
contentful_list_all_entries | Search all entries including drafts and changed-but-unpublished versions (Content Management API) |
contentful_get_entry_for_editing | Read the latest version of an entry, draft changes included (Content Management API): fields with every locale, metadata.tags and… |
contentful_create_entry | Create 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_entry | Replace the fields of an entry (Content Management API) |
contentful_patch_entry | Change single fields of an entry with JSON Patch operations (Content Management API), leaving the rest untouched |
contentful_publish_entry | Publish an entry, making its current version visible on the website or app through the delivery API (Content Management API). version must… |
contentful_unpublish_entry | Unpublish an entry: it disappears from the delivery API, so from the website or app, and stays as a draft (Content Management API) |
contentful_delete_entry | Delete an entry for good (Content Management API) |
contentful_create_tag | Create a content tag in the environment (Content Management API) |
Example prompts
- "Find the blog posts we published in the last 30 days and list each one's title, slug and author."
- "Which entries have saved changes that are not published yet?"
- "List the images we uploaded this month, with their file size and dimensions."
- "Change the headline of the spring sale landing page to 'Spring sale: 20% off everything' and publish it once I confirm."
FAQ
Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.
Next steps
Was this guide helpful?