awslabs.cloudwatch-appsignals-mcp-server 0.1.10__py3-none-any.whl → 0.1.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,4 +14,4 @@
14
14
 
15
15
  """AWS Application Signals MCP Server."""
16
16
 
17
- __version__ = '0.1.10'
17
+ __version__ = '0.1.11'
@@ -654,7 +654,12 @@ def expand_service_operation_wildcard_patterns(
654
654
  # Check if this operation has the required metric type
655
655
  metric_refs = operation.get('MetricReferences', [])
656
656
  has_metric_type = any(
657
- ref.get('MetricType', '') == metric_type for ref in metric_refs
657
+ ref.get('MetricType', '') == metric_type
658
+ or (
659
+ metric_type == 'Availability'
660
+ and ref.get('MetricType', '') == 'Fault'
661
+ )
662
+ for ref in metric_refs
658
663
  )
659
664
 
660
665
  if has_metric_type:
@@ -35,6 +35,7 @@ def _initialize_aws_clients():
35
35
  logs_endpoint = os.environ.get('MCP_LOGS_ENDPOINT')
36
36
  cloudwatch_endpoint = os.environ.get('MCP_CLOUDWATCH_ENDPOINT')
37
37
  xray_endpoint = os.environ.get('MCP_XRAY_ENDPOINT')
38
+ synthetics_endpoint = os.environ.get('MCP_SYNTHETICS_ENDPOINT')
38
39
 
39
40
  # Log endpoint overrides
40
41
  if appsignals_endpoint:
@@ -45,6 +46,8 @@ def _initialize_aws_clients():
45
46
  logger.debug(f'Using CloudWatch endpoint override: {cloudwatch_endpoint}')
46
47
  if xray_endpoint:
47
48
  logger.debug(f'Using X-Ray endpoint override: {xray_endpoint}')
49
+ if synthetics_endpoint:
50
+ logger.debug(f'Using Synthetics endpoint override: {synthetics_endpoint}')
48
51
 
49
52
  # Check for AWS_PROFILE environment variable
50
53
  if aws_profile := os.environ.get('AWS_PROFILE'):
@@ -59,6 +62,11 @@ def _initialize_aws_clients():
59
62
  )
60
63
  cloudwatch = session.client('cloudwatch', config=config, endpoint_url=cloudwatch_endpoint)
61
64
  xray = session.client('xray', config=config, endpoint_url=xray_endpoint)
65
+ synthetics = session.client('synthetics', config=config, endpoint_url=synthetics_endpoint)
66
+ s3 = session.client('s3', config=config)
67
+ iam = session.client('iam', config=config)
68
+ lambda_client = session.client('lambda', config=config)
69
+ sts = session.client('sts', config=config)
62
70
  else:
63
71
  logs = boto3.client(
64
72
  'logs', region_name=AWS_REGION, config=config, endpoint_url=logs_endpoint
@@ -75,14 +83,32 @@ def _initialize_aws_clients():
75
83
  xray = boto3.client(
76
84
  'xray', region_name=AWS_REGION, config=config, endpoint_url=xray_endpoint
77
85
  )
86
+ # Additional clients for canary functionality
87
+ synthetics = boto3.client(
88
+ 'synthetics', region_name=AWS_REGION, config=config, endpoint_url=synthetics_endpoint
89
+ )
90
+ s3 = boto3.client('s3', region_name=AWS_REGION, config=config)
91
+ iam = boto3.client('iam', region_name=AWS_REGION, config=config)
92
+ lambda_client = boto3.client('lambda', region_name=AWS_REGION, config=config)
93
+ sts = boto3.client('sts', region_name=AWS_REGION, config=config)
78
94
 
79
95
  logger.debug('AWS clients initialized successfully')
80
- return logs, appsignals, cloudwatch, xray
96
+ return logs, appsignals, cloudwatch, xray, synthetics, s3, iam, lambda_client, sts
81
97
 
82
98
 
83
99
  # Initialize clients at module level
84
100
  try:
85
- logs_client, appsignals_client, cloudwatch_client, xray_client = _initialize_aws_clients()
101
+ (
102
+ logs_client,
103
+ appsignals_client,
104
+ cloudwatch_client,
105
+ xray_client,
106
+ synthetics_client,
107
+ s3_client,
108
+ iam_client,
109
+ lambda_client,
110
+ sts_client,
111
+ ) = _initialize_aws_clients()
86
112
  except Exception as e:
87
113
  logger.error(f'Failed to initialize AWS clients: {str(e)}')
88
114
  raise