AWS API MCP server: what read-only mode lets call_aws hand over, and how to make your agent ask

The 3 tools of AWS Labs' AWS API MCP Server, checked by running version 1.6.1 against a local stand-in for AWS: which commands READ_OPERATIONS_ONLY lets through (secrets, decrypted parameters, signed links), what REQUIRE_MUTATION_CONSENT asks about, and the Claude Code settings that make call_aws ask.

Checked on by running awslabs.aws-api-mcp-server 1.6.1 (PyPI) from awslabs.aws-api-mcp-server and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.

The short answer

Its read-only mode follows IAM's access levels, so secrets, decrypted parameters and registry passwords count as reads. Run it read-only with no file access and a role that is denied those calls, and make every call_aws ask.

Can run on their own
2
Should ask a person
1

Which AWS server this is

This is the AWS API MCP Server from AWS Labs, published on PyPI as awslabs.aws-api-mcp-server and started with uvx. It is official, though its README now calls it superseded by the hosted AWS MCP Server, and its tool descriptions open with a deprecation notice. It has two tools, and a third with EXPERIMENTAL_AGENT_SCRIPTS=true. Nearly everything happens in one of them: call_aws takes any AWS CLI command and runs it with your credentials. We ran version 1.6.1 with fake keys against moto, a local stand-in for AWS, gave it the commands below, and read its code for the rules behind each answer.

What READ_OPERATIONS_ONLY counts as a read

With READ_OPERATIONS_ONLY=true, the server looks each operation up in AWS’s Service Authorization Reference and runs it if its access level is anything but Write. It downloads that reference at start, without credentials, and will not start without it. Reading a secret is not a write, so 9 of the commands we tried ran in read-only mode, and most of them handed back a secret, a token or a link that works without keys. The server’s own list adds s3 presign, ecr get-login-password, eks get-token and rds generate-db-auth-token as reads. It does mark the STS calls and iam create-access-key as writes.

CommandRead-onlyConsentWhat came back
aws secretsmanager get-secret-value --secret-id prod/dbRanRanThe secret's value, in full.
aws ssm get-parameter --name /prod/api-key --with-decryptionRanRanThe SecureString parameter, decrypted.
aws ssm get-parameters-by-path --path /prod --with-decryptionRanRanEvery parameter under the path, decrypted.
aws lambda get-function-configuration --function-name billingRanRanThe function's environment variables, with the API key we had put there.
aws s3 presign s3://vg-demo/report.txtRanRanA signed link that downloaded the object without any keys, valid for an hour.
aws ecr get-login-passwordRanRanThe container registry password.
aws eks get-token --cluster-name demoRanRanA bearer token for the cluster's Kubernetes API.
aws rds generate-db-auth-token --hostname db.example.com --port 5432 --username adminRanRanA database sign-in token for the admin user.
aws s3api get-object --bucket vg-demo --key report.txt obj.txtRanRanWrote the object into the working directory, over a file of the same name.
aws s3 cp s3://vg-demo/report.txt dl.txtRefusedAskedThe same download as get-object, but s3 cp is not on the read list.
aws sts get-session-tokenRefusedAskedThe server marks the STS calls that hand out keys as writes.
aws iam create-access-key --user-name aliceRefusedAskedWith neither setting it ran and returned the new secret key.
aws lambda invoke --function-name billing resp.jsonRefusedAskedRuns the function's code.
aws ssm send-command --document-name AWS-RunShellScript --instance-ids i-1234567890abcdef0 --parameters commands=whoamiRefusedAskedRuns a shell command on the instance.
aws ec2 terminate-instances --instance-ids i-1234567890abcdef0RefusedAskedOrdinary writes and deletes are refused or asked, as they should be.
aws configure listRefusedRefusedaws configure and aws history are refused in every mode.

Read-only is READ_OPERATIONS_ONLY=true; consent is REQUIRE_MUTATION_CONSENT=true with every question declined. It uses the same list, so it asks exactly where read-only mode refuses and never about a secret. The question is an MCP elicitation; when our client could not answer one, the command was refused, not run. With neither setting, the writes we tried ran, iam create-access-keyincluded.

A read that writes files

s3api get-object is a read, and it takes a file name to save the object to. In read-only mode it overwrote a file of ours in the working directory without asking. Paths outside AWS_API_MCP_WORKING_DIR, relative or absolute, were refused. With AWS_API_MCP_ALLOW_UNRESTRICTED_LOCAL_FILE_ACCESS=no-access the same call was refused, and - as the file name returned the object’s body in the answer instead.

Safe setup

  • A profile of its own, set with AWS_API_MCP_PROFILE_NAME, for a role that can read what the agent needs and nothing more. The README calls IAM the primary control, and the table shows why.
  • ~/.aws/aws-api-mcp/mcp-security-policy.json with a denyList and an elicitList. With aws secretsmanager get-secret-value on the deny list it was refused even in the default mode. It matches the operation only, so --with-decryption cannot be singled out.
  • An explicit deny, in the role’s policy, on the calls in our table that returned secrets. In IAM no allow can override it. The list is a start, not complete, and s3 presign, eks get-token and rds generate-db-auth-token are signed on your machine, so IAM can only refuse what the result is later used for.
{
  "Effect": "Deny",
  "Action": ["secretsmanager:GetSecretValue", "secretsmanager:BatchGetSecretValue",
    "ssm:GetParameter", "ssm:GetParameters", "ssm:GetParametersByPath",
    "ssm:GetParameterHistory", "lambda:GetFunction",
    "lambda:GetFunctionConfiguration", "lambda:ListFunctions",
    "kms:Decrypt", "ecr:GetAuthorizationToken"],
  "Resource": "*"
}

All 3 tools

Hard to undo1 toolAsk a person every time. Consider two people, or deny it if the agent never needs it.

  • call_aws

    Execute AWS CLI commands with validation and proper error handling.

    Server says: destructive

    Our call: Runs any AWS CLI command the agent writes. With READ_OPERATIONS_ONLY on, it still returned a Secrets Manager secret, decrypted SSM parameters and Lambda environment variables, and wrote a downloaded object into the working directory.

Only looks2 toolsLet it run. It only looks.

  • suggest_aws_commands

    Suggest AWS CLI commands based on a natural language query.

    Server says: read-only

    Our call: Sends the request, in words, to an AWS endpoint (api-mcp.global.api.aws) and returns suggested commands. It runs none of them and needs no credentials.

  • get_execution_plan

    Get the execution plan for a compiled AWS workflow.

    Server says: read-only

Let the reads run in Claude Code

Claude Code asks before every MCP tool it has no rule for. Added as aws-api, this server’s tools are named mcp__aws-api__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.

{
  "permissions": {
    "allow": [
      "mcp__aws-api__suggest_aws_commands",
      "mcp__aws-api__get_execution_plan"
    ]
  }
}

The command that adds the server:

claude mcp add aws-api -e AWS_REGION=us-east-1 -e AWS_API_MCP_PROFILE_NAME=agent-readonly -e READ_OPERATIONS_ONLY=true -e AWS_API_MCP_ALLOW_UNRESTRICTED_LOCAL_FILE_ACCESS=no-access -- uvx awslabs.aws-api-mcp-server@latest

Send the rest to a person, not the terminal

A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "mcp__aws-api__(?!(suggest_aws_commands|get_execution_plan)$).*",
        "hooks": [
          { "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
        ]
      }
    ]
  }
}

Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.

Any MCP client: put the proxy in front

Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "aws-api": {
      "args": [
        "-y",
        "https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
        "mcp-proxy",
        "--name",
        "aws-api",
        "--look-only",
        "suggest_aws_commands,get_execution_plan",
        "--",
        "uvx",
        "awslabs.aws-api-mcp-server@latest"
      ],
      "command": "npx",
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_API_MCP_PROFILE_NAME": "agent-readonly",
        "READ_OPERATIONS_ONLY": "true",
        "AWS_API_MCP_ALLOW_UNRESTRICTED_LOCAL_FILE_ACCESS": "no-access"
      }
    }
  }
}

Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):

npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktop

The same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__aws-api, keeps Claude Code from asking a second time in the terminal:

claude mcp add aws-api -e AWS_REGION=us-east-1 -e AWS_API_MCP_PROFILE_NAME=agent-readonly -e READ_OPERATIONS_ONLY=true -e AWS_API_MCP_ALLOW_UNRESTRICTED_LOCAL_FILE_ACCESS=no-access -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name aws-api --look-only suggest_aws_commands,get_execution_plan -- uvx awslabs.aws-api-mcp-server@latest

When the agent should write

Claude Code allow rules match a tool, not its arguments, so every call_aws asks, reads included. The person who answers sees the whole CLI command. For changes, add a second server with its own name, such as aws-api-write, and a role that can write only what the task needs. If your client answers MCP elicitations, turn on REQUIRE_MUTATION_CONSENT there as a second check; a client that cannot answer gets a refusal, not a write.

See it before you decide.

The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.