跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Prismic,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。
试试这样问
Prismic 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Prismic、直接安装 (无需密钥)、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Prismic + ChatGPT
无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
PRISMIC_REPOSITORY(可选:PRISMIC_ACCESS_TOKEN、PRISMIC_WRITE_TOKEN)
步骤 1 — 设置连接器
公开仓库,无需密钥:设置大约需要 3 分钟。连接器通过 Content API(https://<repository>.cdn.prismic.io/api/v2)读取 Prismic 仓库。如果该 API 是公开的,只需要仓库名称。内容模型、媒体和写入使用 Prismic 的写入 API(Types API、Asset API 和 Migration API),需要 write token。
PRISMIC_REPOSITORY:仓库名称,即控制台 URL 中.prismic.io之前的部分,例如your-repo-name。PRISMIC_ACCESS_TOKEN(可选):仅在 Content API 为私有时需要。在仓库中打开 Settings > API & Security 生成访问令牌,或运行npx prismic token create。公开 API 请留空。PRISMIC_WRITE_TOKEN(可选):所有标有 "Needs the write token" 的工具以及所有写入都需要它。打开 Settings > API & Security > Write APIs 生成令牌,或运行npx prismic token create --write。它以Authorization: Bearer <token>的形式与repository请求头一起发送。它的权限很广,只交给可信的工作区使用。- 安装连接器并运行
prismic_get_repository,确认仓库名称正确。
Prismic 自己的 MCP 服务器:Prismic 也提供一个 MCP 服务器(https://mcp.prismic.io/mcp,通过 OAuth 登录),用于在助手中编辑和发布。这个连接器是基于令牌的替代方案。
分两步读取内容:
prismic_get_repository返回refs。对于已发布内容,AI 使用isMasterRef: true那一项的ref;要预览已排期的内容,则使用某个发布版本的 ref。每次内容查询都需要它,而且每次发布后都会变化。同一个响应还会列出自定义类型、标签、语言和书签。- 然后使用在
q中带筛选器的prismic_search_documents、按 ID 读取的prismic_get_document、按类型和 UID 读取的prismic_get_document_by_uid(例如类型page、uidabout-us),或prismic_list_documents_by_type。lang、fetch_links和graph_query用来调整响应内容。
筛选器(q):[[at(document.type,"blog_post")]];多个筛选器连写即可组合:[[at(document.type,"blog_post")][any(document.tags,["news","events"])]]。其他还有 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)。排序使用 orderings,例如 [my.blog_post.date desc]。
模型和媒体(write token):prismic_list_custom_types 和 prismic_get_custom_type 返回每种页面类型的字段结构,包括标签页、切片区域、可重复或单例以及状态;prismic_list_shared_slices 和 prismic_get_shared_slice 返回共享切片及其变体。prismic_list_assets 按类型或关键词浏览媒体库,prismic_upload_asset 从公开 URL 上传文件并返回资源 ID,prismic_update_asset 编辑替代文本、署名和备注。
写入文档(write token):prismic_create_document 和 prismic_update_document 把草稿保存到 migration release 中。只有编辑在控制台(Migration Releases 标签页)发布该版本后,它们才会上线;这些 API 没有发布调用。AI 按自定义类型的模型构建 data:富文本是区块列表({"type": "paragraph", "text": "...", "spans": []}),图片和媒体使用资源 ID,链接使用 {"link_type": "Document", "id": "..."} 或 {"link_type": "Web", "url": "..."}。更新会替换全部内容和标签,因此 AI 会先读取文档,再把全部内容发回。类型和语言区域不能更改。
安装时没有关闭任何工具:没有删除或发布工具。修改内容模型和删除操作留给 Prismic 控制台或 CLI。
数据格式:内容列表包含 results、page、total_pages、total_results_size 和 next_page。富文本字段以区块列表返回;日期为 YYYY-MM-DD,时间戳为 ISO 8601。文档 ID 形如 ZMI65RQAADkECUFM。
分页:使用 page(从 1 开始)和 page_size(默认 20,最多 100),或者把 orderings 与 after 和最后一个文档的 ID 结合使用。资源使用 cursor 分页。
限制:Content API 每秒允许 200 个未缓存请求,URL 最长 2,048 个字符,因此 AI 会让 graph_query 保持简短。Migration API 和 Asset API 每个仓库每秒只接受一个请求。
常见错误:prismic_get_repository 返回 404 表示仓库名称错误。401 或 403 表示私有 API 缺少有效的访问令牌,或写入调用缺少有效的 write token。400 表示筛选器格式错误或 ref 无效,422 表示数据不符合模型。
该连接器不会发布文档,不会删除文档或资源,也不会修改自定义类型或切片。
步骤 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 在网页版的 Plugins 页面把 MCP 服务器添加为插件,仅付费套餐可用,不再需要开发者模式。在 Business 工作区中只有管理员和所有者可以添加;在 Enterprise 和 Edu 中,管理员可以授予 Create plugins with MCPs 权限。
- 前往 chatgpt.com/plugins,点击 Add,然后选择 Add custom MCP server。
- 填写名称,例如 Name:
Prismic。 - 在 Connection 下的 Server URL 中填入
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,Authentication 保持为 OAuth。 - 选择 I understand and want to continue,然后点击 Create as a plugin。ChatGPT 提示时,登录 AnythingMCP 并允许访问。
- 在个人插件中安装这个新插件,然后在对话中输入 @ 并选择它。
可用工具
| Tool | What it does |
|---|---|
prismic_get_repository | The repository's entry point for the Content API: refs (the master ref needed by every content query, plus release refs), custom types… |
prismic_search_documents | Query published content (or a release) with Prismic filters: by type, tag, id, uid, field values, full text or dates, sorted and paged |
prismic_get_document | One document by its id with all its fields (data), slices, tags, alternate languages and publication dates |
prismic_get_document_by_uid | One document by its custom type and UID (the slug-like unique id), e.g. type page and uid about-us |
prismic_list_documents_by_type | All documents of one custom type, paged and optionally sorted, e.g. every blog_post newest first |
prismic_list_custom_types | The custom types (page types) of the repository with their JSON model: tabs, fields, slice zones, repeatable or single, and status (active… |
prismic_get_custom_type | One custom type model by its API id, with every field and its configuration |
prismic_list_shared_slices | The shared slices of the repository with their variations and fields (primary and items) |
prismic_get_shared_slice | One shared slice model by id, with its variations and fields |
prismic_list_assets | Assets of the media library: id, url, filename, kind, size, width and height, alt, credits, notes and tags |
prismic_upload_asset | Upload a file from a public URL to the media library, with optional alt text, credits and notes |
prismic_update_asset | Change the alt text, credits or notes of a media library asset |
prismic_create_document | Create a document as a draft through the Migration API |
prismic_update_document | Replace the content of an existing document through the Migration API, saved as a draft in a migration release. data replaces the whole… |
示例提示
- “列出最新的十篇博客文章,带标题和首次发布日期。”
- “给我看 about-us 页面,并概括它的切片。”
- “哪些文档带有 news 标签,并且在 2026 年 1 月 1 日之后首次发布?”
- “自定义类型 blog_post 有哪些字段?”
- “创建一篇标题为“我们的 2026 路线图”的博客草稿,带一段简短的引言,供编辑审核。”
FAQ
ChatGPT 免费套餐能用自定义 MCP 服务器吗? OpenAI 只为付费套餐提供自定义 MCP 服务器的说明,Free 套餐不在其列。
下一步
这份指南对你有帮助吗?