AddMcpServerTargetOptions

class aws_cdk.aws_bedrock_agentcore_alpha.AddMcpServerTargetOptions(*, credential_provider_configurations, endpoint, description=None, gateway_target_name=None)

Bases: object

(experimental) Options for adding an MCP Server target to a gateway.

Parameters:
  • credential_provider_configurations (Sequence[ICredentialProviderConfig]) – (experimental) Credential providers for authentication. MCP servers require explicit authentication configuration. OAuth2 is strongly recommended over NoAuth.

  • endpoint (str) – (experimental) The HTTPS endpoint URL of the MCP server. The endpoint must: - Use HTTPS protocol - Be properly URL-encoded - Point to an MCP server that implements tool capabilities

  • description (Optional[str]) – (experimental) Optional description for the gateway target. Default: - No description

  • gateway_target_name (Optional[str]) – (experimental) The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen). Default: - auto generate

Stability:

experimental

ExampleMetadata:

fixture=default infused

Example:

gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway"
)

oauth = agentcore.OAuth2CredentialProvider.using_github(self, "GhOAuth",
    o_auth2_credential_provider_name="github-oauth",
    client_id="your-client-id",
    client_secret=cdk.SecretValue.unsafe_plain_text("your-client-secret")
)

gateway.add_mcp_server_target("Mcp",
    gateway_target_name="mcp-server",
    description="MCP with GitHub OAuth",
    endpoint="https://my-mcp-server.example.com",
    credential_provider_configurations=[
        agentcore.GatewayCredentialProvider.from_oauth_identity(oauth,
            scopes=["read:user"]
        )
    ]
)

Attributes

credential_provider_configurations

(experimental) Credential providers for authentication.

MCP servers require explicit authentication configuration. OAuth2 is strongly recommended over NoAuth.

Stability:

experimental

description

(experimental) Optional description for the gateway target.

Default:
  • No description

Stability:

experimental

endpoint

(experimental) The HTTPS endpoint URL of the MCP server.

The endpoint must:

  • Use HTTPS protocol

  • Be properly URL-encoded

  • Point to an MCP server that implements tool capabilities

Stability:

experimental

gateway_target_name

(experimental) The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).

Default:
  • auto generate

Stability:

experimental