AWS CLI
About
Interact with AWS services using the AWS CLI. Requires AWS CLI to be installed and configured.
Details
- Author
- runjivu
- Categories
- Cloud Service, Infrastructure
Jump to
Setup
Install AWS CLI in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/runjivu/use_aws_mcp
Follow the installation instructions in the repository README, then restart your MCP client.
🌟 amazon-q-cli is great, and it is great because it hasuse_awsMCP tool to interact with AWS API.
💡 Wouldn't it be greater if thisuse_awswas portable, and use it across different AI tools, whichever you're currently using?
⚡use_aws_mcpis a standalone Model Context Protocol (MCP) server that provides AWS CLI functionality through a standardized interface.
This server replicates the functionality of theuse_awstool from the Amazon Q Developer CLI.
- AWS CLI Integration: Execute AWS CLI commands with proper parameter handling
- Safety Checks: Automatic detection of read-only vs. write operations
- User Agent Management: Proper AWS CLI user agent setup for tracking
- Parameter Formatting: Automatic conversion of parameters to kebab-case for CLI compatibility
- Error Handling: Comprehensive error handling and output formatting
- MCP Protocol: Full Model Context Protocol compliance
- Human-Readable Descriptions: Rich command descriptions using terminal formatting
- 🦀Rust (1.70 or later), Cargo
- for MacOS and linux, install withcurl https://sh.rustup.rs -sSf | sh
The binary will be available attarget/release/use_aws.
To use this server with an MCP client, first install it using Cargo:
{ "mcpServers": { "use_aws_mcp": { "name": "use_aws_mcp", "command": "use_aws_mcp", "timeout": 300, "env": {}, "disabled": false } } }
⚠️ Important Caveat for Using MCP Client
With q cli, mcp clients are shell process, so credentials env likeAWS_DEFAULT_PROFILEare automatically transfered to mcp server.
However, non shell mcp clients like cursor cannot take advantage of this, so it is best advised to require mcp clients directly to use specific aws profile.
- Set mcp.json above
- Set API key, or login to specific profile usingaws sso login
- Ask away mcp client aws related questions! and be sure to require it to use specific profile.
The server communicates via stdin/stdout using JSON-RPC protocol.
The server provides human-readable descriptions of AWS CLI commands. You can see this in action by running the example:
Running aws cli command: Service name: s3 Operation name: list-buckets Parameters: - max-items: "10" - query: "Buckets[].Name" Profile name: development Region: us-west-2 Label: List S3 buckets with query ✅ This command is read-only (no acceptance required)
The server provides a single tool calleduse_awswith the following schema:
{ "name": "use_aws", "description": "Execute AWS CLI commands with proper parameter handling and safety checks", "inputSchema": { "type": "object", "properties": { "service_name": { "type": "string", "description": "AWS service name (e.g., s3, ec2, lambda)" }, "operation_name": { "type": "string", "description": "AWS CLI operation name (e.g., list-buckets, describe-instances)" }, "parameters": { "type": "object", "description": "Optional parameters for the AWS CLI command", "additionalProperties": true }, "region": { "type": "string", "description": "AWS region (e.g., us-west-2, eu-west-1)" }, "profile_name": { "type": "string", "description": "Optional AWS profile name" }, "label": { "type": "string", "description": "Optional label for the operation" } }, "required": ["service_name", "operation_name", "region"] } }
{ "name": "use_aws", "arguments": { "service_name": "s3", "operation_name": "ls", "region": "us-west-2" } }
{ "name": "use_aws", "arguments": { "service_name": "ec2", "operation_name": "describe-instances", "region": "us-west-2", "parameters": { "instance-ids": "i-1234567890abcdef0" } } }
{ "name": "use_aws", "arguments": { "service_name": "lambda", "operation_name": "list-functions", "region": "us-west-2", "profile_name": "development" } }
The server automatically detects read-only operations based on the operation name prefix:
- Read-only prefixes:get,describe,list,ls,search,batch_get
- Write operations: All other operations require explicit user acceptance
Large outputs are automatically truncated to prevent memory issues, with a maximum response size of 100KB.
# Run the description demo cargo run --example description_demo
- src/lib.rs: Core library with types and constants
- src/error.rs: Error handling types
- src/use_aws.rs: Core AWS CLI functionality (replicated from original)
- src/mcp_server.rs: MCP server implementation
- src/main.rs: Binary entry point
- examples/description_demo.rs: Example demonstrating command descriptions
If you do not have Cargo (the Rust package manager) installed, you can get it by installing Rust usingrustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Follow the on-screen instructions to complete the installation. After installation, restart your terminal and ensure Cargo is available by running:
You should see the installed Cargo version printed.
This project is distributed as a Rust crate. The following dependencies are managed automatically by Cargo:
You do not need to install these manually; Cargo will handle them during installation.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This server executes AWS CLI commands, which may have security implications:
- Ensure proper AWS credentials and permissions
- Review all commands before execution
- Use read-only operations when possible
- Consider running in a restricted environment
- AWS CLI not found: Ensure AWS CLI is installed and in PATH
- Permission denied: Check AWS credentials and permissions
- Invalid region: Verify the region name is correct
- Parameter errors: Check parameter names and values
Run with debug logging to see detailed information:
RUST_LOG=use_aws=debug ./target/release/use_aws
Navigate your Aiven projects and interact with the PostgreSQL®, Apache Kafka®, ClickHouse® and OpenSearch® services
Yunxiao MCP Server provides AI assistants with the ability to interact with the Yunxiao platform.
Get prescriptive CDK advice, explain CDK Nag rules, check suppressions, generate Bedrock Agent schemas, and discover AWS Solutions Constructs patterns.
This AWS Labs Model Context Protocol (MCP) server for CloudTrail enables your AI agents to query AWS account activity for security investigations, compliance auditing, and operational troubleshooting.
Core AWS MCP server providing prompt understanding and server management capabilities.
Analyze CDK projects to identify AWS services used and get pricing information from AWS pricing webpages and API.
Query and analyze your Axiom logs, traces, and all other event data in natural language
Manage and interact with Microsoft Azure services.
Bastion: External Attack Surface Monitoring
Ask your AI assistant about your attack surface: run scans, catch expiring certificates and domains, triage findings, and generate reports.
Agent-ready global image CDN that AI agents can install and operate through MCP.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

