midgard
Midgard turns Drupal into a safe, auditable AI operations layer. When an AI agent changes your site, Midgard makes the change reviewable, reversible and recorded â because in Drupal the output that matters is real configuration, not throwaway text.
The output is configuration, not text. Midgard treats AI as a governed operator of your site, not a content generator. Every change it makes is captured as Drupal config you can review, roll back and export.
Drupal already has a rich AI ecosystem â providers, agents, generators, an MCP server. Midgard is the opinionated assembly that makes those pieces feel like a single coherent product, and adds the one thing an operations layer needs: governance. It does not compete with the AI modules that make changes; it governs them.
Four guarantees for every AI-driven change
đĄī¸ GuardedEvery configuration write an AI initiates passes through a single safety primitive. Nothing slips around it â not even "trivial" writes. đī¸ Observable
A universal configuration-events subscriber captures each change the moment it happens, so you see exactly what the AI touched. âŠī¸ Reversible
Changes are snapshotted before they apply and can be rolled back, building on Drupal's config snapshot and rollback primitives. đĻ Exportable
The result is standard, version-controllable Drupal configuration â the same YAML your team already reviews and deploys.
How Midgard governs the AI ecosystem
Midgard sits underneath the tools that act on your site and watches the only thing that counts: configuration changes. A universal configuration-events subscriber turns any AI-driven mutation â whether it comes from an AI agent, an AI generation workflow, or a tool call over MCP â into a governed event that can be guarded, scored for risk, queued for human approval, snapshotted, and written to a tamper-evident audit trail.
Use the agents you like â Midgard governs what they do. Because it governs at the configuration layer rather than inside any one tool, Midgard works with the ecosystem instead of replacing it.
It never calls AI provider APIs directly â it always goes through drupal/ai â and it never reimplements snapshot or rollback â it builds on existing configuration primitives.
What's in the suite
Midgard
The umbrella: AI provider layer, the safety primitive, the admin UI, and the install & diagnostic tooling that ties everything together.
Bifrost
A Model Context Protocol bridge that exposes governed Drupal capabilities to AI agents over OAuth-scoped, auditable tool calls.
Heimdall
Risk scoring, human-in-the-loop approval for high-impact changes, and a tamper-evident, hash-chained audit log of every resolution.
Standing on the shoulders of the ecosystem
Midgard's rule is simple: adopt upstream where it exists, wrap it where it doesn't. It is a light governance layer on top of well-maintained projects, with sincere thanks to their maintainers and communities:
AI (drupal/ai)The provider abstraction. Midgard never talks to OpenAI, Anthropic, Gemini or Ollama directly â it goes through drupal/ai. Built by FreelyGive and the Drupal AI Initiative. MCP Server
The Model Context Protocol transport that Bifrost rides on. Part of the Acquia-sponsored MCP effort. Simple OAuth
The OAuth 2.1 / PKCE layer securing agent access over HTTP. Key
Secure storage for API keys. Midgard never stores a secret anywhere else.
đĄī¸ Built on Config Guardian
Midgard's reversibility and audit guarantees are powered by Config Guardian â snapshot, simulate, risk-score, rollback and audit primitives for Drupal configuration.
Config Guardian is built by the same author as Midgard, so the integration is deliberate and vertical: Midgard delegates the dangerous parts to a focused module that already carries Drupal Security Team coverage, instead of reinventing them.
Install in minutes
Midgard ships an opinionated installer and a diagnostic command, so a working governed setup is a few lines away:
composer require drupal/midgard drush en midgard midgard_bifrost midgard_heimdall drush midgard:install drush midgard:doctor
midgard:install wires the provider, keys, routing and permissions; midgard:doctor reports the health of every part of the suite. (The composer step applies once Midgard is published on drupal.org.)
How it relates to Drupal's direction
Midgard is a complement to Drupal's AI direction and to the broader move toward safer configuration governance â not a competitor. It does not replace Workspaces, Configuration Management, or the official AI modules; it sits beside them and makes AI-driven configuration changes accountable. If the official tooling grows to cover something Midgard wraps today, Midgard happily steps back to the upstream.
Roadmap
Midgard is built as a suite. The current line ships the provider layer, the MCP bridge (Bifrost) and governance (Heimdall). On the near-term roadmap:
- Muninn â observability and content/configuration insight across governed changes.
- Path to a stable 1.0 â pinning the MCP transport to a tagged stable release and opting in to Drupal Security Team coverage. Until both land, releases stay on the alpha/beta line.
- Further submodules for auditing, configuration repair, content QA and design sync are planned as the suite matures.
â ī¸ Project status â please read before installing
Midgard is a pre-1.0 alpha. It targets Drupal 11; its own code is already Drupal 12-clean (zero deprecated API calls), and it will declare Drupal 12 support as soon as its AI and OAuth dependencies do. Drupal 11 receives upstream support well into 2027.
It is honest about what it is: a young, actively developed governance layer. Because it currently depends on a development build of the MCP transport, releases remain alpha until that dependency ships stable and Security Team coverage is opted in.
Getting involved & support
Found a bug?
Midgard is alpha â your feedback is the point. Report bugs, request features, or tell us where the governance model gets in your way.
Review the model
Real-world deployments and review of the security and governance model are especially welcome at this stage.
Contribute
Midgard and Drupal are open source, built by the community. Patches, docs and ideas all help.