Get the FREE Ultimate OpenClaw Setup Guide →

aws

MCP (Model context protocol) server to connect MCP client such as Claude Desktop.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio codewithdpk-aws-mcp-server node /ABSOLUTE/PATH/TO/PARENT/FOLDER/aws-mcp-server/build/index.js \
  --env AWS_ACCESS_KEY_ID="your_access_key_id" \
  --env AWS_ACCESS_SECRET_KEY="your_secret_access_key"

How to use

This MCP server provides access to AWS EC2 instance data. It exposes a tool named get-aws-instances that retrieves a list of running EC2 instances for a specified AWS region, including details such as Instance ID, instance type, public and private IPs, and current state. The server is implemented in Node.js and builds to a JavaScript runtime, allowing clients using the MCP protocol to query for instance information in a structured way. To use it, connect to the server via an MCP client and invoke the get-aws-instances tool with a region string (for example, ap-south-1). The server will return a list of instances in that region along with their metadata, and it supports multiple availability zones within the region.

Example tool usage:

server.tool("get-aws-instances", { region: "ap-south-1" })

How to install

Prerequisites:

  • Node.js 18 or later
  • npm (comes with Node.js)
  • AWS account with IAM credentials that have EC2 read permissions

Step-by-step installation:

  1. Clone the repository and navigate into it: git clone https://github.com/codewithdpk/aws-mcp-server.git cd aws-mcp-server

  2. Install dependencies: npm install

  3. Configure AWS credentials: Create a .env file in the project root with:

    AWS_ACCESS_KEY_ID=your_access_key_id AWS_ACCESS_SECRET_KEY=your_secret_access_key

  4. Build the server: npm run build

  5. Run the server locally (example): node build/index.js

  6. If you need to run via MCP tooling, ensure the mcp_config references the built entry point and environment variables are provided as needed.

Additional notes

Tips and common issues:

  • Ensure AWS credentials have at least EC2 read permissions to list instances.
  • If the server cannot access AWS, verify that AWS_REGION or the region parameter is correctly specified when calling the tool.
  • When deploying, consider using a dedicated IAM role or user with restricted permissions for security.
  • The server relies on the AWS SDK; ensure network access to AWS services from your host or deployment environment.
  • For Claude Desktop integration (if used), configure the mcpServers entry in claude_desktop_config.json to point to the built index.js as described in the README. Ensure you supply valid absolute paths.
  • If you modify code, rebuild with npm run build to generate updated artifacts.

Related MCP Servers

Sponsor this space

Reach thousands of developers