AWS MCP Server: Connect an Agent Read-Only First

How to connect an MCP client to an AWS MCP server with IAM signing, start read-only, and check that write tools are gone before the agent runs.

Updated · Markdown version

Connect an agent to an AWS MCP server by running the MCP proxy for AWS in your client config, pointing it at the server's SigV4 endpoint, and signing with a named AWS profile. Start with --read-only and a read-only IAM identity, so the agent can inspect resources before it can change them.

The guide below assumes you already have an MCP client such as Claude Desktop, and an AWS account where you can create an IAM identity. The proxy examples follow its README as of 2026-11-22; check the repository for newer flags.

Steps

  1. Create a read-only identity for the agent. Create an IAM user or role that has only the read actions the agent needs, and do not reuse an admin profile. AWS describes IAM as the service for setting up identities and granting them access to the resources they need, so the agent gets its own identity with its own limits.
  1. Create a named AWS profile for that identity. Store the identity's credentials in your AWS CLI configuration under a dedicated name, such as agent-readonly. For SSO, run aws sso login --profile agent-readonly, then confirm the identity with aws sts get-caller-identity --profile agent-readonly. AWS's sign-in guide also covers IAM access keys and cross-account roles. The proxy reads the standard credential chain, so keys stay out of the MCP config file.
  1. Add the proxy to your MCP client config. Use the top-level mcpServers key. The endpoint is a positional argument placed after the package name, and --read-only comes after it:
{
  "mcpServers": {
    "aws": {
      "command": "uvx",
      "args": ["mcp-proxy-for-aws-cli@latest", "https://aws-mcp.us-east-1.api.aws/mcp", "--read-only"],
      "env": {
        "AWS_MCP_PROXY_PROFILES": "agent-readonly"
      }
    }
  }
}

The example uses the us-east-1 endpoint. For another Region, change the Region in the hostname, such as https://aws-mcp.eu-west-1.api.aws/mcp, as AWS's setup page shows.

  1. Restart the client and list the tools. The proxy reports tools annotated with readOnlyHint=true for those that do not need write access. Every tool the client shows should be one you expected.
  1. Check the result. Ask the agent to describe one resource in an account you can safely read. If the call succeeds and the tool list has no write-capable entries, the setup works. Only then add write access, in a separate profile and config entry.

Pitfalls

  • Omitting the flag grants write tools. --read-only defaults to False. A config copied without the flag exposes every tool the identity can use. Search the config for --read-only after every edit.
  • A second profile can be reached. The first value in AWS_MCP_PROXY_PROFILES is the default, but a call can select another profile through the aws_profile parameter. Keep the list to read-only profiles only.
  • The environment variable beats the flag. AWS_MCP_PROXY_PROFILES takes precedence over --profile and AWS_PROFILE when it is set. If the wrong profile is active, look at this variable first.
  • Unpinned versions change behavior. @latest pulls the newest package on each launch. Pin a version in args once you have tested the setup.
  • `--skip-auth` removes signing. It sends unsigned requests when no AWS credentials are found. Leave it out; a failed credential lookup should stop the call.

When to use a skill instead

Setup happens once, but every later action the agent takes with that access is where repeatable checks earn their keep. infrastructure-as-code-review reads the Terraform, OpenTofu, CloudFormation or Kubernetes changes an agent drafts, which matters when you would otherwise apply them without a second look. coding-agent-guardrails fits a coding agent that also edits a repository, screening its moves for risky git operations and leaked credentials. Use these for the work that happens after a read-only connection, not as a replacement for the IAM limits in step 1.

FAQ

What is an MCP server? Think of an MCP server as a small service that hands a client a set of callable tools, readable resources and reusable prompts. The client connects, reads that list, and invokes an entry when the model asks for it. Because the protocol is openly specified, one server can be used by several clients.

Can I use the AWS MCP Server without OAuth? Yes. AWS offers a SigV4 option that runs the MCP Proxy for AWS locally, and the proxy signs each request with your AWS CLI credentials, so the client skips the OAuth flow. Choose it when you need read-only mode or switch between accounts, because AWS lists both as reasons to use SigV4.

How do I stop an agent from making changes through the AWS server? Use two layers: run the proxy with --read-only, and attach a read-only IAM identity to the profile it uses. The flag hides write-capable tools, and the IAM policy limits what any call can do even if a tool slips through.

Platform Score is our assessment under a published method. It is not a safety guarantee.

Next steps

  1. Cloudflare MCP servers: endpoints, access and permissions Read next.
  2. Notion MCP: Agent Read and Write Access and How to Limit It Read next.
  3. All guides by topic Browse everything.

Sources

This page is not offered to search engines yet: The content file does not mark this page indexable yet.