NewAgent Observability — find failures before customers do.
Back to directory
Amazon CloudWatch logo

Amazon CloudWatch MCP server: 19 read-only tools

AWS Labs' local server for CloudWatch logs, metrics, PromQL and alarms. Log queries are billed by data scanned, and a failed query comes back empty.

Connector
Official, local over stdio
Coverage
Logs Insights, metrics, PromQL, alarms
Tools
19, all on by default
Biggest risk for an agent
A failed log query returns an empty list

Checked 6 October 2026 · from AWS Labs' repository, the PyPI package source and AWS documentation

One of 91 guides to monitoring and developer tools. Each covers what an AI coding agent can get out of the tool through MCP, the protocol that lets the agent query the tool directly.

Summary

AWS Labs publishes an official CloudWatch MCP server. Version 0.3.1 registers 19 tools across CloudWatch Logs, metrics, PromQL and alarms, all on by default.

Every tool reads. The server's own instructions describe read-only commands, and its IAM actions are describe, get, list and Logs Insights query calls.

Two costs are easy to miss. Logs Insights bills by the uncompressed log data a query scans, and four of the tools start queries.

A failed or slow query returns an empty result list beside a status field. An agent that skips the status can read it as zero matches.

What is the Amazon CloudWatch MCP server?

It is AWS's server for the Model Context Protocol, built for troubleshooting agents. A connected agent can find firing alarms, pull the metrics behind them and query the logs from the same window.

The 19 tools fall into four groups. Logs covers discovery, anomaly and pattern analysis, Logs Insights queries and field-index advice. Metrics covers data, metadata, trend analysis and recommended alarms.

PromQL queries metrics ingested over OTLP. Alarms reads active alarms and their history.

The README documents 17 of the tools. recommend_indexes_loggroup and recommend_indexes_account are registered in the source and missing from the README's tool list.

It runs locally over stdio, on the same host as the client. Traces, SLOs and Application Signals live in a separate AWS Labs package, awslabs.cloudwatch-applicationsignals-mcp-server.

It covers production telemetry in CloudWatch, plus agent sessions when those agents run on Bedrock AgentCore. Code review, CI and cost sit outside it.

Part of the workWhat Amazon CloudWatch has hereCan an agent reach it
Code, tests & reviewOutside its scopeCode, tests and review sit outside CloudWatch
CI & releaseOutside its scopePipelines are out of reach. A deploy shows up only as a change in a metric or a log line
Production observabilityLogs, metrics, PromQL, alarmsYes. Core strength for logs and metrics on AWS. Traces need the separate Application Signals server
Agent observability & evalsAgentCore spans in CloudWatch LogsPartial. Logs Insights can query AgentCore OpenTelemetry spans, and the package ships an AgentCore investigation skill. Agents hosted elsewhere need their telemetry sent to CloudWatch first
AI cost managementOutside its scopeSpend data sits in AWS's billing server, which has its own guide

For an agent, that means CloudWatch answers what fired, what the metric did and what the logs said, inside one AWS account at a time. It can trace an alarm to its log lines. To follow a request across services it needs the Application Signals server beside it.

What can an AI agent do with Amazon CloudWatch?

TaskToolsWorksWatch out for
See which alarms are firingget_active_alarms get_alarm_historyYesOne region per call and 50 alarms by default. Check has_more_results and ask for every region you run in
Pull the metric behind an alarmget_metric_data get_metric_metadataYesMetadata comes from a file bundled with the package, so custom metrics return no description
Search logs around an incidentdescribe_log_groups execute_log_insights_query get_logs_insight_query_resultsYesEach query is billed by data scanned. Narrow the time range and set a limit
Query logs across regions or accountsexecute_cwl_insights_batchYesSends 50 log groups per query and splits a range that hits 10,000 records. Cross-account reads need a monitoring account
Find error patterns and anomalies in a log groupanalyze_log_groupYesAnomalies come only from log anomaly detectors you already run. The tool also starts two billed pattern queries
Query OpenTelemetry metrics with PromQLexecute_promql_query execute_promql_range_query get_promql_labels get_promql_label_values get_promql_seriesYesCovers OTLP metrics, and AWS metrics once OTel enrichment is on. Range queries stop at 500 series and 7 days
Propose alarm thresholdsget_recommended_metric_alarms analyze_metricYesReturns recommendations for you to apply. Creating the alarm is outside the server
Decide which log fields to indexrecommend_indexes_account recommend_indexes_loggroupYesReads 30 days of completed query history. The log-group tool also runs short Insights queries
Follow a request across servicesawslabs.cloudwatch-applicationsignals-mcp-server: search_transaction_spans get_xray_traceNo, separate serverTraces and SLOs live in the Application Signals server. Install it beside this one

Start with get_active_alarms in each region you run. Alarm names and times then scope every later query, which keeps Logs Insights scans small.

19 tools registered, all on by default, all read-only

Logs8
describe_log_groupsanalyze_log_groupexecute_log_insights_queryget_logs_insight_query_resultscancel_logs_insight_queryexecute_cwl_insights_batchrecommend_indexes_loggrouprecommend_indexes_account
Metrics4
get_metric_dataget_metric_metadataanalyze_metricget_recommended_metric_alarms
PromQL5
execute_promql_queryexecute_promql_range_queryget_promql_label_valuesget_promql_seriesget_promql_labels
Alarms2
get_active_alarmsget_alarm_history

Counted from the tool registrations in the PyPI 0.3.1 package on 6 October 2026. The README lists 17; the two index-recommender tools are the difference. cancel_logs_insight_query stops a running query and leaves every resource unchanged.

Amazon CloudWatch MCP server limits: where answers come back incomplete

Two of these limits announce themselves in a field an agent may skip. The third is silent.

The agent says: “There are no errors in the logs.” The query never finished.

execute_log_insights_query waits 30 seconds by default. A slower query returns status Polling Timeout and an empty results list.

A query that fails, for example on a missing permission, returns status Error with the same empty list. An agent that reads only the results sees zero matches.

Guard: Have the agent report the status of every query, and treat an empty list as unanswered until the status is Complete.

The agent says: “All clear, zero alarms firing.” It checked one region.

get_active_alarms reads one region per call. When the region argument is empty, it uses AWS_REGION, then the profile's region, then us-east-1.

It also returns 50 alarms by default. A longer list sets has_more_results to true and stops at 50.

Guard: Name every region you run in, and have the agent report has_more_results with the count.

The agent says: “That metric has no documentation.” It is outside the bundled list.

get_metric_metadata makes no AWS call. It reads a file shipped in the package: 1,179 metrics across 38 namespaces, led by RDS, Container Insights and the CloudWatch agent.

Custom metrics, and namespaces missing from that file such as AWS/Bedrock, return an empty result.

Guard: Treat empty metadata as a gap in the bundled file, and read the metric itself with get_metric_data.

How to configure Amazon CloudWatch MCP for agents

  1. 1

    Give it a read-only CloudWatch role

    The README lists 11 IAM actions, all describe, get, list and query calls. The index-recommender tools also call logs:DescribeQueries, logs:DescribeIndexPolicies and logs:DescribeAccountPolicies.

  2. 2

    Name the region

    Each tool takes a region argument. Left empty, it uses AWS_REGION or the profile's region, and then us-east-1.

  3. 3

    Prefer a profile over inline keys

    AWS_PROFILE keeps credentials in the SDK's own store. Each tool also accepts profile_name, so one server can reach several accounts.

  4. 4

    Run 0.3.1 or later

    Releases 0.1.0 to 0.2.1 accepted any region string in the PromQL client. A prompt-injected value could send signed requests to another host.

Paste this into your agent’s instructions

A failed query and an empty one look alike, and each tool answers for one region. The block makes the agent say which it saw.

Terminal
When you answer using CloudWatch MCP tools, state:
- The region, the account and the time window you queried.
- The status of every Logs Insights query. An empty result
  with status Error or Polling Timeout means the query did
  not finish. It does not mean zero matches.
- How many rows or alarms came back, and the limit you set.
When a query returns zero rows, say so and name the
constraints above.
Write your answer in ASD-STE100 Simplified Technical
English. Use short sentences with one idea in each.

Do you need the MCP server at all?

Often the AWS CLI is enough. aws logs start-query and aws cloudwatch get-metric-data use the same credentials, and a coding agent already knows them.

The server's advantage is shaping. It polls queries to completion, trims pattern results, batches log groups across regions and suggests time windows from alarm history.

AWS's managed AWS MCP Server is the other route. Its call_aws tool can run AWS API operations, CloudWatch's among them, under your IAM credentials with nothing to install.

Connect it for incident work on AWS. Use the CLI for a query you already know.

Amazon CloudWatch MCP server setup

The package runs with uvx and needs Python 3.10 or later. It uses ordinary AWS credentials: a profile the SDK can find, or a key pair, plus a region.

The README states the server runs only on the same host as the MCP client. AWS's managed AWS MCP Server is a separate, hosted route, generally available since 6 May 2026.

Claude Code

The config carries a profile name only. AWS_PROFILE names a profile the AWS SDK already holds, so the secret stays in the SDK's own store.

Terminal
claude mcp add-json "cloudwatch" '{"command":"uvx",
  "args":["awslabs.cloudwatch-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}'

Cursor

In ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one. The profile points at credentials the AWS SDK already has.

Terminal
{"mcpServers":{"cloudwatch":{"command":"uvx",
  "args":["awslabs.cloudwatch-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}

Codex CLI

Codex reads TOML, so the JSON blocks above will not transfer. The profile resolves through the AWS SDK.

Terminal
[mcp_servers.cloudwatch]
command = "uvx"
args = ["awslabs.cloudwatch-mcp-server@latest"]
env = { AWS_PROFILE = "your-profile", AWS_REGION = "us-east-1" }

Every other client

Each block below is the configuration for one client, with the file path and the key that client expects.

Claude Desktop

macOS ~/Library/Application Support/Claude/claude_desktop_config.json. Windows %APPDATA%\Claude\claude_desktop_config.json. Edit it through Settings, Developer, Edit Config.

Quit and restart fully for changes to load. Logs are at ~/Library/Logs/Claude/mcp.log.

Terminal
{"mcpServers":{"cloudwatch":{"command":"uvx",
  "args":["awslabs.cloudwatch-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}
Gemini CLI

~/.gemini/settings.json globally, or .gemini/settings.json per project. Key mcpServers. CLI: gemini mcp add.

Terminal
{"mcpServers":{"cloudwatch":{"command":"uvx",
  "args":["awslabs.cloudwatch-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}
VS Code Copilot

.vscode/mcp.json per workspace, or your user profile. CLI: code --add-mcp.

Terminal
{"servers":{"cloudwatch":{"command":"uvx",
  "args":["awslabs.cloudwatch-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}

`.vscode/mcp.json` uses the key `servers`. VS Code's portable files, .mcp.json at the project root and ~/.copilot/mcp-config.json, use mcpServers. VS Code recommends them for new servers.

Kiro (AWS)

.kiro/settings/mcp.json per workspace, or ~/.kiro/settings/mcp.json globally. Key mcpServers, the shape the README shows for Kiro and Cline.

Windsurf

~/.codeium/windsurf/mcp_config.json. Key mcpServers, the same JSON shape as Cursor, carrying the same AWS profile.

Zed

~/.config/zed/settings.json, carrying the same AWS profile as the blocks above.

The key is `context_servers`. Zed uses its own name for them in config, so searching its settings for mcp finds nothing.

Cline

Open Configure MCP Servers from the MCP tab. Key mcpServers, standard JSON shape, carrying the same AWS profile.

Goose (Block)

~/.config/goose/config.yaml, carrying the same AWS profile.

YAML, and servers are called `extensions`. Add one interactively with goose configure, or per session with goose session --with-extension.

Continue

.continue/mcpServers/*.yaml, one file per server, carrying the same AWS profile.

YAML, and `mcpServers` is a list. Every JSON client keys servers by name. Continue takes an array, so a converted config will not parse.

Windows

The README gives a separate form for Windows. It runs the package's .exe entry point through uv tool run.

Terminal
{"mcpServers":{"cloudwatch":{"type":"stdio","command":"uv",
  "args":["tool","run","--from","awslabs.cloudwatch-mcp-server@latest",
    "awslabs.cloudwatch-mcp-server.exe"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}
Docker

The README builds the image locally from a clone of awslabs/mcp, in src/cloudwatch-mcp-server. It mounts ~/.aws so the container can read your profile.

Terminal
docker build -t awslabs/cloudwatch-mcp-server:latest .
docker run --rm --interactive -v ~/.aws:/root/.aws \
  -e AWS_PROFILE=your-profile awslabs/cloudwatch-mcp-server:latest
Explicit keys

Where a profile is unavailable. Scope the key to CloudWatch and CloudWatch Logs read access.

Terminal
AWS_REGION=us-east-1 \
AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> \
uvx awslabs.cloudwatch-mcp-server@latest

Read-only access, permissions and security

  • Every tool reads

    The server calls describe, get, list and Logs Insights query APIs. It cannot create an alarm, change retention or delete a log group.

  • Log lines carry whatever your services wrote

    Tokens, emails and request bodies in a log reach the model once a query returns them.

  • Queries spend money

    Logs Insights bills by uncompressed data scanned, and an agent can start several queries in one turn.

  • Update to 0.3.1 or later

    Releases 0.1.0 to 0.2.1 could send requests signed with the server's credentials to a host named in a prompt-injected region value.

  • Prefer a profile to inline keys

    Credentials then stay in the AWS SDK's store, outside the MCP client's configuration file.

Troubleshooting

AccessDeniedException on a log query
The IAM identity lacks a CloudWatch Logs action. Queries need logs:StartQuery, logs:GetQueryResults and logs:StopQuery alongside the describe permissions.
Status "Polling Timeout" with an empty result
The query outlived the tool's wait, 30 seconds by default, and is still running in CloudWatch. Fetch it with get_logs_insight_query_results, or stop it with cancel_logs_insight_query.
Alarms or log groups you know exist are missing
The tool queried a different region. When the region argument is empty, it uses AWS_REGION, then the profile's region, then us-east-1.
PromQL returns nothing for AWS metrics
Vended AWS metrics reach PromQL only after OTel enrichment is on, through aws cloudwatch start-otel-enrichment. Use get_metric_data for classic namespaces such as AWS/EC2.
get_metric_metadata returns nothing
The metadata is a file shipped in the package, with 1,179 metrics across 38 namespaces. Custom metrics and unlisted namespaces have no entry.

Amazon CloudWatch MCP server: Reference

ItemValue
StatusPyPI 0.3.1, published 22 September 2026 · shipped from the awslabs/mcp monorepo
Packageawslabs.cloudwatch-mcp-server, run with uvx, Python 3.10 or later
Transportstdio, on the client's host. The README also builds a local Docker image
AuthAWS_PROFILE or a key pair, plus AWS_REGION, which falls back to us-east-1
Permissions11 IAM actions in the README: 4 CloudWatch, 7 CloudWatch Logs
Tools19, all on by default, all read-only. The README documents 17
Logs InsightsBilled by uncompressed data scanned. The batch tool sends 50 log groups per query and splits at 10,000 records
PromQLRange queries: 500 series, 7-day range, 20-second timeout
AlarmsOne region per call, 50 alarms by default
Traces and SLOsawslabs.cloudwatch-applicationsignals-mcp-server, a separate package

What engineers report

This server ships inside the awslabs monorepo, so the useful signals are packaging and release history.

What was checkedWhat it shows
Packageawslabs.cloudwatch-mcp-server 0.3.1 on PyPI, 32 releases since 4 July 2025
Repositoryawslabs/mcp, 9,756 stars on 6 October 2026, last pushed 5 October 2026
Commits90 commits touch src/cloudwatch-mcp-server, the first on 3 July 2025
Tools19 registered in the source, 17 listed in the README
Official MCP registryA search for cloudwatch returned zero entries on 6 October 2026

Package facts from PyPI and repository facts from the GitHub API, both read 6 October 2026. Tool names come from the registrations in the 0.3.1 package.

Should you connect an agent to Amazon CloudWatch?

Yes. Best for incident investigation on AWS, with a read-only CloudWatch role and the region named in every request.

Strongest fit
Teams on AWS who want an agent to move from a firing alarm to its metrics and logs in one conversation.
Main advantage
Task-shaped tools: query polling, cross-region log batching and alarm history with suggested investigation windows.
Main weakness
Failed and timed-out log queries return empty results, and every log query is billed by data scanned.
Operational risk
Low for writes, because every tool reads. Query spend and log contents are the exposure.

From Oodle

One platform for agent traces and infrastructure

Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface.

See agent observability

Frequently asked questions

How many tools does the CloudWatch MCP server have?

19 in version 0.3.1, all on by default. The README documents 17. The two field-index recommender tools are registered in the source as well.

Is there a hosted CloudWatch MCP endpoint?

The CloudWatch server runs locally over stdio. AWS's managed AWS MCP Server is hosted, and its call_aws tool can call CloudWatch APIs with your IAM credentials.

Can it change anything in my account?

It reads only. It can start and stop Logs Insights queries, which cost money. It cannot create alarms or change log groups.

What IAM permissions does it need?

The README lists 11: four CloudWatch actions for alarms and metric data, and seven CloudWatch Logs actions for log groups, anomalies and Insights queries. The index-recommender tools also call logs:DescribeQueries, logs:DescribeIndexPolicies and logs:DescribeAccountPolicies.

Does it read traces?

Traces come through a separate AWS Labs server, awslabs.cloudwatch-applicationsignals-mcp-server. Its search_transaction_spans and get_xray_trace tools cover spans and X-Ray traces.

Changelog

  • 22 September 2026. PyPI 0.3.1 published. It carries the 0.3.0 fix that validates the region argument in the PromQL client before signing a request.
  • 26 August 2026. 0.2.0 published, the first release on version 2 of the MCP Python SDK.
  • 13 May 2026. PyPI 0.1.1 removed the Observability Admin tools. The changelog points to the managed AWS MCP Server for those APIs.
  • 8 May 2026. Changelog entry 0.1.0 added the five PromQL tools for OTLP metrics.
  • 29 April 2026. 0.0.26 added execute_cwl_insights_batch for queries across log groups and regions.
  • 10 April 2026. 0.0.24 added the field-index recommender tools.
  • 4 July 2025. First PyPI release, 0.0.3, with logs, metrics and alarms tools.

Sources

Every number on the page traces to one of these

  1. Tool registrations from the awslabs.cloudwatch-mcp-server 0.3.1 package on PyPI, read 6 October 2026
  2. Tool descriptions, IAM permissions and setup from the server's README in awslabs/mcp
  3. Release history from the package changelog and PyPI
  4. Logs Insights billing from the Amazon CloudWatch Logs User Guide
  5. AWS MCP Server availability from the AWS News Blog, 6 May 2026

Amazon CloudWatch’s own MCP documentation

Also from AWS Labs:

Other metrics and logs servers: