Tests a value against the result of merging MCP consumer policies in the resource hierarchy. This operation is designed to be used for building policy-aware UIs and command-line tools, not for access checking.
HTTP request
POST https://serviceusage.googleapis.com/v2beta/{name=*/*}:testMcpEnabled
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name
|
Required. Resource name to check the value against hierarchically. Format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ // Union field |
value
. Asks "Is this value enabled according to the merged MCP consumer policies from the resource hierarchy?". For example, the value can be a service name to check if the targeted resource can use this service. value
can be only one of the following:serviceName
string
The name of a service to test for MCP enablement. Format: services/{service}
.
Response body
McpState
objects represent the MCP related state of a service with respect to a consumer.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"name"
:
string
,
"mcpEnableRules"
:
[
{
object (
|
| Fields | |
|---|---|
name
|
Output only. The resource whose MCP state is being represented. Format: |
mcpEnableRules[]
|
Output only. Mcp enable rules, grouped by any associated conditions, that provide access to this resource. If the |
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/cloud-platform.read-only -
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .

