feat(gateway): expose mcp.supportedVersions and mcp.instructions in protocol config
- Dominant language
- TypeScript
- Stars
- 283
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 183
Description
### Description
`AWS::BedrockAgentCore::Gateway.ProtocolConfiguration.Mcp` exposes two MCP-specific properties the CLI does not surface today:
- **`Instructions`** — string (1–2048 chars) — server instructions text returned to MCP clients.
- **`SupportedVersions`** — array of strings — explicit MCP protocol versions the gateway supports.
Source: [MCPGatewayConfiguration CFN docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gateway-mcpgatewayconfiguration.md).
Today the CLI's `AgentCoreGatewaySchema` (`src/schema/schemas/mcp.ts:580–620`) only sets `searchType` (via `enableSemanticSearch`) on the protocol configuration. The L3 construct (`@aws/agentcore-cdk` — `src/cdk/constructs/components/mcp/Gateway.ts:234`) builds `mcp: { searchType: ... }` and nothing else. Customers cannot pin the MCP version range or supply instructions today.
### Acceptance Criteria
- [ ] Extend `AgentCoreGatewaySchema` with optional `mcp.instructions: string` and `mcp.supportedVersions: string[]`.
- [ ] Validate `instructions` length (1–2048) per CFN constraints; reject empty strings.
- [ ] Add `--mcp-instructions` and `--mcp-supported-versions` (comma-separated list) flags to `agentcore add gateway`.
- [ ] Add corresponding TUI fields (multiline text for instructions; chip list / multi-select for supported versions).
- [ ] Pass through to `CfnGateway.ProtocolConfiguration.Mcp.{Instructions, SupportedVersions}` in the L3 construct.
- [ ] Snapshot tests updated.
### Additional Context
- CFN support: **YES** — `Gateway.ProtocolConfiguration.Mcp.SupportedVersions` and `Gateway.ProtocolConfiguration.Mcp.Instructions`.
- These two are usually requested together — a single issue minimizes review overhead.
- L3 gap: yes — `@aws/agentcore-cdk` Gateway construct needs to plumb both fields.
- Naming: the schema field name `instructions` collides with the existing Evaluator `instructions` field — keep them in separate types so there's no ambiguity in TypeScript.
Contributor guide
Assessment
This issue has not been assessed yet.