
Webflow MCP

2025.04.18
22
JavaScriptWebflow API 交互内容管理自动化开发效率
Webflow MCP 是一个基于 Node.js 的服务器,实现了 Model Context Protocol (MCP) 协议,用于通过 Webflow JavaScript SDK 与 Webflow API 进行交互。该服务旨在使 AI 代理能够与 Webflow API 进行交互,提供了一系列工具来管理站点、页面和 CMS 内容。
View on GitHub
Overview
基本能力
产品定位
Webflow MCP 是一个中间件服务,旨在为 AI 代理提供与 Webflow API 交互的能力,简化 Webflow 内容管理的自动化流程。
核心功能
- 站点管理:列出所有站点、获取站点详情、发布站点变更。
- 页面管理:列出所有页面、获取页面元数据、更新页面设置、获取和更新页面内容。
- CMS 管理:管理集合(Collections)、创建和更新字段、管理集合项(Items)的创建、更新和发布。
适用场景
- 自动化内容管理:通过 AI 代理自动更新 Webflow 站点内容。
- 批量操作:批量发布站点变更或更新 CMS 内容。
- 开发与测试:在开发环境中快速测试 Webflow API 的功能。
工具列表
- 站点工具:
sites - list
:列出所有站点。sites - get
:获取站点详情。sites - publish
:发布站点变更。- 页面工具:
pages - list
:列出所有页面。pages - get - metadata
:获取页面元数据。pages - update - page - settings
:更新页面设置。pages - get - content
:获取页面内容。pages - update - static - content
:更新页面内容。- CMS 工具:
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
:发布集合项。
常见问题解答
- 无法启动服务器:
- 确保 Webflow API 令牌有效。
- 确保已安装 Node.js 和 NPM。
- 尝试清除 NPM 缓存:
npm cache clean --force
。 - 检查 NPM 全局包权限。
- 令牌无效:重新生成并替换令牌。
- 依赖问题:确保已安装所有依赖项并重启客户端。
使用教程
使用依赖
- 安装 Node.js 和 NPM:
shell # 确认安装 node -v npm -v
- 注册 Webflow 账户并获取 API 令牌。
安装教程
- 获取 Webflow API 令牌:
- 登录 Webflow API Playground。
- 生成并复制令牌。
- 配置 MCP 客户端:
json { "mcpServers": { "webflow": { "command": "npx", "args": ["-y", "[email protected]"], "env": { "WEBFLOW_TOKEN": "<YOUR_WEBFLOW_TOKEN>" } } } }
- 替换
YOUR_WEBFLOW_TOKEN
并重启客户端。
调试方式
- 确认 Node.js 和 NPM 版本:
shell node -v npm -v
- 清除 NPM 缓存:
shell npm cache clean --force
- 检查 NPM 全局包权限。
开发模式
- 克隆并安装:
shell git clone [email protected]:webflow/mcp-server.git cd mcp-server npm install
- 添加令牌到
.env
文件:shell # .env WEBFLOW_TOKEN=<YOUR_WEBFLOW_TOKEN>
- 启动开发服务器:
shell npm start