CX Agent Studio provides a remote Model Context Protocol (MCP) server which can be used by agents and AI applications to edit CX Agent Studio resources. For example, you can use the Gemini CLI or Antigravity to help design and build your CX Agent Studio agent application.
This feature enables AI-assisted development workflows, drastically reducing the friction of building and maintaining agent applications:
- Vibe Coding (Rapid Prototyping): Instead of manually clicking through the UI to create an agent, you can simply tell your AI-assisted IDE "Create a retail support agent that uses the Shopify API and speaks in a friendly tone." The coding agent uses the MCP server to construct the agent architecture for you.
- Mass Refactoring & Clean-up: The MCP server excels at bulk operations that are tedious in a UI. For example, you can command "Rename the 'customer_id' parameter across all 15 sub-agents" or "Find and delete all unused intents".
- Interactive Eval-Driven Development: You can run a failing evaluation and instruct the agent: "Modify the instructions until this specific evaluation passes".
- Self-Healing & Optimization: An automated "Helper Agent" can monitor an agent's performance (for example, failing a specific evaluation) and use the MCP server to autonomously tweak instructions or fix tool definitions to improve the score ("Hill Climbing").
- Contextual Awareness: The server allows coding assistants to "read" the current state of a deployed agent, making it easier for you to understand complex legacy configurations without digging through JSON files manually.
Model Context Protocol (MCP) standardizes how large language models (LLMs) and AI applications or agents connect to external data sources. MCP servers let you use their tools, resources, and prompts to take actions and get updated data from their backend service.
What's the difference between local and remote MCP servers?
- Local MCP servers
- Typically run on your local machine and use the standard input and output streams (stdio) for communication between services on the same device.
- Remote MCP servers
- Run on the service's infrastructure and offer an HTTP endpoint to AI applications for communication between the AI MCP client and the MCP server. For more information about MCP architecture, see MCP architecture.
Google and Google Cloud remote MCP servers
Google and Google Cloud remote MCP servers have the following features and benefits:- Simplified, centralized discovery
- Managed global or regional HTTP endpoints
- Fine-grained authorization
- Optional prompt and response security with Model Armor protection
- Centralized audit logging
For information about other MCP servers and information about security and governance controls available for Google Cloud MCP servers, see Google Cloud MCP servers overview.
Limitations
The following limitations apply:
- Token Context Limits: Large agent configurations (with many tools and extensive instructions) may exceed the context window of some coding models when retrieving full agent definitions. We recommend fetching specific sub-components (for example, just one tool) rather than the entire app definition at once. Additionally, users should monitor their context window usage and restart their agent session periodically (every few requests) to clear the buffer.
- Latency:
"Direct Mutation" (API calls) are generally faster for small changes.
However, for massive architectural refactors
(renaming variables across 50 files),
we recommend the "Export -> Local Edit -> Import"
workflow to ensure data integrity,
which the MCP server also supports using
export_appandimport_apptools.
How it works
The server exposes the CX Agent Studio API, which is also used by the UI to build agents. Your AI application is configured to use the server and connect to it. The server advertises a list of available tools, such as:
list_agents()create_tool(name, python_code, ...)update_instruction(agent_name, new_instruction)run_evaluation(dataset)
When you provide a natural language command to your AI application, the AI application decides whether to use the CX Agent Studio MCP server and which tool to call.
You can use one of two distinct workflows depending on the complexity of the task:
- Use the remote MCP server (Best for Speed & Prototyping): Connect the MCP server directly to your coding environment to make real-time changes using API calls.
- Local Copies (Best for Scale & Control):
Use the MCP server's
export_apptool to download the agent to your local file system, edit the files with your coding assistant, and push changes back usingimport_app. This is useful for large-scale refactoring, version control integration, or merging team contributions.
The following sections apply only to the Customer Experience Agent Studio remote MCP server.
Required roles
To get the permissions that you need to use the Customer Experience Agent Studio MCP server, ask your administrator to grant you the following IAM roles on the project where you want to use the Customer Experience Agent Studio MCP server:
-
Make MCP tool calls:
MCP Tool User (
roles/mcp.toolUser)
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to use the Customer Experience Agent Studio MCP server. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to use the Customer Experience Agent Studio MCP server:
-
Make MCP tool calls:
mcp.tools.call
You might also be able to get these permissions with custom roles or other predefined roles.
Authentication and authorization
The Customer Experience Agent Studio remote MCP server uses the OAuth 2.0 protocol with Identity and Access Management (IAM) for authentication and authorization. All Google Cloud identities are supported for authentication to MCP servers.We recommend that you create a separate identity for agents that are using MCP tools so that access to resources can be controlled and monitored. For more information about authentication, see Authenticate to MCP servers.
MCP OAuth scopes
OAuth 2.0 uses scopes and credentials to determine if an authenticated principal is authorized to take a specific action on a resource. For more information about OAuth 2.0 scopes at Google, read Using OAuth 2.0 to access Google APIs.
CX Agent Studio has the following MCP tool OAuth scopes:
https://www.googleapis.com/auth/ces
Configure an MCP client to use the CES MCP server
AI applications and agents, such as Claude or Gemini CLI, can instantiate an MCP client that connects to a single MCP server. An AI application can have multiple clients that connect to different MCP servers. To connect to a remote MCP server, the MCP client must know the remote MCP server's URL.
In your AI application, look for a way to connect to a remote MCP server. You are prompted to enter details about the server, such as its name and URL..
For the CX Agent Studio MCP server, enter the following as required:
- Server name: CES MCP server
- Server URL or Endpoint:
https://ces.googleapis.com/mcp - Transport: HTTP
- Authentication details: your Google Cloud credentials, your OAuth Client ID and secret, or an agent identity and credentials. Which authentication details you choose depend on how you want to authenticate. For more information, see Authenticate to MCP servers.
For host-specific guidance about setting up and connecting to MCP server, see the following:
For more general guidance, see the following resources:
Available tools
To view details of available MCP tools and their descriptions for the Customer Experience Agent Studio MCP server, see the Customer Experience Agent Studio MCP reference.
List tools
Use the MCP inspector to list tools, or send a
tools/list HTTP request directly to the Customer Experience Agent Studio
remote MCP server. The tools/list method doesn't require authentication.
POST /mcp HTTP/1.1
Host: ces.googleapis.com
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "tools/list",
}
Optional security and safety configurations
MCP introduces new security risks and considerations due to the wide variety of actions that you can do with the MCP tools. To minimize and manage these risks, Google Cloud offers default settings and customizable policies to control the use of MCP tools in your Google Cloud organization or project.
For more information about MCP security and governance, see AI security and safety.
Use Model Armor
Model Armor is a Google Cloud service designed to enhance the security and safety of your AI applications. It works by proactively screening LLM prompts and responses, protecting against various risks and supporting responsible AI practices. Whether you are deploying AI in your cloud environment, or on external cloud providers, Model Armor can help you prevent malicious input, verify content safety, protect sensitive data, maintain compliance, and enforce your AI safety and security policies consistently across your diverse AI landscape.
When Model Armor is enabled with logging enabled, Model Armor logs the entire payload. This might expose sensitive information in your logs.
Enable Model Armor
You must enable Model Armor APIs before you can use Model Armor.
Console
Enable the Model Armor API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.Select the project where you want to activate Model Armor.
gcloud
Before you begin, follow these steps using the Google Cloud CLI with the Model Armor API:
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
-
Run the following command to set the API endpoint for the Model Armor service.
gcloud config set api_endpoint_overrides/modelarmor "https://modelarmor.LOCATION.rep.googleapis.com/"
Replace
LOCATIONwith the region where you want to use Model Armor.
Configure protection for Google and Google Cloud remote MCP servers
To help protect your MCP tool calls and responses you can use Model Armor floor settings. A floor setting defines the minimum security filters that apply across the project. This configuration applies a consistent set of filters to all MCP tool calls and responses within the project.
Set up a Model Armor floor setting with MCP sanitization enabled. For more information, see Configure Model Armor floor settings.
See the following example command:
gcloud model-armor floorsettings update \ --full-uri='projects/PROJECT_ID/locations/global/floorSetting' \ --enable-floor-setting-enforcement=TRUE \ --add-integrated-services=GOOGLE_MCP_SERVER \ --google-mcp-server-enforcement-type=INSPECT_AND_BLOCK \ --enable-google-mcp-server-cloud-logging \ --malicious-uri-filter-settings-enforcement=ENABLED \ --add-rai-settings-filters='[{"confidenceLevel": "MEDIUM_AND_ABOVE", "filterType": "DANGEROUS"}]'
Replace PROJECT_ID with your Google Cloud project ID.
Note the following settings:
INSPECT_AND_BLOCK: The enforcement type that inspects content for the Google MCP server and blocks prompts and responses that match the filters.ENABLED: The setting that enables a filter or enforcement.MEDIUM_AND_ABOVE: The confidence level for the Responsible AI - Dangerous filter settings. You can modify this setting, though lower values might result in more false positives. For more information, see Model Armor confidence levels.
Disable scanning MCP traffic with Model Armor
To stop Model Armor from automatically scanning traffic to and from Google MCP servers based on the project's floor settings, run the following command:
gcloud model-armor floorsettings update \
--full-uri='projects/PROJECT_ID/locations/global/floorSetting' \
--remove-integrated-services=GOOGLE_MCP_SERVER
Replace PROJECT_ID with the Google Cloud project
ID. Model Armor doesn't automatically apply the rules defined in
this project's floor settings to any Google MCP server traffic.
Model Armor floor settings and general configuration can impact more than just MCP. Because Model Armor integrates with services like Vertex AI, any changes you make to floor settings can affect traffic scanning and safety behaviors across all integrated services, not just MCP.
Control MCP use with IAM deny policies
Identity and Access Management (IAM) deny policies help you secure Google Cloud remote MCP servers. Configure these policies to block unwanted MCP tool access.
For example, you can deny or allow access based on:
- The principal
- Tool properties like read-only
- The application's OAuth client ID
For more information, see Control MCP use with Identity and Access Management.
What's next
- Read the Customer Experience Agent Studio MCP reference documentation.
- Learn more about Google Cloud MCP servers.