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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAddMcpServerTargetOptionsstatic final classAn implementation forAddMcpServerTargetOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Credential providers for authentication.default StringOptional description for the gateway target.The HTTPS endpoint URL of the MCP server.default StringThe name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCredentialProviderConfigurations
Credential providers for authentication.MCP servers require explicit authentication configuration. OAuth2 is strongly recommended over NoAuth.
-
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
Optional description for the gateway target.Default: - No description
-
getGatewayTargetName
The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).Default: - auto generate
-
builder
- Returns:
- a
AddMcpServerTargetOptions.BuilderofAddMcpServerTargetOptions
-