Class: AWSCDK::BedrockAgentCore::McpServerTargetConfiguration

Inherits:
McpTargetConfiguration
  • Object
show all
Defined in:
bedrock_agent_core/mcp_server_target_configuration.rb

Overview

Configuration for MCP Server-based targets.

MCP (Model Context Protocol) servers provide tools, data access, and custom functions for AI agents. When you configure an MCP server as a gateway target, the gateway automatically discovers and indexes available tools through synchronization.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint) ⇒ McpServerTargetConfiguration

Returns a new instance of McpServerTargetConfiguration.

Parameters:

  • endpoint (String)


14
15
16
17
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 14

def initialize(endpoint)
  Jsii::Type.check_type(endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpoint")
  Jsii::Object.instance_method(:initialize).bind(self).call(endpoint)
end

Class Method Details

.create(endpoint) ⇒ AWSCDK::BedrockAgentCore::McpServerTargetConfiguration

Create an MCP server target configuration.

Parameters:

  • endpoint (String)

    The HTTPS endpoint URL of the MCP server.

Returns:

  • (AWSCDK::BedrockAgentCore::McpServerTargetConfiguration)

    A new McpServerTargetConfiguration instance



32
33
34
35
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 32

def self.create(endpoint)
  Jsii::Type.check_type(endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpoint")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.McpServerTargetConfiguration", "create", [endpoint])
end

.jsii_overridable_methodsObject



19
20
21
22
23
24
25
26
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 19

def self.jsii_overridable_methods
  {
    :target_type => { kind: :property, name: "targetType", is_optional: false },
    :endpoint => { kind: :property, name: "endpoint", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :render_mcp_configuration => { kind: :method, name: "renderMcpConfiguration", is_optional: false },
  }
end

Instance Method Details

#bind(_scope, _gateway) ⇒ AWSCDK::BedrockAgentCore::TargetConfigurationConfig

Binds this configuration to a construct scope No additional permissions are needed for MCP server targets.

Parameters:

Returns:



56
57
58
59
60
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 56

def bind(_scope, _gateway)
  Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope")
  Jsii::Type.check_type(_gateway, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheSJ9")), "_gateway")
  jsii_call_method("bind", [_scope, _gateway])
end

#endpointString

The HTTPS endpoint URL of the MCP server.

Returns:

  • (String)


47
48
49
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 47

def endpoint()
  jsii_get_property("endpoint")
end

#render_mcp_configurationObject

Renders the MCP-specific configuration.

Returns:

  • (Object)


65
66
67
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 65

def render_mcp_configuration()
  jsii_call_method("renderMcpConfiguration", [])
end

#target_typeAWSCDK::BedrockAgentCore::McpTargetType

The target type.



40
41
42
# File 'bedrock_agent_core/mcp_server_target_configuration.rb', line 40

def target_type()
  jsii_get_property("targetType")
end