Webflow MCP 服务器基于 Node.js 实现,遵循 Webflow 模型上下文协议 (MCP)。它借助 Webflow JavaScript SDK,让 AI 代理能够和 Webflow API 进行交互。若想了解更多信息,可访问 Webflow 的 开发者文档。
git clone git@github.com:webflow/mcp-server.git
cd mcp-server
npm install
创建一个 .env 文件,添加以下内容并将 替换为您的实际令牌:
# .env
WEBFLOW_TOKEN=
npm start
本服务器支持 AI 代理与 Webflow API 交互,提供了丰富的站点管理和 CMS 管理命令,方便对 Webflow 站点进行操作。
以下是一些常见的站点管理和 CMS 管理命令示例:
sites - list; # 列出所有站点
sites - get; # 获取站点详细信息
sites - publish; # 发布站点更改
pages - list; # 列出所有页面
pages - get - metadata; # 获取页面元数据
pages - update - page - settings; # 更新页面设置
pages - get - content; # 获取页面内容
pages - update - static - content; # 更新静态内容
collections - list; # 列出所有集合
collections - get; # 获取集合详细信息
collections - create; # 创建新集合
collection - fields - create - static; # 创建静态字段
collection - fields - create - option; # 创建选项字段
collection - fields - create - reference; # 创建引用字段
collection - fields - update; # 更新自定义字段
collections - items - create - item - live; # 创建实时项
collections - items - update - items - live; # 更新实时项
collections - items - list - items; # 列出集合项
collections - items - create - item; # 创建新项(阶段)
collections - items - update - items; # 更新项(阶段)
collections - items - publish - items; # 发布项
在开发模式下运行服务器,步骤与快速开始一致:
git clone git@github.com:webflow/mcp-server.git
cd mcp-server
npm install
# .env
WEBFLOW_TOKEN=
npm start
问题:无法获取 Webflow API 访问令牌
解决方案:确保您已登录到 Webflow 并在 开发者文档 中创建了项目,然后按照指南生成访问令牌。
问题:服务器启动失败
解决方案:检查 .env 文件是否存在于项目根目录,并确保 WEBFLOW_TOKEN 值正确无误。另外,确认所有依赖项均已安装。