IAM Policy Autopilot MCP

An MCP server and CLI from AWS that builds baseline IAM policies from application code or a Terraform plan and resolves AccessDenied errors

  • 501 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficial

Extended access

Why this level

  • The tool reads the project's source code and calls the network for AWS service metadata
  • The fix-access-denied command with the --yes flag changes IAM policies in an AWS account without confirmation, and uploading policies requires AWS credentials
All reasons and checks

awslabs/iam-policy-autopilot

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/iam-policy-autopilot

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The tool reads the project's source code and calls the network for AWS service metadata
  • The fix-access-denied command with the --yes flag changes IAM policies in an AWS account without confirmation, and uploading policies requires AWS credentials

This is third-party code. Review the repository files before installing.

What it does

The tool reads application code locally, finds AWS SDK calls and builds identity-based IAM policies for the application's roles. The analysis is static and deterministic, so results repeat from run to run. It supports Go, Java, JavaScript, TypeScript and Python with Boto3. A policy can also come from a Terraform plan in JSON, produced with terraform show -json, while native .tf files are not read directly yet. The policy is a baseline, meant to be refined as the application grows. The --explain flag with an action pattern such as s3:*, shows which operation in the code produced a permission. The --service-hints flag limits the analysis to the services you need and drops extra permissions: a method called listAccounts() would otherwise match both AWS Organizations and Amazon Chime. The third command, fix-access-denied, takes an AccessDenied error text, works out the missing permission and applies it without confirmation under --yes. Through the MCP server an assistant gets the same functions and fills in service hints from the code context.

Who it is for. For developers on AWS who write code with Claude Desktop, Kiro and other assistants and do not want to pick role permissions by hand.

Good fit when

  • A Python application calls S3 and DynamoDB and you need a starting policy for its role before the first deploy
  • A deploy failed with AccessDenied and you need to find which permission is missing
  • A Terraform plan is ready and you want a draft policy for the actions the AWS provider will perform
  • You want to see which call in the code produced an action in the policy: the --explain flag helps
  • An assistant writes an infrastructure-as-code template and needs exact actions instead of guesses

Not a fit when

  • You need resource-based policies such as S3 bucket or KMS key policies, or RCPs, SCPs and permission boundaries: the tool does not produce them
  • A bucket or resource name is determined at runtime: the tool does not yet predict which resource will be accessed
  • You want a finished least-privilege policy with no human review: the result is a baseline and must be reviewed before deploy
  • Your code is in a language outside the list: Go, Java, JavaScript, TypeScript and Python cover far from every stack
  • The network is closed: the tool fetches metadata from servicereference.us-east-1.amazonaws.com and does not work without that address

Example request

Analyze src/app.py and build a baseline IAM policy for this application's role, with service hints s3 and dynamodb, then explain where the s3:PutObject action came from

MCP

Transport
stdio, http
Authentication
not required

Environment variables

AWS_PROFILE
The AWS CLI profile with credentials for applying fixes and uploading policies
AWS_REGION
The AWS region, for example us-east-1

Limitations

The result is a baseline. Static analysis can include permissions for services the application does not use when method names match across several SDKs, which is why CLI use calls for --service-hints. An assistant that receives a policy over MCP may change it, for example by inserting concrete ARNs, and those edits come from the assistant, not from the tool.

While running, the tool makes HTTPS requests to servicereference.us-east-1.amazonaws.com for fresh AWS service metadata. Behind a corporate proxy set HTTPS_PROXY, and with SSL inspection install the inspection certificate in the OS store. Applying fixes and uploading policies to IAM require AWS credentials: the profile and region go through AWS_PROFILE and AWS_REGION.

The author does not say whether it works from Russia. The direct install script works on macOS and Linux only.

How to disable. Remove the iam-policy-autopilot entry from the client's MCP configuration and restart it. A pip install comes off with pip uninstall iam-policy-autopilot, and the binary from the direct install sits at /usr/local/bin/iam-policy-autopilot. Policies uploaded to IAM with --upload-policies stay in the account; delete them in the AWS console.

FAQ

How do I connect IAM Policy Autopilot to Claude Desktop?

Add an iam-policy-autopilot server to claude_desktop_config.json with the command uvx and the arguments iam-policy-autopilot and mcp-server. Put AWS_PROFILE and AWS_REGION in env. For a pip install the command is iam-policy-autopilot with the argument mcp-server. For Kiro the file is .kiro/settings/mcp.json in the project.

Can the tool build a policy from Terraform files?

Only from a plan in JSON: save the plan with terraform plan -out, then run terraform show -json and pass the file to generate-policies. It does not read native .tf files yet, and source code and a plan cannot be mixed in one call.

What does the fix-access-denied command do?

It takes an AccessDenied error text, for example a message denying s3:GetObject, identifies the missing action and proposes a policy change. The --yes flag applies it without confirmation; without it, changes are shown for approval.

Why does the policy include extra services?

Method names in code can match several services: listAccounts() exists in both AWS Organizations and Amazon Chime. Pass --service-hints with the services you need, for example s3 iam organizations. The policy may still keep actions of related services when an operation needs them, such as KMS for S3 encryption.

Which languages are supported?

Go with AWS SDK for Go v2, Java with AWS SDK for Java v2, JavaScript and TypeScript with AWS SDK for JavaScript v3, and Python with Boto3 and Botocore. A separate path handles a Terraform plan in JSON.

Discussion

No questions or reviews yet.

Official

AWS's official MCP server suite: docs, IaC, containers, serverless, databases, cost and monitoring

MCP serverBroad access9.9KRepository stars
Editors’ pick

AWS's official set of MCP servers, skills and plugins so an agent can build, deploy and operate on AWS

PluginBroad access3.3KRepository stars
Official

HashiCorp's official MCP server for the Terraform Registry and HCP Terraform: providers, modules, policies and workspaces

MCP serverBroad access1.6KRepository stars

Self-hosted MCP server for running commands on remote servers over SSH, with tokens and roles

MCP serverBroad access2Repository stars

AWS development plugins: CDK and SST, serverless and event-driven architecture, cost and monitoring, Bedrock AgentCore

PluginBroad access373Repository stars

An MCP server for ServiceNow: over 500 tools across ITSM, CMDB and scripting, with write access off by default

MCP serverBroad access265Repository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
IAM Policy Autopilot (this entry)yesnot required501
Open source MCP servers for AWSyeskey is optional9,851the broad set of AWS MCP servers for documentation, IaC, databases and monitoring
Agent Toolkit for AWSno3,336an AWS bundle of MCP servers, skills and plugins for an agent's whole workflow

README in short

The document names the audience, lists the benefits (speed, reliability, freshness) and gives advice: review policies, understand the tool's boundaries, separate its work from the assistant's edits and use service hints. Then come a table of languages and SDKs, three install options, MCP setup for Kiro, Kiro CLI and Claude Desktop and a separate Kiro power configuration. It closes with network requirements covering proxies, SSL inspection and an allowlist, the CLI commands, a Rust build from source and the workspace structure.

README badge

Report a problem

Foxx AIIAM Policy Autopilot
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.