This server provides an MCP (Model Context Protocol) interface that allows Claude to directly generate and execute AWS CLI commands. It acts as a bridge between the Claude AI model and your AWS resources, enabling you to perform AWS operations through natural language conversations.
Clone the repository:
git clone https://github.com/IcyKallen/aws-cli-mcp-server
cd aws-cli-mcp-server
Install dependencies:
npm install
Build the project:
npm run build
Verify AWS CLI configuration:
aws configure
Start the MCP server:
npm start
To connect this server with Claude Desktop, add the following to your claude_desktop_config.json
file:
{
"mcpServers": {
"aws-cli": {
"command": "node",
"args": [
"/path/to/aws-cli-mcp-server/dist/index.js"
]
}
}
}
The server provides several powerful tools for AWS CLI interactions:
execute-aws-command: Run AWS CLI commands
command
: AWS service (e.g., s3, ec2, lambda)subcommand
(optional): Command to execute (e.g., ls, describe-instances)options
(optional): Command options as key-value pairsget-service-details: View information about a specific AWS service
service
: AWS service name (e.g., s3, ec2, lambda)Simply ask Claude:
I need to list my S3 buckets.
Ask Claude to create a new bucket:
Create a new S3 bucket named "my-test-bucket" in the us-west-2 region.
Ask Claude about EC2 commands:
What EC2 commands are available?
The server executes AWS CLI commands with the same permissions as your configured AWS credentials. Be mindful that:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.