MCP server for Google Cloud Identity and Access Management (IAM) API, providing tools to manage v1 roles and v2 deny policies.
A Model Context Protocol (MCP) server acts as a proxy between an external service that provides context, data, or capabilities to a Large Language Model (LLM) or AI application. MCP servers connect AI applications to external systems such as databases and web services, translating their responses into a format that the AI application can understand.
Server Setup
You must enable MCP servers and set up authentication before use. For more information about using Google and Google Cloud remote MCP servers, see Google Cloud MCP servers overview.
Server Endpoints
An MCP service endpoint is the network address and communication interface (usually a URL) of the MCP server that an AI application (the Host for the MCP client) uses to establish a secure, standardized connection. It is the point of contact for the LLM to request context, call a tool, or access a resource. Google MCP endpoints can be global or regional.
The Identity and Access Management (IAM) API MCP server has the following global MCP endpoint:
- https://iam.googleapis.com/mcp
MCP Tools
An MCP tool is a function or executable capability that an MCP server exposes to a LLM or AI application to perform an action in the real world.
Tools
The iam.googleapis.com MCP server has the following tools:
| MCP Tools | |
|---|---|
list_deny_policies |
Lists deny policies attached to a Google Cloud project. Organizations and folders are not supported. Use this tool to discover deny policies enforced at an attachment point. This tool requires the following parameters:
The following parameters are optional:
The tool returns a list of deny policies attached to the specified resource along with an optional next page token. |
get_deny_policy |
Gets the details, metadata, and rules of a deny policy attached to a Google Cloud project. Organizations and folders are not supported. Use this tool to inspect the denied principal sets, exempted principal sets, and denied permissions of a specific deny policy. This tool requires the This tool returns the deny policy representation including its rules, display name, and etag. |
create_deny_policy |
Creates a new deny policy attached to a Google Cloud project. Organizations and folders are not supported. Deny policies set explicit access prohibitions that override allow policies, including inherited allow policies. Creating a deny policy is asynchronous and returns a long-running operation. Use the This tool requires the following parameters:
This tool returns a long-running operation resource whose resolution status can be tracked with |
update_deny_policy |
Updates an existing deny policy attached to a Google Cloud project. Organizations and folders are not supported. Use this tool to modify deny rules, denied principals, exceptions, or display names. Perform a read-modify-write pattern by fetching the latest policy via This tool requires the This tool returns a long-running operation resource whose resolution status can be tracked with |
delete_deny_policy |
Permanently deletes a deny policy from a Google Cloud project. Organizations and folders are not supported. Once deleted, the deny rules within the policy no longer restrict access for principals. Deleting a deny policy is asynchronous and returns a long-running operation. Use the This tool requires the following parameters:
The following parameters are optional:
This tool returns a long-running operation resource whose resolution status can be tracked with |
get_deny_policy_status |
Gets the status of a long-running operation initiated by creating, updating, or deleting a deny policy. Use this tool to check whether an asynchronous deny policy mutation has completed successfully ( This tool requires the This tool returns an operation object indicating completion status ( |
list_roles |
Lists every custom IAM role that is defined for a Google Cloud project. Organizations are not supported. Use this tool to discover available custom roles. Predefined roles are not supported by this tool. This tool requires the following parameters:
The following parameters are optional:
This tool returns a list of custom roles for the project along with an optional next page token. |
get_role |
Gets the definition of a custom role on a Google Cloud project. Organizations are not supported. Use this tool to inspect the details of a role, such as its title, description, launch stage, and the exact set of permissions it includes. This tool requires the This tool returns the role resource containing details including the title, description, and list of included permissions. |
create_role |
Creates a new custom IAM role for a Google Cloud project. Organizations are not supported. Use this tool only when predefined roles do not satisfy your needs and you require a specific, customized combination of permissions. This tool requires the following parameters:
This tool returns the created role definition. |
update_role |
Updates the definition of an existing custom IAM role. Use this tool to modify the title, description, launch stage, or set of permissions of a role that was previously created. Do not use this tool to update predefined roles (for example, This tool requires the following parameters:
The following parameters are optional:
This tool returns the updated role definition. |
delete_role |
Deletes a custom IAM role, making it inactive. Organizations are not supported. Use this tool to remove a role that is no longer needed. After a role is deleted, it can no longer be used for new role bindings, and existing bindings utilizing this role will no longer grant any access. This is a destructive operation, although a deleted role can be restored using the Predefined roles cannot be deleted. This tool requires the following parameters:
The following parameters are optional:
This tool returns the details of the role that was deleted. |
undelete_role |
Restores (undeletes) a previously deleted custom IAM role. Organizations are not supported. Use this tool to recover a role that was accidentally or prematurely deleted. Restoring a role makes it active and functional again, restoring the access granted by existing role bindings that referenced this role. Roles can only be restored within 7 days of deletion. This tool requires the following parameters:
The following parameters are optional:
This tool returns the details of the restored role. |
Get MCP tool specifications
To get the MCP tool specifications for all tools in an MCP server, use the tools/list method. The following example demonstrates how to use curl to list all tools and their specifications currently available within the MCP server.
| Curl Request |
|---|
curl --location 'https://iam.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' |