Wagtail MCP
🚧 this is the first vibe-coded draft of an MCP server prototype for Wagtail. Proceed with caution! Until this is ready, you might prefer to use wagtail-cli.
A Model Context Protocol (MCP) server for Wagtail, exposing the Wagtail v3 API as model-callable tools. Point a Claude/OpenCode/Hermes-style agent at a Wagtail site and let it read content, create pages, upload images, publish and revert — through the same authenticated operations the v3 API provides.
What it gives you
- 60 curated tools covering the full shipped v3 operation surface: pages
(incl. revisions, move/copy/revert, aliases, translations), images,
documents, snippets, redirects, sites and locales — plus
api_call/api_schema, an OpenAPI-backed escape hatch for anything else. - In-process dispatch — tools call the mounted v3 API inside the process via Django's test client, so auth, permissions, validation and action logic are the real thing. No network hop, no half-reimplemented client.
- Bearer-token auth with Wagtail
APIToken; the v3 API stays the single authority for authorization. - Stateless Streamable HTTP — a Django view that works under WSGI and ASGI, with no extra processes.
Quickstart
wagtail-mcp is a Django app: add wagtail.api.v3 and wagtail_mcp, mount
/api/v3/ and /mcp/, create an API token, point a client at /mcp/. See the
full getting started.
Point a remote MCP client at the endpoint:
{
"mcp": {
"wagtail": {
"type": "remote",
"url": "http://localhost:8000/mcp/",
"headers": {
"Authorization": "Bearer <your-api-token>",
"Content-Type": "application/json"
}
}
}
}
Try the demo
The repo ships demo/, a Wagtail site that mounts both the API and the MCP
endpoint and seeds a demo token:
just demo
Then use demo/'s token (see demo/README.md) in your client config. The
editorial scenario test is a complete
worked example an agent can follow.
Documentation
- Getting started
- Tool reference — all 60 tools, grouped by resource.
- Configuration — settings, deployment, token security.
- Escape hatch —
api_call/api_schema. - Limitations
- API feedback
Supported versions
This package supports Wagtail 8.0 and up (the v3 API preview), Django 5.2/6.0, and the compatible Python versions.
Development
Install dependencies, run the tests, lint, and run the demo (asgiref.sync
handles the transport, so just test and just lint are the normal gates):
just install
just test
just lint
just demo
See CONTRIBUTING.md for the full contribution workflow, including the agent-behavior eval suite.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail_mcp-0.1.0.tar.gz.
File metadata
- Download URL: wagtail_mcp-0.1.0.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
397ab3216184f215f05a40b7c02c118837a5cbf9fb360b8c1762bfcda053a57b
|
|
| MD5 |
36812f4f439d76c8f5cb40e4e03c0555
|
|
| BLAKE2b-256 |
699004e19cebb1d0d5a1af9842d0f9539dc51da3added88d719883e5d0c60213
|
File details
Details for the file wagtail_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wagtail_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab2bb59e3ae2bad79a6a610b6ca03bdf7c5c087afab4faba13ede5ca053d95d
|
|
| MD5 |
735b288cdda6d22f1ee17fad41ddf8b0
|
|
| BLAKE2b-256 |
9dec10635cf60b8255dd9bf8603169f445b75972a19a656ab04377ef338e6fa2
|