MCP server for AWS EBS volume initialization
Project description
EBS Initialization MCP Server
A Model Context Protocol (MCP) server for automating AWS EBS volume initialization. This server provides tools to initialize EBS volumes attached to EC2 instances using AWS Systems Manager.
Features
- 🔍 Volume Discovery: Automatically discover all EBS volumes attached to an EC2 instance
- 🚀 Automated Initialization: Initialize volumes using
fio(recommended) ordd - 📊 Progress Monitoring: Check initialization status and view detailed logs
- 🌐 Multi-Region Support: Works across all AWS regions
- 🔒 Secure Execution: Uses AWS Systems Manager for secure remote execution
Installation
Using uvx (Recommended)
# Run directly without installation (latest version)
uvx ebs-initializer-mcp@latest
# Or run specific version
uvx ebs-initializer-mcp==0.4.5
# Install globally
uv tool install ebs-initializer-mcp
# Upgrade to latest version
uvx --upgrade ebs-initializer-mcp
From GitHub
uvx --from git+https://github.com/username/ebs-init-mcp.git ebs-mcp-server
Usage
As MCP Server
Add to your MCP configuration (mcp_config.json):
{
"mcpServers": {
"ebs-initializer": {
"command": "uvx",
"args": ["ebs-initializer-mcp@latest"],
"env": {
"AWS_REGION": "us-west-2"
}
}
}
}
Available Tools
- get_instance_volumes: Get all EBS volumes attached to an instance
- initialize_all_volumes: Initialize all volumes on an instance (parallel processing)
- initialize_volume_by_id: Initialize a specific volume by its volume ID
- check_initialization_status: Monitor initialization progress and view detailed logs
Example Usage with Claude Code
"Initialize all EBS volumes for instance i-1234567890abcdef0 using fio"
"Initialize volume vol-1234567890abcdef0 using fio"
"Check the status of the newly attached volume vol-abcdef1234567890"
The MCP server will:
- Discover all attached EBS volumes
- Install fio on the target instance
- Run initialization commands in parallel
- Provide status updates and logs
Prerequisites
- AWS CLI configured with appropriate permissions
- EC2 instances must have Systems Manager agent installed
- Supported Operating Systems:
- Amazon Linux 2
- Amazon Linux 2023
- Red Hat Enterprise Linux (RHEL)
- Ubuntu (18.04, 20.04, 22.04, 24.04)
- SUSE Linux Enterprise Server (SLES)
- Required IAM permissions:
ec2:DescribeVolumesssm:SendCommandssm:GetCommandInvocation
AWS IAM Permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeVolumes",
"ssm:SendCommand",
"ssm:GetCommandInvocation"
],
"Resource": "*"
}
]
}
Configuration
Environment Variables
The server automatically detects AWS region from environment variables:
# Option 1: AWS_DEFAULT_REGION (preferred)
export AWS_DEFAULT_REGION=ap-northeast-2
# Option 2: AWS_REGION (also supported)
export AWS_REGION=ap-northeast-2
Priority order:
AWS_DEFAULT_REGIONenvironment variableAWS_REGIONenvironment variable- Fallback to
us-east-1
MCP Configuration
{
"mcpServers": {
"ebs-initializer": {
"command": "uvx",
"args": ["ebs-initializer-mcp@latest"],
"env": {
"AWS_DEFAULT_REGION": "ap-northeast-2"
}
}
}
}
Development
git clone <repository>
cd ebs-init-mcp
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
ruff check src/
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ebs_initializer_mcp-0.5.0.tar.gz.
File metadata
- Download URL: ebs_initializer_mcp-0.5.0.tar.gz
- Upload date:
- Size: 47.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2356372198111ff99cd328d547ce5df89fd58fd010de8168d6b7ae7f5a461baf
|
|
| MD5 |
2d2512214976a35744d4d0b795efbebf
|
|
| BLAKE2b-256 |
08b906cffd14047d693971355082cd468a7221c6fbe9d75b577bbbfe187f18f8
|
File details
Details for the file ebs_initializer_mcp-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ebs_initializer_mcp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78c91b5944027c043be9937d6f120e6fc3d78e0826532159f52e8c2a636f737d
|
|
| MD5 |
f667b9783a402705266074b303e46947
|
|
| BLAKE2b-256 |
e6f75c64d4290dd6d889855132265317054bd7a1d5a02c4728f96226c092b4b7
|