Overview
What is AWS Bedrock Logs MCP?
A command-line interface and API for analyzing AWS Bedrock usage and logs through Anthropic's MCP (Model Control Protocol). It exposes AWS CloudWatch Logs API functionality to Claude, allowing you to query and analyze Bedrock usage data in natural language.
How to use AWS Bedrock Logs MCP?
Install via uv, configure AWS credentials, then start the server with python cloudwatch_mcp_server.py. For Claude Desktop, add the server configuration to your mcpServers JSON block with the uv command. Four tools are exposed: get_bedrock_logs_df, get_model_usage_stats, get_user_usage_stats, and get_daily_usage_stats.
Key features of AWS Bedrock Logs MCP
- Model usage analysis with detailed statistics and token consumption
- User-based analytics for usage patterns and cost breakdowns
- Daily usage reports and trends tracking
- Token consumption metrics (input, completion, total)
- Interactive natural language interface via Claude
Use cases of AWS Bedrock Logs MCP
- Query last 7 days of Bedrock usage stats in natural language
- Identify average token consumption by model
- Discover top users of Bedrock by total tokens
- Obtain daily breakdown of model invocations
FAQ from AWS Bedrock Logs MCP
What does AWS Bedrock Logs MCP require to run?
Python 3.13+, AWS credentials with CloudWatch Logs access, and Anthropic API access for Claude integration.
How does AWS Bedrock Logs MCP communicate with clients?
By default, the server uses stdio transport for communication with MCP clients.
What kind of data does AWS Bedrock Logs MCP access?
It retrieves raw Bedrock invocation logs and aggregated statistics from AWS CloudWatch Logs via the CloudWatch Logs API. No Bedrock data is stored locally—it is queried on demand.
What are the key dependencies?
boto3, mcp[cli] (Anthropic’s Model Control Protocol library), pandas, and pydantic.
Is there a Dockerfile for containerized deployment?
Yes, a Dockerfile is included in the repository for container deployments.