Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
IAM user, role, group, and policy management.
| Attribute | Details |
|---|---|
| Docker Image | mcp/iam-mcp-server |
| Author | awslabs |
| Repository | https://github.com/awslabs/mcp |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/awslabs/mcp/blob/636aca8e109b5559006044f035bb89c16e9e5410/src/iam-mcp-server/Dockerfile |
| Commit | 636aca8e109b5559006044f035bb89c16e9e5410 |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/iam-mcp-server --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
add_user_to_group | Add a user to an IAM group. |
attach_group_policy | Attach a managed policy to an IAM group. |
attach_user_policy | Attach a managed policy to an IAM user. |
create_access_key | Create a new access key for an IAM user. |
create_group | Create a new IAM group. |
create_role | Create a new IAM role. |
create_user | Create a new IAM user. |
delete_access_key | Delete an access key for an IAM user. |
delete_group | Delete an IAM group. |
delete_role_policy | Delete an inline policy from an IAM role. |
delete_user | Delete an IAM user. |
delete_user_policy | Delete an inline policy from an IAM user. |
detach_group_policy | Detach a managed policy from an IAM group. |
detach_user_policy | Detach a managed policy from an IAM user. |
get_group | Get detailed information about a specific IAM group. |
get_managed_policy_document | Retrieve the policy document for a managed policy. |
get_role_policy | Retrieve an inline policy for an IAM role. |
get_user | Get detailed information about a specific IAM user. |
get_user_policy | Retrieve an inline policy for an IAM user. |
list_groups | List IAM groups in the account. |
list_policies | List IAM policies in the account. |
list_role_policies | List all inline policies for an IAM role. |
list_roles | List IAM roles in the account. |
list_user_policies | List all inline policies for an IAM user. |
list_users | List IAM users in the account. |
put_role_policy | Create or update an inline policy for an IAM role. |
put_user_policy | Create or update an inline policy for an IAM user. |
remove_user_from_group | Remove a user from an IAM group. |
simulate_principal_policy | Simulate IAM policy evaluation for a principal. |
add_user_to_groupAdd a user to an IAM group.
| Parameters | Type | Description |
|---|---|---|
group_name | string | The name of the IAM group |
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
attach_group_policyAttach a managed policy to an IAM group.
| Parameters | Type | Description |
|---|---|---|
group_name | string | The name of the IAM group |
policy_arn | string | The ARN of the policy to attach |
confirmed | booleanoptional | Must be true to confirm this write operation |
attach_user_policyAttach a managed policy to an IAM user.
| Parameters | Type | Description |
|---|---|---|
policy_arn | string | The ARN of the policy to attach |
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
create_access_keyCreate a new access key for an IAM user.
| Parameters | Type | Description |
|---|---|---|
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
create_groupCreate a new IAM group.
This tool creates a new IAM group in your AWS account. The group will be created without any permissions by default - you'll need to attach policies separately.
group_name|string|The name of the new IAM group
confirmed|booleanoptional|Must be true to confirm this write operation
path|stringoptional|The path for the groupcreate_roleCreate a new IAM role.
| Parameters | Type | Description |
|---|---|---|
assume_role_policy_document | string | The trust policy document in JSON format (string or dict) |
role_name | string | The name of the new IAM role |
confirmed | booleanoptional | Must be true to confirm this write operation |
description | stringoptional | Description of the role |
max_session_duration | integeroptional | Maximum session duration in seconds (3600-43200) |
path | stringoptional | The path for the role |
permissions_boundary | stringoptional | ARN of the permissions boundary policy |
create_userCreate a new IAM user.
This tool creates a new IAM user in your AWS account. The user will be created without any permissions by default - you'll need to attach policies separately.
ctx|string|MCP context for error reporting
user_name|string|The name of the new IAM user
confirmed|booleanoptional|Must be true to confirm this write operation
path|stringoptional|The path for the user
permissions_boundary|stringoptional|ARN of the permissions boundary policydelete_access_keyDelete an access key for an IAM user.
| Parameters | Type | Description |
|---|---|---|
access_key_id | string | The access key ID to delete |
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
delete_groupDelete an IAM group.
| Parameters | Type | Description |
|---|---|---|
group_name | string | The name of the IAM group to delete |
confirmed | booleanoptional | Must be true to confirm this write operation |
force | booleanoptional | Force delete by removing all members and policies first |
delete_role_policyDelete an inline policy from an IAM role.
This tool removes an inline policy from the specified role. The policy document will be permanently deleted and cannot be recovered.
| Parameters | Type | Description |
|---|---|---|
policy_name | string | The name of the inline policy to delete |
role_name | string | The name of the IAM role |
confirmed | booleanoptional | Must be true to confirm this write operation |
delete_userDelete an IAM user.
| Parameters | Type | Description |
|---|---|---|
user_name | string | The name of the IAM user to delete |
confirmed | booleanoptional | Must be true to confirm this write operation |
force | booleanoptional | Force delete user by removing all attached policies, groups, and access keys first |
delete_user_policyDelete an inline policy from an IAM user.
This tool removes an inline policy from the specified user. The policy document will be permanently deleted and cannot be recovered.
| Parameters | Type | Description |
|---|---|---|
policy_name | string | The name of the inline policy to delete |
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
detach_group_policyDetach a managed policy from an IAM group.
| Parameters | Type | Description |
|---|---|---|
group_name | string | The name of the IAM group |
policy_arn | string | The ARN of the policy to detach |
confirmed | booleanoptional | Must be true to confirm this write operation |
detach_user_policyDetach a managed policy from an IAM user.
| Parameters | Type | Description |
|---|---|---|
policy_arn | string | The ARN of the policy to detach |
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
get_groupGet detailed information about a specific IAM group.
This tool retrieves comprehensive information about an IAM group including group members, attached policies, and inline policies. Use this to get a complete picture of a group's configuration and membership.
group_name|string|The name of the IAM group to retrieveget_managed_policy_documentRetrieve the policy document for a managed policy.
This tool retrieves the policy document for a specific managed policy version. Use this to examine the actual permissions and wildcards in managed policies.
| Parameters | Type | Description |
|---|---|---|
policy_arn | string | The ARN of the managed policy |
version_id | stringoptional | The version ID of the policy (defaults to current version) |
get_role_policyRetrieve an inline policy for an IAM role.
This tool retrieves the policy document for a specific inline policy attached to a role.
| Parameters | Type | Description |
|---|---|---|
policy_name | string | The name of the inline policy |
role_name | string | The name of the IAM role |
get_userGet detailed information about a specific IAM user.
This tool retrieves comprehensive information about an IAM user including attached policies, group memberships, and access keys. Use this to get a complete picture of a user's permissions and configuration.
ctx|string|MCP context for error reporting
user_name|string|The name of the IAM user to retrieveget_user_policyRetrieve an inline policy for an IAM user.
This tool retrieves the policy document for a specific inline policy attached to a user.
| Parameters | Type | Description |
|---|---|---|
policy_name | string | The name of the inline policy |
user_name | string | The name of the IAM user |
list_groupsList IAM groups in the account.
This tool retrieves a list of IAM groups from your AWS account with optional filtering. Use this to get an overview of all groups or find specific groups by path prefix.
max_items|integeroptional|Maximum number of groups to return
path_prefix|stringoptional|Path prefix to filter groups (e.g., "/division_abc/")list_policiesList IAM policies in the account.
| Parameters | Type | Description |
|---|---|---|
max_items | integeroptional | Maximum number of policies to return |
only_attached | booleanoptional | Only return policies that are attached to a user, group, or role |
path_prefix | stringoptional | Path prefix to filter policies |
scope | stringoptional | Scope of policies to list: "All", "AWS", or "Local" |
list_role_policiesList all inline policies for an IAM role.
This tool retrieves the names of all inline policies attached to the specified role.
| Parameters | Type | Description |
|---|---|---|
role_name | string | The name of the IAM role |
list_rolesList IAM roles in the account.
| Parameters | Type | Description |
|---|---|---|
max_items | integeroptional | Maximum number of roles to return |
path_prefix | stringoptional | Path prefix to filter roles (e.g., "/service-role/") |
list_user_policiesList all inline policies for an IAM user.
This tool retrieves the names of all inline policies attached to the specified user.
| Parameters | Type | Description |
|---|---|---|
user_name | string | The name of the IAM user |
list_usersList IAM users in the account.
This tool retrieves a list of IAM users from your AWS account with optional filtering. Use this to get an overview of all users or find specific users by path prefix.
ctx|string|MCP context for error reporting
max_items|integeroptional|Maximum number of users to return
path_prefix|stringoptional|Path prefix to filter users (e.g., "/division_abc/")put_role_policyCreate or update an inline policy for an IAM role.
This tool creates a new inline policy or updates an existing one for the specified role. Inline policies are directly embedded in a single user, role, or group and have a one-to-one relationship with the identity.
| Parameters | Type | Description |
|---|---|---|
policy_document | string | The policy document in JSON format (string or dict) |
policy_name | string | The name of the inline policy |
role_name | string | The name of the IAM role |
confirmed | booleanoptional | Must be true to confirm this write operation |
put_user_policyCreate or update an inline policy for an IAM user.
This tool creates a new inline policy or updates an existing one for the specified user. Inline policies are directly embedded in a single user, role, or group and have a one-to-one relationship with the identity.
policy_document|string|The policy document in JSON format (string or dict)
policy_name|string|The name of the inline policy
user_name|string|The name of the IAM user
confirmed|booleanoptional|Must be true to confirm this write operationremove_user_from_groupRemove a user from an IAM group.
| Parameters | Type | Description |
|---|---|---|
group_name | string | The name of the IAM group |
user_name | string | The name of the IAM user |
confirmed | booleanoptional | Must be true to confirm this write operation |
simulate_principal_policySimulate IAM policy evaluation for a principal.
| Parameters | Type | Description |
|---|---|---|
action_names | array | List of actions to simulate |
policy_source_arn | string | ARN of the user or role to simulate |
context_entries | stringoptional | Context entries for the simulation |
resource_arns | stringoptional | List of resource ARNs to test against |
{
"mcpServers": {
"awslabs-iam": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"AWS_REGION",
"-e",
"AWS_PROFILE",
"-e",
"AWS_ACCESS_KEY_ID",
"-e",
"AWS_SECRET_ACCESS_KEY",
"mcp/iam-mcp-server"
],
"env": {
"AWS_REGION": "us-east-1",
"AWS_PROFILE": "default",
"AWS_ACCESS_KEY_ID": "AKIAIOSFODNN7EXAMPLE",
"AWS_SECRET_ACCESS_KEY": "your-aws-secret-access-key"
}
}
}
}