Wagtail MCP
OfficialWagtail MCP
🚧 这是 Wagtail 的 MCP 服务器原型的首个以 vibe coding 方式编写的草稿。请谨慎使用!在它准备好之前,你可能更愿意使用 wagtail-cli。有关背景,请参阅 有 AI 的 CMS,而非 AI CMS:Wagtail 8.0 的新 API。
一个用于 Wagtail 的 Model Context Protocol (MCP) 服务器,将 Wagtail v3 API 暴露为模型可调用的工具。将 Claude/OpenCode/Hermes 风格的智能体指向 Wagtail 站点,让它通过 v3 API 提供的同一套经过身份验证的操作来读取内容、创建页面、上传图片、发布和还原。
它能为你提供什么
60 个精选工具,覆盖完整的已发布 v3 操作面:页面(包括修订、移动/复制/还原、别名、翻译)、图片、文档、片段、重定向、站点和区域设置 — 外加
api_call/api_schema,一个由 OpenAPI 支持的逃生舱,用于处理其他任何需求。进程内调度 — 工具通过 Django 的测试客户端在进程内调用已挂载的 v3 API,因此身份验证、权限、验证和操作逻辑都是货真价实的。没有网络跳转,也没有半重新实现的客户端。
Bearer 令牌身份验证,使用 Wagtail
APIToken;v3 API 仍然是授权的唯一权威。无状态 Streamable HTTP — 一个在 WSGI 和 ASGI 下均可工作的 Django 视图,无需额外进程。
Related MCP server: WordPress MCP Server
快速开始
wagtail-mcp 是一个 Django 应用:添加 wagtail.api.v3 和 wagtail_mcp,挂载 /api/v3/ 和 /mcp/,创建一个 API 令牌,然后将客户端指向 /mcp/。请参阅完整的入门指南。
将远程 MCP 客户端指向该端点:
{
"mcp": {
"wagtail": {
"type": "remote",
"url": "http://localhost:8000/mcp/",
"headers": {
"Authorization": "Bearer <your-api-token>",
"Content-Type": "application/json"
}
}
}
}试用演示
该仓库附带 demo/,这是一个 Wagtail 站点,同时挂载了 API 和 MCP 端点,并预置了一个演示令牌:
just demo然后在你的客户端配置中使用 demo/ 的令牌(参见 demo/README.md)。编辑场景测试 是一个智能体可以遵循的完整示例。
文档
支持的版本
该包支持 Wagtail 8.0 及以上版本(v3 API 预览版)、Django 5.2/6.0,以及兼容的 Python 版本。
开发
安装依赖、运行测试、进行 lint,并运行演示(asgiref.sync 负责传输,因此 just test 和 just lint 是常规门禁):
just install
just test
just lint
just demo有关完整的贡献流程,包括智能体行为评估套件,请参阅 CONTRIBUTING.md。
This server cannot be deployed
Maintenance
Related MCP Connectors
Draft, edit, organise, schedule and publish a Writavo Site's content from any AI assistant.
Manage your WordPress site from your AI assistant: posts, pages, media, comments and WooCommerce.
Find, write, publish and check pages and API references in your DeveloperHub docs from an AI client
Manage WordPress blogs and WooCommerce shops from Claude, ChatGPT, Cursor and other MCP apps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage WordPress sites via ~74 capabilities including content, media, plugins, themes, and more.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage WordPress content (create, retrieve, update posts) via the WordPress REST API with secure authentication.5 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage WordPress posts, pages, media, taxonomies, comments, users, settings, and custom fields through the WordPress REST API. Supports secure authentication, OAuth deployment, search, and safe write controls.MIT
- AlicenseBqualityBmaintenanceEnables AI agents to read and edit a Django site's content over its API, creating tools at startup from whatever resources the site registers so no code changes are needed. Works with any site running django-agent-content, with HTTPS-only API key authentication and no delete operations.1246 PyPI3MIT