Problem/Motivation
The drupal/midgard entry under suggest in composer.json says Midgard can't be installed alongside ai_governance, because Midgard pinned drupal/mcp_server to a dev-1.x commit (midgard#2). That's fixed: Midgard 1.0.0-alpha3 (1 October) moved Bifrost to MCP Server 2.x and closed #2.
Midgard now requires exactly drupal/mcp_server 2.0.0-beta5 and drupal/mcp_server_oauth 1.0.0-alpha1 until MCP Server 2.0 is stable, which satisfies ^2.0@beta in ai_governance_mcp_server. I checked it with a composer dry run on Drupal 11: drupal/midgard 1.0.0-alpha3, drupal/ai_governance 1.0.x-dev, mcp_server 2.0.0-beta5 and mcp_server_oauth 1.0.0-alpha1 resolve without conflicts.
One caveat: because Midgard pins mcp_server exactly, a site that moves to beta6 will need the Midgard release that follows it. I'll bump the pin when beta6 is tagged.
Proposed resolution
Update the suggest text, for example: "Enables the ai_governance_midgard submodule for Midgard/Heimdall governance decisions (Midgard 1.0.0-alpha3 or later)."
Things on Midgard's side that may matter for ai_governance_midgard
- In alpha3, Midgard's own MCP bridge (Bifrost) does not expose guarded skills over MCP, because they would run without Heimdall's guard. So a tool call through Bifrost never starts a Heimdall approval. Approvals come from playbooks run in Midgard, or from any other path that runs a guarded skill through MidgardGuard.
- Bifrost's
mcp_invocationaudit rows now record the OAuth consumer inagent_client_id, and refused calls are recorded withresult_statusdenied. - The
MidgardContextfield your submodule README asks for, to carry the call's identifier into the guarded operation: I'm happy to add it. Which identifier would you rather have there, the token'sjti, a per-calltool_call_id, or both? And is there a place where mcp_server or the tool bridge exposes the per-call id, so Midgard can read it instead of inventing one? - From now on I'll treat
MidgardApprovalResolvedEvent, theRiskLevelandApprovalDecisionenums and theaudit_entryapproval fields as public API, so changes to them will be announced in the changelog. I also noted theapproval_required"1"/"" storage quirk you documented.
AI usage (if applicable)
- [x] AI Assisted Issue: This issue was generated with AI assistance, but was reviewed and refined by the creator.
- [ ] AI Assisted Code
- [ ] AI Generated Code
- [ ] Vibe Coded
Comments
Comment #3
manuel garcia commentedThanks! I have confirmed this locally: midgard 1.0.0-alpha3, mcp_server 2.0.0-beta5 and mcp_server_oauth 1.0.0-alpha1 are installed together with ai_governance 1.0.x on Drupal 11.4.9 so I have now updated the suggest text.
There's no rush, with Bifrost not exposing guarded skills nothing needs it today, but if you'd like to add it while in alpha, both jti and tool_call_id as optional fields would be great, set by the server-side code that builds the operation, never taken from the MCP client. The jti identifies the token, which clients reuse across many calls, so tool_call_id is what ties an approval to the dispatch that triggered it.
For background, there's a related discussion with the MCP Sentinel maintainer about jti vs per-call ids, including the case of one request covering several tools: https://www.drupal.org/project/mcp_sentinel/issues/3623086