MCP Server to interact with multiple clouds based on Anthropic's Model Context Protocol
Project description
mcp-cloud
Model Context Protocol Server for Public Cloud environments like AWS, Azure, and more. mcp-cloud is a Python MCP server that:
- Connects to public cloud services to access resources like S3 Buckets and Azure Blobs
- Provides tools for performing CRUD operations on cloud resources
- Enables AI models to interact with cloud infrastructure securely
Installation
You can install mcp-cloud using pip:
pip install mcp-cloud
Or install from source:
git clone https://github.com/yourusername/mcp_multi_cloud.git
cd mcp-cloud
pip install -e .
Quick Start
-
Set up your environment variables (see Configuration section below)
-
Start the MCP server:
python -m mcp_cloud.main
or using uv:
uv run --with mcp mcp run main.py
-
The server will start on
http://localhost:7008by default
Configuration
Environment Variables
Create a .env file in your project root with your cloud credentials:
CLOUD_PROVIDER=aws # or azure, google
CLOUD_ACCESS_KEY=your_access_key
CLOUD_SECRET_KEY=your_secret_key
CLOUD_REGION=us-east-1 # or your preferred region
You can use the provided setup script to configure your environment:
python set_env.py
Loading Environment Variables
Unix/Linux/MacOS
source .env
Windows
PowerShell:
Get-Content .env | ForEach-Object {
if ($_ -match '^([^=]+)=(.*)$') {
$name = $matches[1]
$value = $matches[2]
Set-Item -Path "Env:$name" -Value $value
}
}
Usage
Basic Usage
-
Start the MCP server:
python -m mcp_cloud.main
-
Verify the server is running:
mcp inspect info --url http://localhost:7008
Integration with Claude Desktop
Add the following configuration to your Claude Desktop settings:
{
"mcpServers": {
"mcp-cloud": {
"command": "path/to/uv",
"args": [
"--directory",
"path/to/mcp_multi_cloud/src",
"run",
"--with",
"mcp",
"mcp",
"run",
"main.py"
],
"env": {
"CLOUD_PROVIDER": "aws",
"CLOUD_ACCESS_KEY": "your_access_key",
"CLOUD_SECRET_KEY": "your_secret_key",
"CLOUD_REGION": "us-east-1"
}
}
}
}
Available Features
Cloud Storage Operations
- List buckets/containers
- Create/delete buckets/containers
- Upload files
- Download files
- List files in a bucket/container
- Delete files
Coming Soon
- Cloud Compute operations
- Additional cloud providers
- Enhanced security features
Testing
Running Tests
-
Unit Tests:
python -m unittest test_mcp_server.py
-
Integration Tests:
# Terminal 1: Start the server python -m mcp_cloud.main # Terminal 2: Run integration tests mcp inspect test --url http://localhost:7008
For detailed testing instructions, see TESTING.md.
Security Considerations
- Never commit your
.envfile or expose your cloud credentials - Use IAM roles and minimal permissions when possible
- Regularly rotate your access keys
- Monitor your cloud resources for unexpected usage
Troubleshooting
Common Issues
-
Connection refused:
- Ensure the server is running
- Check if the port 7008 is available
- Verify firewall settings
-
Authentication failures:
- Verify your cloud credentials are correct
- Ensure environment variables are properly set
- Check if your access keys are active
-
Permission denied:
- Verify IAM roles and permissions
- Check resource-specific access policies
Getting Help
- File an issue on GitHub
- Check the documentation
- Join our community Discord
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
mcp-cloud
Model Context Protocol Server for Public Cloud mcp-cloud is designed to run a MCP Server for Public Cloud like AWS, Azure etc.
Mode Context Protocol
MCP Protocol for GenAI agents has been created by Anthropic. MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. MCP provides a standardized way to connect AI models to different data sources and tools. Refer Anthopic's MCP Protocol Introduction. Refer to the MCP Quickstart Guide for Users to learn how to use MCP
Concepts
MCP servers can provide three main types of capabilities: Resources: File-like data that can be read by clients (like API responses or file contents) Tools: Functions that can be called by the LLM (with user approval) Prompts: Pre-written templates that help users accomplish specific tasks
Initial version of MCP Server will focus on resources available of Public Clouds e.g S3 Buckets, Azure for now.
MCP Primitives The MCP protocol defines three core primitives that servers can implement:
Primitive Control Description Example Use Prompts User-controlled Interactive templates invoked by user choice Slash commands, menu options Resources Application-controlled Contextual data managed by the client application File contents, API responses Tools Model-controlled Functions exposed to the LLM to take actions API calls, data updates
Running MCP Server
python src/main.py
or
uv run --with mcp mcp run main.py
Using mcp commands & mcp inspector
mcp install main.py
mcp dev main.py
Features
0.1 [x] Cloud Storage [ ] Cloud Compute .. Coming Soon ..
Steps to Install
TODO: Update
Steps to Use
TODO:
Environment Setup
To set up your cloud storage credentials, you can use the provided environment setup script:
python src/set_env.py
This will:
- Prompt you for your cloud provider credentials
- Create a
.envfile with your settings - Verify that the environment variables are set correctly
The script will ask for:
- Cloud Provider (aws/azure/google)
- Access Key
- Secret Key
- Region (defaults to us-east-1)
Alternatively, you can manually create a .env file with the following variables:
CLOUD_PROVIDER=your_provider
CLOUD_ACCESS_KEY=your_access_key
CLOUD_SECRET_KEY=your_secret_key
CLOUD_REGION=your_region
Loading Environment Variables in System
Unix/Linux/MacOS
Using source command:
source .env
Or using export command:
export $(cat .env | xargs)
Windows
Command Prompt:
for /f "tokens=*" %a in (.env) do set %a
PowerShell:
Get-Content .env | ForEach-Object {
if ($_ -match '^([^=]+)=(.*)$') {
$name = $matches[1]
$value = $matches[2]
Set-Item -Path "Env:$name" -Value $value
}
}
Verifying Environment Variables
- Unix/Linux/MacOS:
printenv | grep CLOUD_ - Windows:
set | findstr CLOUD_
Important Notes
- The .env file should be in your project root directory
- Each variable should be on a new line
- No spaces around the = sign
- No quotes around values unless they're part of the value
Example .env file format:
CLOUD_PROVIDER=aws
CLOUD_ACCESS_KEY=your_access_key
CLOUD_SECRET_KEY=your_secret_key
CLOUD_REGION=us-east-1
Testing
The MCP Cloud Server includes comprehensive testing options to ensure everything is working correctly.
Quick Start Testing
# Run unit tests
python src/test_mcp_server.py
# Test with MCP Inspect
python src/main.py # In one terminal
mcp-inspect info --url http://localhost:7008 # In another terminal
For detailed testing instructions, including how to test with Claude Desktop, see TESTING.md.
Testing with Claude Desktop
{
"mcpServers": {
"mcp-cloud": {
"command": "<path to uv>/uv",
"args": [
"--directory",
"<path_to_mcp_cloud>e/mcp_multi_cloud/src",
"run",
"--with",
"mcp",
"mcp",
"run",
"main.py"
],
"env": {
"CLOUD_PROVIDER": "aws",
"CLOUD_ACCESS_KEY": "*******",
"CLOUD_SECRET_KEY": "*******",
"CLOUD_REGION": "us-east-1"
}
}
}
}
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 mcp_multi_cloud-0.1.0.tar.gz.
File metadata
- Download URL: mcp_multi_cloud-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52b94e84665ce8f0b53a640986602d6525be655c10ba9a195491984260da6ee0
|
|
| MD5 |
aaa655116e679f188bff00216f3d834b
|
|
| BLAKE2b-256 |
0277f1190b6812c84d1938d528085a473eea87fb45c05598423942a98c535101
|
File details
Details for the file mcp_multi_cloud-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_multi_cloud-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdd7db7307040e2b7ca32aa2de5b62e0fa0250a8a871d5c5047436c6ea592d65
|
|
| MD5 |
0f5a9618cb0bea7f501aa354ed239309
|
|
| BLAKE2b-256 |
07f9bd9d460000f58d77f6714225ef622ad9362175f73e34b9b27c75c707842e
|