Enable the necessary APIs

Check my progress

/ 15

MCP deploy and test locally

Check my progress

/ 20

MCP deploy to Cloud Run

Check my progress

/ 20

Update the agent to use MCP

Check my progress

/ 5

Deploy the ADK Agent locally

Check my progress

/ 20

Deploy the ADK Agent on Cloud Run

Check my progress

/ 10

Verify the deployed ADK Agent

Check my progress

/ 10

This lab may incorporate AI tools to support your learning.
This content is not yet optimized for mobile devices.
For the best experience, please visit us on a desktop computer using a link sent by email.

GSP532

Google Cloud self-paced labs

Challenge overview

In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.

When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.

To score 100% you must successfully complete all tasks within the time period!

This lab is recommended for students who have enrolled in the Build a Smart Cloud Application with Vibe Coding and MCP course. Are you ready for the challenge?

Explore other content in the Gemini Enterprise Agent Ready (GEAR) program.

Topics tested

  • Enable the APIs and set the environment variables.
  • Deploy the MCP server locally for testing and deploy to Cloud Run.
  • Use the Agent Development Kit (ADK) to update the Python application to use MCP.
  • Dockerize and deploy the MCP server and ADK agent to Cloud Run.

Setup and requirements

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.

This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

How to start your lab and sign in to the Google Cloud console

  1. Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup and access panel with the following:

    • The Open Google Cloud console button
    • The temporary credentials (username and password) that you must use for this lab
    • Other information, if needed, to step through this lab

    Note that the lab timer is located near the top of the page, showing the remaining time.

  2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

    The lab spins up resources, and then opens another tab that shows the Sign in page.

    Tip: Arrange the tabs in separate windows, side-by-side.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab setup and access panel.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab setup and access panel.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field. Navigation menu icon and Search field

Challenge scenario

The Cloud Creek Zoo has contracted the Cymbal Group's 'Digital Experience' consulting division to implement a state-of-the-art visitor engagement system. Cloud Creek Zoo's ultimate goal is a highly accurate, dynamic, and engaging Tour Guide powered by AI that can provide deep, contextual answers to visitor questions. At the core of the systems upgrade is the implementation and upgrade of the "zoo tour guide" AI agent that can perform lookups of animal information via a remote Model Context Protocol (MCP) server, the "zoo server".

Cymbal logo

In addition to using Wikipedia for context when answering visitor queries, the "zoo tour guide" agent should have access to real-time, broad information via a dedicated Google Search MCP Server tool. This would give the agent the capacity to answer questions such as, "Give me recent conservation news about the lion species."

A junior consultant made some mistakes while upgrading the existing "zoo server", resulting in a slightly broken, non-functional Python server.

You have been called to address these issues.

Your challenge

In this lab, your mission as a Senior AI Integration Specialist for the Cymbal Group is the following:

  • Set up the project and enable the necessary APIs as well as services.
  • Fix the broken MCP server's code and deploy the server to Cloud Run for testing.
  • Integrate and upgrade the "zoo tour guide" ADK AI agent's functionality and workflow to support Google Search.
  • Dockerize the ADK agent package and deploy it to Cloud Run to achieve production readiness.

Task 1. Set up the environment and enable the necessary APIs

In this task, you create the project-specific foundation in Google Cloud to support an AI deployment at scale.

Ensure your Google Cloud project is configured to allow the required services to function and communicate effectively.

Download the code files

  1. In Cloud Shell, click Open Editor to open the Cloud Shell Editor to your home directory.

  2. In the Cloud Shell Editor action bar, click View > Terminal.

    Note: You may have to lengthen your browser window or click More options (More options icon) to see the View menu option.

Use this window as your IDE, with both the Cloud Shell Editor (top) and the Cloud Shell Terminal (bottom), for the remainder of this lab.

Close any additional tutorial or Antigravity panels that appear on the right side of the screen to save more of your window for your code editor.

  1. In the terminal, enter the following command to set up your project:

    gcloud config set project {{{primary_project.project_id | filled in at lab start}}}

    Expected output: You should get an output message confirming the updated property.

  2. In the terminal, run the following commands to download and extract the boilerplate code files:

    gcloud storage cp gs://{{{primary_project.project_id | filled in at lab start}}}-labconfig-bucket/labs_code.zip . unzip labs_code.zip
  3. Run the following to create the environment variables:

    cd ~/zoo_guide_agent cat << 'EOF' > .env MODEL="{{{primary_project.startup_script.gemini_flash_model_id |filled in at lab start}}}" SERVICE_ACCOUNT="{{{primary_project.startup_script.project_number | filled in at lab start}}}-compute@developer.gserviceaccount.com" MCP_SERVER_URL="https://{{{primary_project.startup_script.mcp_server_name | filled in at lab start}}}-{{{primary_project.startup_script.project_number | filled in at lab start}}}.{{{primary_project.default_region | filled in at lab start}}}.run.app/mcp/" GOOGLE_GENAI_USE_ENTERPRISE=1 GOOGLE_CLOUD_PROJECT={{{primary_project.project_id | filled in at lab start}}} PROJECT_NUMBER={{{primary_project.startup_script.project_number | filled in at lab start}}} GOOGLE_CLOUD_LOCATION=global EOF

    Your final directory structure should look similar to the following.

    Output:

    . ├── mcp-on-cloudrun │ ├── Dockerfile │ ├── local_mcp_call.py │ ├── pyproject.toml │ ├── server.py │ └── uv.lock └── zoo_guide_agent ├── agent.py ├── __init__.py ├── .env └── requirements.txt
  4. Finally, enable the necessary APIs—Agent Platform API, Artifact Registry API, Compute Engine API, Cloud Build API, and Cloud Run Admin API.

Click Check my progress to verify the objective. Enable the necessary APIs

Task 2. Fix and deploy the MCP server to Cloud Run

In this task, you must use Antigravity CLI to troubleshoot and revitalize the MCP server, which acts as the application's backbone and orchestrates AI tool use.

Once you've fixed the problem(s) in the code, ensure you use the relevant Cloud Build integration command in Antigravity CLI to deploy the preexisting, remote MCP server to the Antigravity CLI repository for testing.

Deploy and test locally

  1. In the terminal, execute the following commands to run ~/mcp-on-cloudrun/server.py:

    cd ~/mcp-on-cloudrun uv run --python 3.13 server.py

    You will get an error (NameError: name 'mcp' is not defined); you need to fix that error using Antigravity CLI (agy) in Cloud Shell.

  2. In the terminal, run the following command to launch Antigravity CLI:

    agy
  3. Perform the following steps to authenticate and configure Antigravity CLI:

    • If prompted Do you trust the contents of this project?, select Yes, I trust this folder and press ENTER.
    • To sign in, select the Use a Google Cloud project option.
    • Open the authorization URL in a new tab in your browser (or Incognito window where you are signed in with the lab credentials). Sign in, click Copy to Clipboard to copy the authorization code, paste it into the terminal prompt, and press ENTER.
    • Enter your Google Cloud Project ID () and press ENTER.
    • Set Google Cloud Location to global.
    • On the Select License screen, select 1. Agent Platform - Pay as you go provisioned for your Google Cloud project and press ENTER.
    • On the setup wizard screens (Choose your color scheme and Terms of Service & Data Use), use the arrow keys to navigate and press ENTER to select Next and then Done to accept the default settings.
    Note: Before you begin, verify that the Antigravity CLI is running under your Antigravity Business account. The banner should display something similar to: student-xx-xxxxxxxxxxxx@qwiklabs.net (Antigravity Business). If Antigravity Business is not shown in the startup banner, exit the CLI and relaunch Antigravity.
  4. In the Antigravity CLI session, enter the following prompt to ask Antigravity CLI to fix the MCP server:

    Fix the error in server.py Note: Antigravity CLI may take some time to update and make code changes in the actual Python file. If Antigravity CLI asks for your permission to execute the Python file that it has fixed, press ESC to cancel, and exit Antigravity CLI to return to the terminal. Then perform the lab steps that follow to proceed with the lab.
  5. When the fix is applied, exit Antigravity CLI by entering:

    /quit
  6. Once the error is fixed, re-run the previous command to start the MCP server locally:

    cd ~/mcp-on-cloudrun uv run --python 3.13 server.py

    It should start the MCP server locally and you should get output confirming that.

  7. Open another terminal instance and run ~/mcp-on-cloudrun/local_mcp_call.py to test the locally deployed agent:

    Note: If you get a google.logging.v2.WriteLogEntriesPartialErrors error, set your project using the gcloud config set project command. gcloud config set project {{{primary_project.project_id | filled in at lab start}}} cd ~/mcp-on-cloudrun uv run --python 3.13 local_mcp_call.py

    Expected output: The resulting output, presented as a CallToolResult, should show the successful retrieval of structured data about the walrus species.

Click Check my progress to verify the objective. MCP deploy and test locally

Deploy to Cloud Run

Note: You need to authorize Cloud Shell during the deployment process if prompted.
  • Run the following gcloud command to deploy the application to Cloud Run:

    cd ~/mcp-on-cloudrun gcloud run deploy {{{primary_project.startup_script.mcp_server_name | filled in at lab start}}} \ --no-allow-unauthenticated \ --region={{{primary_project.default_region | filled in at lab start}}} \ --source=. \ --min=1 \ --set-env-vars=FASTMCP_STATELESS_HTTP=true \ --project={{{primary_project.project_id | filled in at lab start}}} \ --labels=lab-dev=mcp-zoo-cloud-run-service
Note: Deployment can take up to 10 minutes. If you encounter a Quota exceeded for total allowable CPU per project per region error during the Cloud Run deployment, please wait a moment and retry the command.

Click Check my progress to verify the objective. MCP deploy to Cloud Run

Task 3. Update the agent to use MCP

In this task, you deploy your Python Agent code and link it to the newly deployed MCP server.

Using the ADK commands within Antigravity CLI, deploy the local (updated) agent.py file. Configure this deployment to use the MCP Server deployed in Task 2, making the zoo tour guide operational within your local CLI environment.

Generate tokens and configure the MCP server

  1. Save your Google Cloud credentials and project number in environment variables for use in the Antigravity CLI configuration:

    export AUDIENCE="https://{{{primary_project.startup_script.mcp_server_name | filled in at lab start}}}-{{{primary_project.startup_script.project_number | filled in at lab start}}}.{{{primary_project.default_region | filled in at lab start}}}.run.app" export ID_TOKEN=$(gcloud auth print-identity-token --audiences="$AUDIENCE")
Note: If you get an authentication error in Antigravity CLI, your ID_TOKEN may have expired. Exit with /quit, regenerate your ID_TOKEN with the audience parameter, and rewrite ~/.gemini/config/mcp_config.json.
  1. In the terminal, run the following commands to create the ~/.gemini/config/mcp_config.json configuration file with your Cloud Run MCP server and authentication settings:

    mkdir -p ~/.gemini/config cat << EOF > ~/.gemini/config/mcp_config.json { "mcpServers": { "zoo-remote": { "serverUrl": "https://{{{primary_project.startup_script.mcp_server_name | filled in at lab start}}}-{{{primary_project.startup_script.project_number | filled in at lab start}}}.{{{primary_project.default_region | filled in at lab start}}}.run.app/mcp/", "headers": { "Authorization": "Bearer $ID_TOKEN" } } } } EOF

Open Antigravity CLI

Perform the steps that follow to open Antigravity CLI and interact with the remote MCP server.

  1. In the terminal, run the following command to launch Antigravity CLI:
agy Note: If prompted for authentication, follow the same sign-in steps as Task 2 using your lab credentials and Project ID ({{{primary_project.project_id | filled in at lab start}}}).
  1. In the Antigravity CLI session, enter the /mcp slash command to list the MCP tools available to it within its context:
/mcp

Verify that zoo-remote displays a green checkmark (✓) with its available tools. Press ESC to dismiss the interactive MCP menu and return to the prompt.

  1. Ask Antigravity CLI to find something in the zoo:
Where can I find penguins?

Antigravity CLI should know to use the zoo-remote MCP server and should ask if you allow execution of the MCP tool.

  1. Choose to always allow all tools from the zoo-remote MCP server.

Expected output: The output should show the correct answer and a display box showing that the MCP server was used.

  1. Prompt Antigravity CLI as follows to use the new custom command that you created:
/find --animal="lion"

Expected output: You should see that Antigravity CLI calls the fetch_animals_by_species tool and formats the response as instructed by the MCP prompt.

  1. When you are ready to end your session, exit Antigravity CLI using the relevant command or keyboard shortcuts (/quit).

Verify server logs

  • In the terminal, enter the following to verify the server logs:

    gcloud run services logs read {{{primary_project.startup_script.mcp_server_name | filled in at lab start}}} --region {{{primary_project.default_region| filled in at lab start}}} --limit=5

    Expected output: You should see an output log that confirms a tool call was made. 🛠️

Click Check my progress to verify the objective. Update the agent to use MCP and verify

Task 4. Dockerize and deploy the ADK agent to Cloud Run

For the final task, you must move the entire system from your local testing environment to a scalable, production-ready serverless environment.

You need to containerize the complete ADK application, including the MCP server and the Zoo Tour Guide agent that has Google Search integrated, and deploy the resulting container image(s) to Google Cloud Run. You must ensure the service is configured for public invocation and confirm the agent is responsive at its public URL.

Deploy and test locally

  1. Open ~/zoo_guide_agent/agent.py, review the TODO comments, and update the code accordingly to complete the agent setup.

  2. Run the following commands to install the package zoo_guide_agent:

    gcloud config set project {{{primary_project.project_id | filled in at lab start}}} cd ~/zoo_guide_agent python -m venv .venv source .venv/bin/activate pip install --no-cache-dir -r requirements.txt
  3. Run the following to deploy the ADK agent locally:

    cd ~ adk web
  4. In Cloud Shell, CTRL+click the http://localhost:8000 or http://127.0.0.1:8000 link to open the ADK dev UI in a new browser tab.

  5. In the ADK dev UI, select the zoo_guide_agent, and ask it the following query:

    Where can I find bears?

    Expected output: You should see events for all function calls, and a resolution to your query that combines information from all sources. The agent should also provide an approximate count of the number of species available globally.

Note: It may take some time to consolidate the actual agent response.

Click Check my progress to verify the objective. Deploy the ADK Agent locally

Deploy to Cloud Run

  • In the terminal, terminate the local ADK web instance by hitting Ctrl+C twice, and run the following commands to deploy your agent:

    cd ~/zoo_guide_agent adk deploy cloud_run \ --project={{{primary_project.project_id | filled in at lab start}}} \ --region={{{primary_project.default_region| filled in at lab start}}} \ --service_name={{{primary_project.startup_script.adk_server_name | filled in at lab start}}} \ --with_ui \ . \ -- \ --labels=lab-dev=cloud-zoo-run-adk-service \ --allow-unauthenticated
Note: It may take 15 minutes on average for the deployment to complete. If you get prompted to confirm if you allow unauthenticated invocations, ENTER y to proceed.

Click Check my progress to verify the objective. Deploy the ADK Agent on Cloud Run

Verify the deployed ADK agent

With your agent now live on Cloud Run, perform a test to confirm a successful deployment and to verify that the agent is working as expected. Use the public Service URL to access the ADK's web interface and interact with the agent.

  1. Once the agent has successfully been deployed to Cloud Run, CTRL+click the Service URL in the output to open it in a new browser tab.

It should resemble the following format.

Service URL output:

https://{{{primary_project.startup_script.adk_server_name | filled in at lab start}}}-{{{primary_project.startup_script.project_number | filled in at lab start}}}.{{{primary_project.default_region | filled in at lab start}}}.run.app/

Because you used the --with_ui flag while deploying to Cloud Run, you should see the ADK developer UI.

  1. In the ADK developer UI, select zoo_guide_agent, and enter the query that follows to start a new conversation:

    Where can I find elephants? Note: Ensure Token Streaming remains Off (the default setting) in the upper right corner so multi-agent tool execution and state transitions can complete smoothly.

    Expected output: You should see events for all function calls with a resolution to your query that combines information from all sources. The agent should also provide an approximate count of the number of species available globally.

Note: It may take some time to consolidate the actual agent response.

Click Check my progress to verify the objective. Verify the deployed ADK Agent

Congratulations!

In this lab, you demonstrated your ability to use Antigravity CLI with Google Cloud Run and Cloud Build to configure, test, and deploy an enhanced and functional "zoo tour guide" ADK Agent. By ensuring the Agent can interact with a dedicated MCP Server and built-in tools, this significantly improves and streamlines the handling of zoo visitor queries and animal lookups as part of Cloud Creek Zoo's digital transformation efforts.

Build a Smart Cloud Application with Vibe Coding and MCP Skill Badge

Next steps / Learn more

Check out the following resources to learn more about Gen AI and the Gemini Enterprise Agent Platform:

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated November 5, 2026

Lab Last Tested November 5, 2026

Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

This content is not currently available

We can notify you via email when it becomes available

Great!

We can contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Using an Incognito or private browser window is the best way to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.