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

如何通过 MCP 将 Prismic 连接到 Microsoft Copilot

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

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

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.

个工具

14

区域

INTL

类别

CMS

身份验证

API credentials

所需环境变量

PRISMIC_REPOSITORY
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。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 中,在该连接器上运行。

Prismic · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Prismic、直接安装 (无需密钥)、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Prismic + Microsoft Copilot

无头页面构建器 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。

  1. PRISMIC_REPOSITORY:仓库名称,即控制台 URL 中 .prismic.io 之前的部分,例如 your-repo-name。
  2. PRISMIC_ACCESS_TOKEN(可选):仅在 Content API 为私有时需要。在仓库中打开 Settings > API & Security 生成访问令牌,或运行 npx prismic token create。公开 API 请留空。
  3. PRISMIC_WRITE_TOKEN(可选):所有标有 "Needs the write token" 的工具以及所有写入都需要它。打开 Settings > API & Security > Write APIs 生成令牌,或运行 npx prismic token create --write。它以 Authorization: Bearer <token> 的形式与 repository 请求头一起发送。它的权限很广,只交给可信的工作区使用。
  4. 安装连接器并运行 prismic_get_repository,确认仓库名称正确。

Prismic 自己的 MCP 服务器:Prismic 也提供一个 MCP 服务器(https://mcp.prismic.io/mcp,通过 OAuth 登录),用于在助手中编辑和发布。这个连接器是基于令牌的替代方案。

分两步读取内容:

  1. prismic_get_repository 返回 refs。对于已发布内容,AI 使用 isMasterRef: true 那一项的 ref;要预览已排期的内容,则使用某个发布版本的 ref。每次内容查询都需要它,而且每次发布后都会变化。同一个响应还会列出自定义类型、标签、语言和书签。
  2. 然后使用在 q 中带筛选器的 prismic_search_documents、按 ID 读取的 prismic_get_document、按类型和 UID 读取的 prismic_get_document_by_uid(例如类型 page、uid about-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 — 在 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 窗格中试一试:提出需要用到 Prismic 的工具的请求。
  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
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…

示例提示

  • “列出最新的十篇博客文章,带标题和首次发布日期。”
  • “给我看 about-us 页面,并概括它的切片。”
  • “哪些文档带有 news 标签,并且在 2026 年 1 月 1 日之后首次发布?”
  • “自定义类型 blog_post 有哪些字段?”
  • “创建一篇标题为“我们的 2026 路线图”的博客草稿,带一段简短的引言,供编辑审核。”

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" 即可使用新版本。

下一步

这份指南对你有帮助吗?

你的 Prismic 智能体只差一次点击。

安装连接器,粘贴密钥,向 Microsoft Copilot 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Prismic 连接到 ChatGPT

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。

连接器

如何通过 MCP 将 Prismic 连接到 Claude

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。

连接器

如何通过 MCP 将 Prismic 连接到 Cursor

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。

连接器

如何通过 MCP 将 Prismic 连接到 Gemini

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。

连接器

如何通过 MCP 将 Prismic 连接到 Meta Muse

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。

连接器

Prismic 接入 MCP:在任意 AI 智能体中使用文档、自定义类型、切片、媒体库和草稿写入

无头页面构建器 Prismic,公开仓库无需密钥:用 Prismic 筛选器查询已发布和已排期的文档,按 ID、UID 或类型读取文档,读取自定义类型和切片模型,浏览并上传媒体,并通过 Migration API 创建或更新文档草稿。