Delete MCP Access Policy
DELETE /environments/{env_id}/mcp_policy
DELETE /environments/{env_id}/mcp_policyInteractive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Path Parameters
Environment ID that scopes the request.
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X DELETE "$AISIX_CP/environments/$ENV_ID/mcp_policy" \ -H "Authorization: Bearer $AISIX_TOKEN"Deleted
{
"deleted": true
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Authenticated request is not permitted.
{
"error": {
"code": "CUSTOM_KEY_DISABLED",
"message": "custom API key values are disabled for this organization"
}
}Resource not found.
{
"error": {
"code": "NOT_FOUND",
"message": "provider key not found"
}
}Complete operation details and schema variants
DELETE /environments/{env_id}/mcp_policy
Delete MCP Access Policy
Remove the environment layer of the MCP tool ACL. Keys with no
team layer and no mcp_access block of their own are then left
with no layer at all, which means no MCP tool access; keys that
configure their own layer keep it.
Parameters
env_id(path, string, required): Environment ID that scopes the request.
Responses
-
200: Deleted -
deleted(boolean, required): Alwaystrueon success. -
401: Missing or invalid bearer. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
403: Authenticated request is not permitted. Response fields (application/json): identical toDELETE /environments/{env_id}/mcp_policy, response 401 above. -
404: Resource not found. Response fields (application/json): identical toDELETE /environments/{env_id}/mcp_policy, response 401 above.
cURL
curl -X DELETE '$AISIX_CP/environments/{env_id}/mcp_policy' -H 'Authorization: Bearer $AISIX_TOKEN'