PlugWiki
iam-policy-autopilot logo

IAM Policy Autopilot MCP Server: Setup for Claude, Cursor and Other Apps

Official · by Amazon Web ServicesLocal
GetPyPIiam-policy-autopilotawslabs/iam-policy-autopilot

Lets your coding assistant write AWS IAM policies from your application code or a Terraform plan, and fix AccessDenied errors.

IAM Policy Autopilot reads your source code on your computer and works out which AWS permissions it needs. Your assistant then gets a baseline IAM policy to refine, instead of guessing actions by hand. It is an open source tool from AWS Labs that runs locally and uses your AWS CLI profile. Review every policy before you deploy it, because the generated policy is a starting point, and the assistant may change it afterwards.

Good for

  • Developers who build on AWS and keep hitting AccessDenied errors
  • Teams writing IAM roles for Lambda, ECS or other apps in Python, Go, TypeScript, JavaScript or Java
  • Terraform users who need the permissions a plan will use
  • Kiro, Claude and Cursor users who want policies drafted next to the code

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install iam-policy-autopilot MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the iam-policy-autopilot MCP server to Claude Code. Run this command:
    
    claude mcp add iam-policy-autopilot -e AWS_PROFILE=<AWS_PROFILE> -e AWS_REGION=<AWS_REGION> -- uvx iam-policy-autopilot mcp-server
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python).

The server is the mcp-server subcommand. Install uv first, or install the package with pip and run iam-policy-autopilot mcp-server.

From the project README. Source.

Tools

  • Writes a baseline IAM policy from your source files or a Terraform plan

    Reads the files you point it at (Python, Go, TypeScript, JavaScript or Java, or a Terraform plan in JSON) and lists the AWS actions the code calls. It returns IAM policy documents you can review. You can name the AWS services you use so the result is tighter, and set a region and account ID for the resource names.

    Try: “Generate an IAM policy for the Lambda function in src/handler.py. It uses S3 and DynamoDB in us-east-1.”

    Files · generate_application_policies

  • Proposes the policy change that would fix an AWS AccessDenied error

    Takes the AccessDenied error text from AWS and returns a policy that would allow the blocked action. It only proposes the policy and does not change your account. The tool asks the assistant to show you the policy first.

    Try: “I got 'User arn:aws:iam::123456789012:user/test is not authorized to perform s3:GetObject'. What policy would fix it?”

    Read · generate_policy_for_access_denied

  • Applies the fix for an AccessDenied error to the user or role in your AWS account

    Adds the proposed policy to the AWS user or role named in the error, using your AWS credentials. It asks you to confirm before it applies anything, and you can narrow or widen the resource it covers. Run it only after you have reviewed the policy from the previous tool.

    Try: “Apply that fix to the role, but limit it to the reports bucket.”

    Write · fix_access_denied

Read from the source code

Permissions

medium risk · 4 things to watch

Medium risk

The fix tool can attach an IAM policy to a user or role in your AWS account, and the policies it drafts can be broader than your code needs. Use an AWS profile with limited IAM rights and review each policy before you approve it.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • One tool can change IAM permissions in your account

    The fix tool attaches a policy to the user or role named in the error and asks you to confirm first. Use a profile with only the IAM rights you accept, and read the policy before you agree. github.com

  • Generated policies may be broader than your code needs

    Static analysis can include actions from other services with matching method names. Pass service hints and review the policy before deploying it. github.com

  • Your assistant can edit the policy afterwards

    The assistant may add resource names or key IDs from its own reading of your code. Those changes are not from the analysis, so check the final template. github.com

  • Needs internet access to fetch AWS metadata

    It fetches AWS service data over HTTPS at runtime. Allow the endpoint in the README if your network restricts outbound traffic. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Talks toAWS service reference endpoint (servicereference.us-east-1.amazonaws.com) for policy metadata. AWS IAM, when you apply a fix
Sign-in and keysUses your AWS CLI profile and region (AWS_PROFILE, AWS_REGION). No separate API key.

Questions

Is the IAM Policy Autopilot MCP server official?

Yes. It is published by AWS Labs, the open source arm of AWS, under the Apache-2.0 license.

Does it need an AWS account or API key?

No separate key. Generating policies from code runs locally. The fix tool uses the AWS credentials from your CLI profile, set with AWS_PROFILE and AWS_REGION.

Does it send my code to AWS?

The README says it analyzes your code locally. It only fetches AWS service metadata from a public AWS endpoint at runtime.

Can it change my AWS account?

Yes, one tool can. It attaches a policy to the user or role in an AccessDenied error, and asks you to confirm first. There is no read-only switch, so leave that tool unapproved in your client if you only want drafts.

Which languages does it support?

Python, Go, TypeScript, JavaScript and Java, plus Terraform plans in JSON form. Native .tf files are not yet supported as a direct input.

Which apps can use it?

The README gives setup for Kiro, Kiro CLI and Claude Desktop. It runs over stdio by default, so other apps that start local servers should work too. See the install box for your app.

How is it different from the AWS MCP server?

The AWS MCP server gives an assistant access to AWS docs and APIs. This one is narrower: it drafts IAM policies from your code and fixes AccessDenied errors.

Information

updated Nov 2, 2026

Publisher
Amazon Web Services (official)
Package
iam-policy-autopilot
Registry
PyPI
Transport
stdio, Streamable HTTP
Auth
None
License
Apache-2.0
Last commit
Oct 29, 2026
Open issues
30

GitHubChangelogIssues

Other AWS MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 2
  1. github.com · github.com
  2. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.