Skip to main content

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. See CMS with AI, not AI CMS: Wagtail 8.0’s new API for context.

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

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.

Metadata

Release files for wagtail-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-mcp 0.2.0
File Size Uploaded Provenance
wagtail_mcp-0.2.0.tar.gz 26.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-mcp 0.2.0
File Interpreter ABI Platform
wagtail_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 65.1 kB

Release files / wagtail_mcp-0.2.0.tar.gz

Download URL wagtail_mcp-0.2.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
50ddb976eb224a255fc02a552fe24c4e40ed4aa08dff80c6c23262419609a1ee
BLAKE2b-256 checksum
How to use checksums
d75f46477756dfef2d48f053041c10c9683852c7a07a729f6c590b39bd7f94b5
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / wagtail_mcp-0.2.0-py3-none-any.whl

Download URL wagtail_mcp-0.2.0-py3-none-any.whl
Size 38.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29d95fb274fee1befd5189aab2f2460480a32cb9b77b47733d7ee163b3dbe4a1
BLAKE2b-256 checksum
How to use checksums
f05c42bcf9f9116ba3d296ca8b9216943da0a6cefcbef7775b44019f76f6b527
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for wagtail-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page