awslabs.iam-mcp-server
v1.1.5An AWS Labs Model Context Protocol (MCP) server for managing AWS IAM resources including users, roles, policies, and permissions
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_users
List 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. ## Usage Tips: - Use path_prefix to filter users by organizational structure - Adjust max_items to control response size for large accounts - Results may be paginated for accounts with many users Args: ctx: MCP context for error reporting path_prefix: Optional path prefix to filter users max_items: Maximum number of users to return Returns:…
| Parameter | Type | Description |
|---|---|---|
ctx * | ||
max_items | integer | Maximum number of users to return |
path_prefix | Path prefix to filter users (e.g., "/division_abc/") |
get_user
Get 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. ## Usage Tips: - Use this after list_users to get detailed information about specific users - Review attached policies to understand user permissions - Check access keys to identify potential security issues Args: ctx: MCP context for error reporting user_name: The name of the IAM user…
| Parameter | Type | Description |
|---|---|---|
ctx * | ||
user_name * | string | The name of the IAM user to retrieve |
create_user
Create 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. ## Security Best Practices: - Use descriptive user names that indicate the user's role or purpose - Set appropriate paths for organizational structure - Consider using permissions boundaries to limit maximum permissions - Follow the principle of least privilege when assigning permissions later Args: ctx: MCP context for error reporting user_name: The name of the ne…
| Parameter | Type | Description |
|---|---|---|
ctx * | ||
user_name * | string | The name of the new IAM user |
confirmed | boolean | Must be true to confirm this write operation |
path | string | The path for the user |
permissions_boundary | ARN of the permissions boundary policy |
delete_user
Delete an IAM user. Args: user_name: The name of the IAM user to delete force: If True, removes all attached policies, groups, and access keys first confirmed: Must be true to confirm this write operation Returns: Dictionary containing deletion status
| Parameter | Type | Description |
|---|---|---|
user_name * | string | The name of the IAM user to delete |
confirmed | boolean | Must be true to confirm this write operation |
force | boolean | Force delete user by removing all attached policies, groups, and access keys first |
list_roles
List IAM roles in the account. Args: path_prefix: Optional path prefix to filter roles max_items: Maximum number of roles to return Returns: Dictionary containing list of roles and metadata
| Parameter | Type | Description |
|---|---|---|
max_items | integer | Maximum number of roles to return |
path_prefix | Path prefix to filter roles (e.g., "/service-role/") |
create_role
Create a new IAM role. Args: role_name: The name of the new IAM role assume_role_policy_document: The trust policy document in JSON format path: The path for the role (default: '/') description: Optional description of the role max_session_duration: Maximum session duration in seconds permissions_boundary: Optional ARN of the permissions boundary policy confirmed: Must be true to confirm this write operation Returns: Dictionary containing the created role details
| Parameter | Type | Description |
|---|---|---|
assume_role_policy_document * | The trust policy document in JSON format (string or dict) | |
role_name * | string | The name of the new IAM role |
confirmed | boolean | Must be true to confirm this write operation |
description | Description of the role | |
max_session_duration | integer | Maximum session duration in seconds (3600-43200) |
path | string | The path for the role |
permissions_boundary | ARN of the permissions boundary policy |
list_policies
List IAM policies in the account. Args: scope: Scope of policies to list ("All", "AWS", or "Local") only_attached: Only return policies that are attached path_prefix: Optional path prefix to filter policies max_items: Maximum number of policies to return Returns: Dictionary containing list of policies and metadata
| Parameter | Type | Description |
|---|---|---|
max_items | integer | Maximum number of policies to return |
only_attached | boolean | Only return policies that are attached to a user, group, or role |
path_prefix | Path prefix to filter policies | |
scope | string | Scope of policies to list: "All", "AWS", or "Local" |
get_managed_policy_document
Retrieve 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. Args: policy_arn: The ARN of the managed policy version_id: Optional version ID (defaults to current version) Returns: ManagedPolicyResponse containing the policy document and details
| Parameter | Type | Description |
|---|---|---|
policy_arn * | string | The ARN of the managed policy |
version_id | The version ID of the policy (defaults to current version) |
attach_user_policy
Attach a managed policy to an IAM user. Args: user_name: The name of the IAM user policy_arn: The ARN of the policy to attach confirmed: Must be true to confirm this write operation Returns: Dictionary containing attachment status
| Parameter | Type | Description |
|---|---|---|
policy_arn * | string | The ARN of the policy to attach |
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
detach_user_policy
Detach a managed policy from an IAM user. Args: user_name: The name of the IAM user policy_arn: The ARN of the policy to detach confirmed: Must be true to confirm this write operation Returns: Dictionary containing detachment status
| Parameter | Type | Description |
|---|---|---|
policy_arn * | string | The ARN of the policy to detach |
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
create_access_key
Create a new access key for an IAM user. Args: user_name: The name of the IAM user confirmed: Must be true to confirm this write operation Returns: Dictionary containing the new access key details (SecretAccessKey is redacted)
| Parameter | Type | Description |
|---|---|---|
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
delete_access_key
Delete an access key for an IAM user. Args: user_name: The name of the IAM user access_key_id: The access key ID to delete confirmed: Must be true to confirm this write operation Returns: Dictionary containing deletion status
| Parameter | Type | Description |
|---|---|---|
access_key_id * | string | The access key ID to delete |
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
simulate_principal_policy
Simulate IAM policy evaluation for a principal. Args: policy_source_arn: ARN of the user or role to simulate action_names: List of actions to simulate resource_arns: Optional list of resource ARNs to test against context_entries: Optional context entries for the simulation Returns: Dictionary containing simulation results
| Parameter | Type | Description |
|---|---|---|
action_names * | array | List of actions to simulate |
policy_source_arn * | string | ARN of the user or role to simulate |
context_entries | Context entries for the simulation | |
resource_arns | List of resource ARNs to test against |
list_groups
List 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. ## Usage Tips: - Use path_prefix to filter groups by organizational structure - Adjust max_items to control response size for large accounts - Results may be paginated for accounts with many groups Args: path_prefix: Optional path prefix to filter groups max_items: Maximum number of groups to return Returns: GroupsListResponse containin…
| Parameter | Type | Description |
|---|---|---|
max_items | integer | Maximum number of groups to return |
path_prefix | Path prefix to filter groups (e.g., "/division_abc/") |
get_group
Get 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. ## Usage Tips: - Use this after list_groups to get detailed information about specific groups - Review attached policies to understand group permissions - Check group members to see who has these permissions Args: group_name: The name of the IAM group Returns: GroupDetailsResponse c…
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the IAM group to retrieve |
create_group
Create 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. ## Security Best Practices: - Use descriptive group names that indicate the group's purpose - Set appropriate paths for organizational structure - Follow the principle of least privilege when assigning permissions later Args: group_name: The name of the new IAM group path: The path for the group (default: '/') confirmed: Must be true to confirm this write op…
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the new IAM group |
confirmed | boolean | Must be true to confirm this write operation |
path | string | The path for the group |
delete_group
Delete an IAM group. Args: group_name: The name of the IAM group to delete force: If True, removes all members and attached policies first confirmed: Must be true to confirm this write operation Returns: Dictionary containing deletion status
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the IAM group to delete |
confirmed | boolean | Must be true to confirm this write operation |
force | boolean | Force delete by removing all members and policies first |
add_user_to_group
Add a user to an IAM group. Args: group_name: The name of the IAM group user_name: The name of the IAM user confirmed: Must be true to confirm this write operation Returns: GroupMembershipResponse containing operation status
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the IAM group |
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
remove_user_from_group
Remove a user from an IAM group. Args: group_name: The name of the IAM group user_name: The name of the IAM user confirmed: Must be true to confirm this write operation Returns: GroupMembershipResponse containing operation status
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the IAM group |
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
attach_group_policy
Attach a managed policy to an IAM group. Args: group_name: The name of the IAM group policy_arn: The ARN of the policy to attach confirmed: Must be true to confirm this write operation Returns: GroupPolicyAttachmentResponse containing operation status
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the IAM group |
policy_arn * | string | The ARN of the policy to attach |
confirmed | boolean | Must be true to confirm this write operation |
detach_group_policy
Detach a managed policy from an IAM group. Args: group_name: The name of the IAM group policy_arn: The ARN of the policy to detach confirmed: Must be true to confirm this write operation Returns: GroupPolicyAttachmentResponse containing operation status
| Parameter | Type | Description |
|---|---|---|
group_name * | string | The name of the IAM group |
policy_arn * | string | The ARN of the policy to detach |
confirmed | boolean | Must be true to confirm this write operation |
put_user_policy
Create 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. ## Security Best Practices: - Follow the principle of least privilege when creating policies - Use managed policies for common permissions that can be reused - Regularly review and audit inline policies - Test policies using simulate_principal_policy before applying Args: user_name: The…
| Parameter | Type | Description |
|---|---|---|
policy_document * | 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 | boolean | Must be true to confirm this write operation |
get_user_policy
Retrieve an inline policy for an IAM user. This tool retrieves the policy document for a specific inline policy attached to a user. Args: user_name: The name of the IAM user policy_name: The name of the inline policy Returns: InlinePolicyResponse containing the policy document and details
| Parameter | Type | Description |
|---|---|---|
policy_name * | string | The name of the inline policy |
user_name * | string | The name of the IAM user |
delete_user_policy
Delete 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. Args: user_name: The name of the IAM user policy_name: The name of the inline policy to delete confirmed: Must be true to confirm this write operation Returns: Dictionary containing deletion status
| Parameter | Type | Description |
|---|---|---|
policy_name * | string | The name of the inline policy to delete |
user_name * | string | The name of the IAM user |
confirmed | boolean | Must be true to confirm this write operation |
put_role_policy
Create 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. Args: role_name: The name of the IAM role policy_name: The name of the inline policy policy_document: The policy document in JSON format confirmed: Must be true to confirm this write operation Returns: InlinePolicyResponse containing the policy details and operation statu…
| Parameter | Type | Description |
|---|---|---|
policy_document * | 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 | boolean | Must be true to confirm this write operation |
get_role_policy
Retrieve an inline policy for an IAM role. This tool retrieves the policy document for a specific inline policy attached to a role. Args: role_name: The name of the IAM role policy_name: The name of the inline policy Returns: InlinePolicyResponse containing the policy document and details
| Parameter | Type | Description |
|---|---|---|
policy_name * | string | The name of the inline policy |
role_name * | string | The name of the IAM role |
delete_role_policy
Delete 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. Args: role_name: The name of the IAM role policy_name: The name of the inline policy to delete confirmed: Must be true to confirm this write operation Returns: Dictionary containing deletion status
| Parameter | Type | Description |
|---|---|---|
policy_name * | string | The name of the inline policy to delete |
role_name * | string | The name of the IAM role |
confirmed | boolean | Must be true to confirm this write operation |
list_user_policies
List all inline policies for an IAM user. This tool retrieves the names of all inline policies attached to the specified user. Args: user_name: The name of the IAM user Returns: InlinePolicyListResponse containing the list of policy names
| Parameter | Type | Description |
|---|---|---|
user_name * | string | The name of the IAM user |
list_role_policies
List all inline policies for an IAM role. This tool retrieves the names of all inline policies attached to the specified role. Args: role_name: The name of the IAM role Returns: InlinePolicyListResponse containing the list of policy names
| Parameter | Type | Description |
|---|---|---|
role_name * | string | The name of the IAM role |