Connector guide7-minute read14 MCP tools7 languages

How to Connect Prismic to Gemini via MCP

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Prismic

Prismic

Prismic headless page builder: query published and scheduled documents with Prismic filters, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

tools

14

Region

INTL

Category

CMS

Authentication

API credentials

Required env vars

PRISMIC_REPOSITORY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Prismic 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.

Start free trial

Summary

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

Try asking

Example prompts for Prismic

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Prismic · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Prismic, install it with no key, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Prismic + Gemini

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

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:

PRISMIC_REPOSITORY (optional: PRISMIC_ACCESS_TOKEN, PRISMIC_WRITE_TOKEN)

Step 1 — Set up the connector

Public repository, no key: setup takes about 3 minutes. The connector reads a Prismic repository through the Content API (https://<repository>.cdn.prismic.io/api/v2). When that API is public, the repository name is all it needs. Content models, media and writes go through Prismic's write APIs (the Types API, the Asset API and the Migration API) and need a write token.

  1. PRISMIC_REPOSITORY: the repository name, the part before .prismic.io in your dashboard URL, for example your-repo-name.
  2. PRISMIC_ACCESS_TOKEN (optional): only when the Content API is private. In the repository open Settings > API & Security and generate an access token, or run npx prismic token create. Leave it empty for a public API.
  3. PRISMIC_WRITE_TOKEN (optional): needed for every tool marked "Needs the write token" and for all writes. Open Settings > API & Security > Write APIs and generate a token, or run npx prismic token create --write. It is sent as Authorization: Bearer <token> together with the repository header. It carries wide rights, so keep it to trusted workspaces.
  4. Install the connector and run prismic_get_repository to check the repository name.

Prismic's own MCP server: Prismic also runs an MCP server (https://mcp.prismic.io/mcp, OAuth sign-in) for editing and publishing from an assistant. This connector is the token-based alternative.

Reading content in two steps:

  1. prismic_get_repository returns refs. The AI takes the ref of the entry with isMasterRef: true for published content, or the ref of a release to preview scheduled content. Every content query needs it, and it changes on each publish. The same answer lists the custom types, tags, languages and bookmarks.
  2. Then prismic_search_documents with filters in q, prismic_get_document by id, prismic_get_document_by_uid by type and UID (for example type page and uid about-us), or prismic_list_documents_by_type. lang, fetch_links and graph_query shape the answer.

Filters (q): [[at(document.type,"blog_post")]]; several filters in a row combine: [[at(document.type,"blog_post")][any(document.tags,["news","events"])]]. Others: fulltext(document,"text"), at(my.blog_post.author,"<id>"), date.after(document.first_publication_date,"2026-01-01"), not, in(document.id,[...]), number.lt(my.product.price,100). Sorting uses orderings such as [my.blog_post.date desc].

Models and media (write token): prismic_list_custom_types and prismic_get_custom_type give the field structure of each page type, with tabs, slice zones, repeatable or single, and status; prismic_list_shared_slices and prismic_get_shared_slice the shared slices with their variations. prismic_list_assets browses the media library by type or keyword, prismic_upload_asset uploads a file from a public URL and returns the asset id, and prismic_update_asset edits alt text, credits and notes.

Writing documents (write token): prismic_create_document and prismic_update_document save drafts into a migration release. They are not live until an editor publishes that release in the dashboard (Migration Releases tab); these APIs have no publish call. The AI builds data from the custom type model: rich text is a list of blocks ({"type": "paragraph", "text": "...", "spans": []}), images and media take an asset id, links take {"link_type": "Document", "id": "..."} or {"link_type": "Web", "url": "..."}. An update replaces all content and tags, so the AI reads the document first and sends everything back. Type and locale cannot change.

Nothing is switched off at install: there are no delete or publish tools. Changing content models and deleting are left to the Prismic dashboard or CLI.

Data formats: content lists carry results, page, total_pages, total_results_size and next_page. Rich text fields come as block lists; dates are YYYY-MM-DD, timestamps ISO 8601. Document ids look like ZMI65RQAADkECUFM.

Paging: page (from 1) and page_size (20 by default, at most 100), or orderings together with after and the id of the last document. Assets page with cursor.

Limits: the Content API allows 200 uncached requests per second and URLs up to 2,048 characters, so the AI keeps graph_query short. The Migration and Asset APIs take one request per second per repository.

Common errors: 404 on prismic_get_repository means a wrong repository name. 401 or 403 means a private API without a valid access token, or a write call without a valid write token. 400 means a malformed filter or an invalid ref, 422 data that does not fit the model.

The connector does not publish documents, does not delete documents or assets, and does not change custom types or slices.

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 shows YOUR_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" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell): anythingmcp should show as connected.
  4. Start prompting: Gemini CLI can now call the Prismic tools.

Available tools

ToolWhat it does
prismic_get_repositoryThe repository's entry point for the Content API: refs (the master ref needed by every content query, plus release refs), custom types…
prismic_search_documentsQuery published content (or a release) with Prismic filters: by type, tag, id, uid, field values, full text or dates, sorted and paged
prismic_get_documentOne document by its id with all its fields (data), slices, tags, alternate languages and publication dates
prismic_get_document_by_uidOne document by its custom type and UID (the slug-like unique id), e.g. type page and uid about-us
prismic_list_documents_by_typeAll documents of one custom type, paged and optionally sorted, e.g. every blog_post newest first
prismic_list_custom_typesThe custom types (page types) of the repository with their JSON model: tabs, fields, slice zones, repeatable or single, and status (active…
prismic_get_custom_typeOne custom type model by its API id, with every field and its configuration
prismic_list_shared_slicesThe shared slices of the repository with their variations and fields (primary and items)
prismic_get_shared_sliceOne shared slice model by id, with its variations and fields
prismic_list_assetsAssets of the media library: id, url, filename, kind, size, width and height, alt, credits, notes and tags
prismic_upload_assetUpload a file from a public URL to the media library, with optional alt text, credits and notes
prismic_update_assetChange the alt text, credits or notes of a media library asset
prismic_create_documentCreate a document as a draft through the Migration API
prismic_update_documentReplace the content of an existing document through the Migration API, saved as a draft in a migration release. data replaces the whole…

Example prompts

  • "List the ten newest blog posts with their title and first publication date."
  • "Show me the about-us page and summarise its slices."
  • "Which documents are tagged news and were first published after 1 January 2026?"
  • "What fields does the blog_post custom type have?"
  • "Create a draft blog post titled "Our 2026 roadmap" with a short intro paragraph, for an editor to review."

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?

Your Prismic agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Prismic to ChatGPT via MCP

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

Connectors

How to Connect Prismic to Claude via MCP

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

Connectors

How to Connect Prismic to Cursor via MCP

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

Connectors

How to Connect Prismic to Meta Muse via MCP

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

Connectors

Prismic to MCP: Documents, Custom Types, Slices, Media Library and Draft Writes in any AI Agent

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.

Connectors

How to Connect Prismic to Microsoft Copilot via MCP

Prismic headless page builder, with no key for a public repository: query published and scheduled documents with Prismic filters, read documents by id, UID or type, read custom type and slice models, browse and upload media, and create or update draft documents through the Migration API.