AWS CLI MCP Server

by ClockworkCubed

139 downloads
Not rated
GitHub

About

MCP server that acts as a thin wrapper around the local AWS CLI command

Details

Author
ClockworkCubed
Downloads
139
Categories
Developer Tools

- Thin wrapper that proxies commands directly to local AWS CLI
- Security by respecting existing AWS CLI credentials and permissions
- Compatibility with all AWS CLI commands and services
- Uses existing AWS CLI profiles and configurations
- Clean error handling and structured JSON output
- No additional authentication beyond existing AWS CLI setup

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name AWS CLI MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Python 3.10+ and the AWS CLI, then clone the repository, run pip install -e . to install dependencies, and start the server with python aws_mcp.py. The server runs in stdio mode and exposes a single tool, execute_aws_command_tool, which accepts an args array (e.g., ["sts", "get-caller-identity"]) and returns the command’s stdout, stderr, and exit code. Connect any MCP-compatible client (e.g., Claude Desktop) to the server via stdio transport.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "aws cli mcp server": {
            "aws-cli-mcp": {
                "command": "python",
                "args": [
                    "aws_mcp.py"
                ]
            }
        }
    }
}

McpServers

{
    "aws-cli-mcp": {
        "command": "python",
        "args": [
            "aws_mcp.py"
        ]
    }
}
# AWS CLI MCP Server [![Tests](https://github.com/ClockworkCubed/aws-cli-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/ClockworkCubed/aws-cli-mcp/actions/workflows/test.yml) A Model Context Protocol (MCP) server that acts as a thin wrapper around the local AWS CLI command, providing AI assistants with secure access to AWS services through the familiar AWS CLI interface. ## Overview This MCP server allows AI assistants to interact with AWS services by proxying commands to the local AWS CLI installation. It provides a secure, controlled way for AI systems to manage AWS resources while leveraging existing AWS CLI configurations and credentials. ## Features - **Thin Wrapper**: Direct proxy to local AWS CLI commands - **Security**: Respects existing AWS CLI credentials and permissions - **Compatibility**: Works with all AWS CLI commands and services - **Configuration**: Uses existing AWS CLI profiles and configurations ## Prerequisites - AWS CLI installed and configured locally - Valid AWS credentials (via `aws configure`, IAM roles, or environment variables) ## Installation ### Prerequisites 1. **Python 3.10+** - Required for FastMCP compatibility 2. **AWS CLI** - Must be installed and configured locally ```bash # Install via homebrew (macOS) brew install awscli # Or via pip pip install awscli # Configure with your credentials aws configure ``` ### Install Dependencies ```bash # Clone the repository git clone <repository-url> cd aws-cli-mcp # Install dependencies pip install -e . ``` ## Usage ### Running the MCP Server Start the MCP server using Python: ```bash python aws_mcp.py ``` The server will start and log: ``` INFO Starting MCP server 'aws-cli-mcp' with transport 'stdio' ``` The server runs in stdio mode and communicates via the Model Context Protocol over standard input/output. ### Using with MCP Clients Once running, the server exposes one tool: - **`execute_aws_command_tool`** - Execute any AWS CLI command with structured JSON output #### Tool Parameters ```json { "args": ["service", "command", "--option", "value"] } ``` #### Example Usage ```json { "tool": "execute_aws_command_tool", "arguments": { "args": ["sts", "get-caller-identity"] } } ``` #### Response Format ```json { "stdout": "{\n \"UserId\": \"AIDACKCEVSQ6C2EXAMPLE\",\n \"Account\": \"123456789012\",\n \"Arn\": \"arn:aws:iam::123456789012:user/example\"\n}", "stderr": "", "exitCode": 0 } ``` ### Connecting to LLMs The server can be used with any MCP-compatible LLM client: 1. **Claude Desktop**: Add to your MCP configuration 2. **Custom MCP Clients**: Connect via stdio transport 3. **Development**: Use MCP SDKs to interact programmatically ### Error Handling The server provides helpful error messages: - **AWS CLI not installed**: Clear installation instructions - **Invalid commands**: Full AWS CLI error details preserved - **Credential issues**: AWS CLI error messages passed through - **JSON parsing**: Graceful handling of non-JSON responses ## Status ✅ **Fully Functional** - MCP server implementation complete with: - FastMCP protocol compliance - AWS CLI tool registration - Command-line server startup - Comprehensive error handling ## Security Considerations - The server only has access to AWS resources that the local AWS CLI can access - All AWS CLI security mechanisms (IAM policies, MFA, etc.) remain in effect - No additional authentication is required beyond existing AWS CLI setup
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.