AWS ElastiCache MCP Server
The official MCP Server for interacting with AWS ElastiCache
Available MCP Tools
Replication Group Operations
create-replication-group
- Create an Amazon ElastiCache replication group with specified configurationdelete-replication-group
- Delete an ElastiCache replication group with optional final snapshotdescribe-replication-groups
- Get detailed information about one or more replication groupsmodify-replication-group
- Modify settings of an existing replication groupmodify-replication-group-shard-configuration
- Modify the shard configuration of a replication grouptest-migration
- Test migration from a Redis instance to an ElastiCache replication groupstart-migration
- Start migration from a Redis instance to an ElastiCache replication groupcomplete-migration
- Complete migration from a Redis instance to an ElastiCache replication groupconnect-jump-host-replication-group
- Configure an EC2 instance as a jump host for replication group accesscreate-jump-host-replication-group
- Create an EC2 jump host to access a replication group via SSH tunnelget-ssh-tunnel-command-replication-group
- Generate SSH tunnel command for replication group access
Cache Cluster Operations
create-cache-cluster
- Create a new ElastiCache cache clusterdelete-cache-cluster
- Delete a cache cluster with optional final snapshotdescribe-cache-clusters
- Get detailed information about one or more cache clustersmodify-cache-cluster
- Modify settings of an existing cache clusterconnect-jump-host-cache-cluster
- Configure an EC2 instance as a jump host for cluster accesscreate-jump-host-cache-cluster
- Create an EC2 jump host to access a cluster via SSH tunnelget-ssh-tunnel-command-cache-cluster
- Generate SSH tunnel command for cluster access
Serverless Cache Operations
create-serverless-cache
- Create a new ElastiCache serverless cachedelete-serverless-cache
- Delete a serverless cachedescribe-serverless-caches
- Get information about serverless cachesmodify-serverless-cache
- Modify settings of a serverless cacheconnect-jump-host-serverless-cache
- Configure an EC2 instance as a jump host for serverless cache accesscreate-jump-host-serverless-cache
- Create an EC2 jump host to access a serverless cache via SSH tunnelget-ssh-tunnel-command-serverless-cache
- Generate SSH tunnel command for serverless cache access
CloudWatch Operations
get-metric-statistics
- Get CloudWatch metric statistics for ElastiCache resources with customizable time periods and dimensions
CloudWatch Logs Operations
describe-log-groups
- List and describe CloudWatch Logs log groupscreate-log-group
- Create a new CloudWatch Logs log groupdescribe-log-streams
- List and describe log streams in a log groupfilter-log-events
- Search and filter log events across log streamsget-log-events
- Retrieve log events from a specific log stream
Firehose Operations
list-delivery-streams
- List your Kinesis Data Firehose delivery streams
Cost Explorer Operations
get-cost-and-usage
- Get cost and usage data for ElastiCache resources with customizable time periods and granularity
Misc Operations
describe-cache-engine-versions
- List available cache engines and their versionsdescribe-engine-default-parameters
- Get default parameters for a cache engine familydescribe-events
- Get events related to clusters, security groups, and parametersdescribe-service-updates
- Get information about available service updatesbatch-apply-update-action
- Apply service updates to resourcesbatch-stop-update-action
- Stop service updates on resources
Instructions
The official MCP Server for interacting with AWS ElastiCache provides a comprehensive set of tools for managing ElastiCache resources. Each tool maps directly to ElastiCache API operations and supports all relevant parameters.
To use these tools, ensure you have proper AWS credentials configured with appropriate permissions for ElastiCache operations. The server will automatically use credentials from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) or other standard AWS credential sources.
All tools support an optional region_name
parameter to specify which AWS region to operate in. If not provided, it will use the AWS_REGION environment variable or default to 'us-west-2'.
Prerequisites
- Install
uv
from Astral or the GitHub README - Install Python using
uv python install 3.10
- Set up AWS credentials with access to AWS services
- Consider setting up Read-only permission if you don't want the LLM to modify any resources
Installation
Add the MCP to your favorite agentic tools. e.g. for Amazon Q Developer CLI MCP, ~/.aws/amazonq/mcp.json
):
{
"mcpServers": {
"awslabs.elasticache-mcp-server": {
"command": "uvx",
"args": ["awslabs.elasticache-mcp-server@latest"],
"env": {
"AWS_PROFILE": "default",
"AWS_REGION": "us-west-2",
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": []
}
}
}
{
"mcpServers": {
"awslabs.elasticache-mcp-server": {
"command": "uvx",
"args": [
"awslabs.elasticache-mcp-server@latest",
"--readonly"
],
"env": {
"AWS_PROFILE": "default",
"AWS_REGION": "us-west-2",
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": []
}
}
}
or docker after a successful docker build -t awslabs/elasticache-mcp-server .
:
{
"mcpServers": {
"awslabs.elasticache-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"--env",
"FASTMCP_LOG_LEVEL=ERROR",
"awslabs/elasticache-mcp-server:latest",
"--readonly" // Optional paramter if you would like to restrict the MCP to only read actions
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
Configuration
AWS Configuration
Configure AWS credentials and region:
# AWS settings
AWS_PROFILE=default # AWS credential profile to use
AWS_REGION=us-east-1 # AWS region to connect to
Connection Settings
Configure connection behavior and timeouts:
# Connection settings
ELASTICACHE_MAX_RETRIES=3 # Maximum number of retry attempts for AWS API calls
ELASTICACHE_RETRY_MODE=standard # AWS SDK retry mode for API calls
ELASTICACHE_CONNECT_TIMEOUT=5 # Connection timeout in seconds
ELASTICACHE_READ_TIMEOUT=10 # Read timeout in seconds
# Cost Explorer settings
COST_EXPLORER_MAX_RETRIES=3 # Maximum number of retry attempts for Cost Explorer API calls
COST_EXPLORER_RETRY_MODE=standard # AWS SDK retry mode for Cost Explorer API calls
COST_EXPLORER_CONNECT_TIMEOUT=5 # Connection timeout in seconds for Cost Explorer
COST_EXPLORER_READ_TIMEOUT=10 # Read timeout in seconds for Cost Explorer
# CloudWatch settings
CLOUDWATCH_MAX_RETRIES=3 # Maximum number of retry attempts for CloudWatch API calls
CLOUDWATCH_RETRY_MODE=standard # AWS SDK retry mode for CloudWatch API calls
CLOUDWATCH_CONNECT_TIMEOUT=5 # Connection timeout in seconds for CloudWatch
CLOUDWATCH_READ_TIMEOUT=10 # Read timeout in seconds for CloudWatch
# CloudWatch Logs settings
CLOUDWATCH_LOGS_MAX_RETRIES=3 # Maximum number of retry attempts for CloudWatch Logs API calls
CLOUDWATCH_LOGS_RETRY_MODE=standard # AWS SDK retry mode for CloudWatch Logs API calls
CLOUDWATCH_LOGS_CONNECT_TIMEOUT=5 # Connection timeout in seconds for CloudWatch Logs
CLOUDWATCH_LOGS_READ_TIMEOUT=10 # Read timeout in seconds for CloudWatch Logs
# Firehose settings
FIREHOSE_MAX_RETRIES=3 # Maximum number of retry attempts for Firehose API calls
FIREHOSE_RETRY_MODE=standard # AWS SDK retry mode for Firehose API calls
FIREHOSE_CONNECT_TIMEOUT=5 # Connection timeout in seconds for Firehose
FIREHOSE_READ_TIMEOUT=10 # Read timeout in seconds for Firehose
The server automatically handles: - AWS authentication and credential management - Connection establishment and management - Automatic retrying of failed operations - Timeout enforcement and error handling
Development
Running Tests
uv venv
source .venv/bin/activate
uv sync
uv run --frozen pytest
Building Docker Image
docker build -t awslabs/elasticache-mcp-server .
Running Docker Container
```bash docker run -p 8080:8080 \ -e AWS_PROFILE=default \ -e AWS_REGION=us-west-2 \ awslabs/elasticache-mcp-server