Repository navigation
Description
Summary
Update the normative MCP Gateway specification and published schemas to support multiple configured agent/session identifiers.
The JSON contract should support either:
{
"gateway": {
"agentId": "primary-agent"
}
}or:
{
"gateway": {
"agentIds": ["primary-agent", "enclave-agent"]
}
}The two forms must be mutually exclusive. This is the specification counterpart to github/gh-aw-mcpg#12115.
Motivation
mcpg already maintains concurrent session label state keyed by session/agent ID, but its configuration exposes only one singular identifier. A plural form is needed as the configuration foundation for allowing a primary agent and enclave sessions to share one gateway instance while retaining independent DIFC state and policies.
Normative requirements
- Define
gateway.agentIdsas an array of agent/session identifiers. - Require
agentIdsto contain at least one item. - Require each item to be a non-empty string.
- Define
gateway.agentIdandgateway.agentIdsas mutually exclusive. - Require a gateway configuration to select one of the singular or plural forms where an agent identifier is required today.
- Remove
gateway.apiKeyfrom the specification and published schemas. The terminology is misleading because the field represents agent/session identity rather than a separately modeled API credential. - Document JSON
agentIdsand the corresponding mcpg TOML spellingagent_idsconsistently. - Update examples to use
agentIdoragentIds, neverapiKey.
Schema work
Update every maintained/published MCP Gateway schema copy so they remain identical in behavior:
- Add
agentIdswithtype: array,minItems: 1, and string items withminLength: 1. - Remove the
apiKeyproperty and any required-field alternatives referencing it. - Encode singular/plural mutual exclusion.
- Add schema tests for:
- valid
agentId - valid one- and multi-entry
agentIds - empty
agentIds - empty entries
- both
agentIdandagentIds - removed
apiKey
- valid
Compatibility and rollout
The implementation may temporarily continue parsing legacy api_key/apiKey internally, but it should no longer be part of the normative or published configuration contract. Existing agentId configurations remain valid.
Runtime mapping from individual IDs to allow-only policies is explicitly follow-up work; this issue defines only the singular/plural configuration contract.
Acceptance criteria
- The normative specification describes both forms and their exclusivity.
- All published schema copies enforce the same constraints.
apiKeyis absent from specification prose, examples, and schema definitions related to gateway identity.- Schema/spec validation and repository tests pass.
- The resulting contract matches the implementation tracked in Add mutually exclusive gateway agent_ids configuration gh-aw-mcpg#12115.
Activity