Webflow MCP

Webflow MCP

site icon
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 内容管理的自动化流程。

核心功能

  1. 站点管理:列出所有站点、获取站点详情、发布站点变更。
  2. 页面管理:列出所有页面、获取页面元数据、更新页面设置、获取和更新页面内容。
  3. CMS 管理:管理集合(Collections)、创建和更新字段、管理集合项(Items)的创建、更新和发布。

适用场景

  1. 自动化内容管理:通过 AI 代理自动更新 Webflow 站点内容。
  2. 批量操作:批量发布站点变更或更新 CMS 内容。
  3. 开发与测试:在开发环境中快速测试 Webflow API 的功能。

工具列表

  1. 站点工具
  2. sites - list:列出所有站点。
  3. sites - get:获取站点详情。
  4. sites - publish:发布站点变更。
  5. 页面工具
  6. pages - list:列出所有页面。
  7. pages - get - metadata:获取页面元数据。
  8. pages - update - page - settings:更新页面设置。
  9. pages - get - content:获取页面内容。
  10. pages - update - static - content:更新页面内容。
  11. CMS 工具
  12. collections - list:列出所有集合。
  13. collections - get:获取集合详情。
  14. collections - create:创建集合。
  15. collection - fields - create - static:创建静态字段。
  16. collection - fields - create - option:创建选项字段。
  17. collection - fields - create - reference:创建引用字段。
  18. collection - fields - update:更新自定义字段。
  19. collections - items - create - item - live:创建实时集合项。
  20. collections - items - update - items - live:更新实时集合项。
  21. collections - items - list - items:列出集合项。
  22. collections - items - create - item:创建集合项(暂存)。
  23. collections - items - update - items:更新集合项(暂存)。
  24. collections - items - publish - items:发布集合项。

常见问题解答

  1. 无法启动服务器
  2. 确保 Webflow API 令牌有效。
  3. 确保已安装 Node.js 和 NPM。
  4. 尝试清除 NPM 缓存:npm cache clean --force
  5. 检查 NPM 全局包权限。
  6. 令牌无效:重新生成并替换令牌。
  7. 依赖问题:确保已安装所有依赖项并重启客户端。

使用教程

使用依赖

  1. 安装 Node.js 和 NPM: shell # 确认安装 node -v npm -v
  2. 注册 Webflow 账户并获取 API 令牌。

安装教程

  1. 获取 Webflow API 令牌:
  2. 登录 Webflow API Playground
  3. 生成并复制令牌。
  4. 配置 MCP 客户端: json { "mcpServers": { "webflow": { "command": "npx", "args": ["-y", "[email protected]"], "env": { "WEBFLOW_TOKEN": "<YOUR_WEBFLOW_TOKEN>" } } } }
  5. 替换 YOUR_WEBFLOW_TOKEN 并重启客户端。

调试方式

  1. 确认 Node.js 和 NPM 版本: shell node -v npm -v
  2. 清除 NPM 缓存: shell npm cache clean --force
  3. 检查 NPM 全局包权限。

开发模式

  1. 克隆并安装: shell git clone [email protected]:webflow/mcp-server.git cd mcp-server npm install
  2. 添加令牌到 .env 文件: shell # .env WEBFLOW_TOKEN=<YOUR_WEBFLOW_TOKEN>
  3. 启动开发服务器: shell npm start

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。