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
- 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.
- 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, runaws sso login --profile agent-readonly, then confirm the identity withaws 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.
- Add the proxy to your MCP client config. Use the top-level
mcpServerskey. The endpoint is a positional argument placed after the package name, and--read-onlycomes 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.
- Restart the client and list the tools. The proxy reports tools annotated with
readOnlyHint=truefor those that do not need write access. Every tool the client shows should be one you expected.
- 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-onlydefaults to False. A config copied without the flag exposes every tool the identity can use. Search the config for--read-onlyafter every edit. - A second profile can be reached. The first value in
AWS_MCP_PROXY_PROFILESis the default, but a call can select another profile through theaws_profileparameter. Keep the list to read-only profiles only. - The environment variable beats the flag.
AWS_MCP_PROXY_PROFILEStakes precedence over--profileandAWS_PROFILEwhen it is set. If the wrong profile is active, look at this variable first. - Unpinned versions change behavior.
@latestpulls the newest package on each launch. Pin a version inargsonce 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.
Related skills in this catalog
Platform Score is our assessment under a published method. It is not a safety guarantee.
Related guides
- Cloudflare MCP servers: endpoints, access and permissions
- Notion MCP: Agent Read and Write Access and How to Limit It
- Python MCP server quickstart: build and connect one locally
- Debug an MCP Server with MCP Inspector
- Atlassian MCP Server Guide for Jira and Confluence
- Context7 MCP: Feed Current Library Docs to an Agent
Sources
- https://docs.aws.amazon.com/agent-toolkit/latest/userguide/getting-started-aws-mcp-server.html (accessed 2026-11-22)
- https://github.com/aws/mcp-proxy-for-aws (accessed 2026-11-22)
- https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html (accessed 2026-11-22)
This page is not offered to search engines yet: The content file does not mark this page indexable yet.