Interface AddMcpServerTargetOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AddMcpServerTargetOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)", date="2026-05-19T19:44:36.888Z") @Stability(Stable) public interface AddMcpServerTargetOptions extends software.amazon.jsii.JsiiSerializable
Options for adding an MCP Server target to a gateway.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 OAuth2CredentialProvider oauth = OAuth2CredentialProvider.usingGithub(this, "GhOAuth", GithubOAuth2CredentialProviderProps.builder()
         .oAuth2CredentialProviderName("github-oauth")
         .clientId("your-client-id")
         .clientSecret(SecretValue.unsafePlainText("your-client-secret"))
         .build());
 gateway.addMcpServerTarget("Mcp", AddMcpServerTargetOptions.builder()
         .gatewayTargetName("mcp-server")
         .description("MCP with GitHub OAuth")
         .endpoint("https://my-mcp-server.example.com")
         .credentialProviderConfigurations(List.of(GatewayCredentialProvider.fromOauthIdentity(oauth, FromOauthIdentityOptions.builder()
                 .scopes(List.of("read:user"))
                 .build())))
         .build());
 
  • Method Details

    • getCredentialProviderConfigurations

      @Stability(Stable) @NotNull List<ICredentialProviderConfig> getCredentialProviderConfigurations()
      Credential providers for authentication.

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

    • getEndpoint

      @Stability(Stable) @NotNull String getEndpoint()
      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
    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      Optional description for the gateway target.

      Default: - No description

    • getGatewayTargetName

      @Stability(Stable) @Nullable default String getGatewayTargetName()
      The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).

      Default: - auto generate

    • builder

      @Stability(Stable) static AddMcpServerTargetOptions.Builder builder()
      Returns:
      a AddMcpServerTargetOptions.Builder of AddMcpServerTargetOptions