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_invocation audit rows now record the OAuth consumer in agent_client_id, and refused calls are recorded with result_status denied.
  • The MidgardContext field 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's jti, a per-call tool_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, the RiskLevel and ApprovalDecision enums and the audit_entry approval fields as public API, so changes to them will be announced in the changelog. I also noted the approval_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

andresmoreno28 created an issue. See original summary.

  • manuel garcia committed ef931691 on 1.0.x
    task: #3630082 Midgard 1.0.0-alpha3 installs alongside ai_governance;...
manuel garcia’s picture

Status: Active » Fixed

Thanks! 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.

The MidgardContext field 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's jti, a per-call tool_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?

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

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • manuel garcia committed 97b66503 on 1.0.x
    Midgard doc follow-ups
    
    Note the mcp_server_oauth:@alpha need in the...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.