Setting up the AWS MCP Server
If you already have an AWS account, skip to Set up the AWS MCP Server. If you are new to AWS,
sign up for an AWS account
Set up the AWS MCP Server
To set up AWS MCP Server, use the steps in the following sections.
Topics
Step 1: (If applicable) Remove conflicting MCP servers
If you are currently using the AWS API MCP Server or AWS Knowledge MCP Server, we recommend switching to the AWS MCP Server. The AWS MCP Server is a managed remote MCP server that reduces setup and maintenance effort and offers enhanced security controls through IAM condition keys.
To switch, remove the older servers from your MCP client configuration to avoid tool conflicts that can confuse AI agents and reduce performance.
To remove existing AWS MCP servers:
-
Open your MCP client configuration file (for example,
~/.kiro/settings/mcp.jsonfor Kiro). -
Remove any entries for these servers:
aws-api-mcp-serveraws-knowledge-mcp-server
-
Save the configuration file.
-
Restart your MCP client to apply the changes.
Step 2: Configure AWS credentials
-
Install the AWS CLI by following the instructions at Installing the AWS CLI. You need version
2.32.0or later. -
Run the following command and follow the prompts to sign in:
aws loginThis automatically rotates your credentials every 15 minutes, keeping your session valid for up to 12 hours without manual intervention.
-
Verify your credentials are working:
aws sts get-caller-identity -
Install uv (if not already installed):
On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | shWindows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
For other credential methods (SSO, IAM access keys, cross-account roles), see Sign in with the AWS CLI.
Step 3: Configure your MCP client
AWS MCP Server is available in the following AWS Regions:
-
US East (N. Virginia) –
us-east-1:https://aws-mcp.us-east-1.api.aws/mcp -
Europe (Frankfurt) –
eu-central-1:https://aws-mcp.eu-central-1.api.aws/mcp
The configuration examples below use the MCP
Proxy for AWS
The endpoint Region determines which MCP server you connect to, while the
AWS_REGION metadata parameter sets the default Region for the AWS operations
the server performs on your behalf. These can be different — for example, you can connect
to the us-east-1 endpoint while operating on resources in us-west-2.
Set your default AWS Region by adding the --metadata parameter with AWS_REGION. Without
this setting, all AWS operations default to us-east-1.
Region behavior:
-
Without
--metadataandAWS_REGION: Operations default tous-east-1 -
With
--metadataandAWS_REGION: Operations use your specified Region -
In queries: You can override by specifying a Region (example: "list my EC2 instances in eu-west-1")
Step 4: Test your connection
-
Start your MCP client (Kiro CLI, Cursor, Claude Desktop, etc.).
-
Wait for the MCP server to initialize (this may take a few minutes on first connection).
-
Test the connection by asking your AI assistant:
Example: What AWS Regions are available?
-
Verify that tools are loaded by running (in Kiro CLI):
/toolsOr to see installed MCP servers:
/mcp
You should see tools like aws___search_documentation and aws___retrieve_skill listed. For
more information about the tools, see Understanding the MCP Server tools.
Troubleshooting authentication errors
Authentication errors can prevent the MCP server from initializing, which results in AWS MCP tools not being available to AI agents. If your AI agent is not using AWS MCP tools, an expired or missing credential is the most likely cause.
Use the following table to identify and resolve common authentication errors.
| Error | Cause | Resolution |
|---|---|---|
ExpiredTokenException: Your AWS session token has expired. |
Your temporary AWS credentials have expired. This is the most common authentication error, typically caused by short-lived session tokens (default 1 hour) expiring during development. |
Refresh your credentials based on your authentication method:
After refreshing, restart your MCP client to re-initialize the server. |
UnrecognizedClientException: The security token included in the request
is not recognized. |
Your credentials are invalid. This can happen when credentials have been revoked, are from a different AWS partition, are malformed, or belong to a deleted IAM user or role. |
Verify your credentials are valid:
|
InvalidSignatureException: The request signature we calculated does not
match the signature you provided. |
The SigV4 signature does not match. Common causes include credentials scoped to the wrong service or Region, clock skew on your machine, or a request body that was modified after signing. |
Try the following steps:
|
| No AWS credentials found. | AWS credentials are not configured on your machine, or the credential provider chain cannot locate them. |
Configure your credentials by following Step 2: Configure AWS credentials.
We recommend using |
Note
To learn more about how AWS IAM authorizes AWS MCP Server requests, including how to use
IAM condition context keys to restrict agent actions, see
Understanding
IAM for managed AWS MCP servers