aws / aws/agentcore-cli

feat(gateway-target): polish mcpServer HTTP target UX and expose listingMode

Open
#1,357 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### Description

The user ask is for **HTTP targets** — i.e. an MCP gateway target that points to a raw HTTPS endpoint (an MCP server reachable over HTTPS), without requiring OpenAPI, Smithy, or a Lambda compute backend.

CFN partially models this today via `AWS::BedrockAgentCore::GatewayTarget.TargetConfiguration.Mcp.McpServer` ([docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gatewaytarget-mcpservertargetconfiguration.md)), which has `Endpoint` (https URL) + `ListingMode` (`DEFAULT | DYNAMIC`). The CLI's `AgentCoreGatewayTargetSchema` already includes `mcpServer` as a `targetType` value (`src/schema/schemas/mcp.ts:13–20`), but:

1. The CLI/TUI flow for `agentcore add gateway-target --type mcpServer --endpoint ` is poorly documented and not surfaced in the primary TUI selection list.
2. There is no CLI flag for `listingMode` — the schema accepts `toolDefinitions` as optional (which equates to `DYNAMIC`) but customers have no explicit toggle.
3. CFN does **not** support a generic raw-HTTP REST target — for that the only options today are `OpenApiSchema` or `ApiGateway` targets. So this issue is really about polishing the existing `mcpServer` target UX, plus advocating with the service team for a true raw-HTTP target type if customers need that.

### Acceptance Criteria

- [ ] Surface `mcpServer` target type as a first-class option in the `agentcore add gateway-target` TUI selection (alongside Lambda, OpenAPI, API Gateway, Smithy).
- [ ] Add a `--listing-mode` flag (`DEFAULT | DYNAMIC`) wired through to the L3 construct, which writes to `CfnGatewayTarget.TargetConfiguration.Mcp.McpServer.ListingMode`.
- [ ] Document in the CLI README and `agentcore --help` that "HTTP target" maps to `--type mcpServer --endpoint ` and is intended for upstream MCP servers reachable over HTTPS.
- [ ] If a true raw-HTTP REST target is needed (no MCP semantics on the upstream), open a service-team request and link it to this issue.

### Additional Context

- CFN support: **PARTIAL** — `McpServer.Endpoint` covers MCP-over-HTTPS; raw REST is not a target type.
- L3 surface: `mcpServer` is already wired in `@aws/agentcore-cdk` (`src/cdk/constructs/components/mcp/Gateway.ts`) and `toolDefinitions` is optional → effectively `DYNAMIC`.
- CLI today writes the schema correctly but does not foreground this option in the TUI.
- See companion issue: dynamic listing (Lambda-backed), which is a separate gap.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.