🤖 I have created a release *beep* *boop* --- ## [0.27.0](https://github.com/googleapis/genai-toolbox/compare/v0.26.0...v0.27.0) (2026-02-12) ### ⚠ BREAKING CHANGES * Update configuration file v2 ([#2369](293c1d6889)) * Update/add detailed telemetry for mcp endpoint compliant with OTEL semantic convention ([#1987](https://github.com/googleapis/genai-toolbox/issues/1987)) ([478a0bd](478a0bdb59)) ### Features * **cli/invoke:** Add support for direct tool invocation from CLI ([#2353](https://github.com/googleapis/genai-toolbox/issues/2353)) ([6e49ba4](6e49ba436e)) * **cli/skills:** Add support for generating agent skills from toolset ([#2392](https://github.com/googleapis/genai-toolbox/issues/2392)) ([80ef346](80ef346214)) * **cloud-logging-admin:** Add source, tools, integration test and docs ([#2137](https://github.com/googleapis/genai-toolbox/issues/2137)) ([252fc30](252fc3091a)) * **cockroachdb:** Add CockroachDB integration with cockroach-go ([#2006](https://github.com/googleapis/genai-toolbox/issues/2006)) ([1fdd99a](1fdd99a9b6)) * **prebuiltconfigs/alloydb-omni:** Implement Alloydb omni dataplane tools ([#2340](https://github.com/googleapis/genai-toolbox/issues/2340)) ([e995349](e995349ea0)) * **server:** Add Tool call error categories ([#2387](https://github.com/googleapis/genai-toolbox/issues/2387)) ([32cb4db](32cb4db712)) * **tools/looker:** support `looker-validate-project` tool ([#2430](https://github.com/googleapis/genai-toolbox/issues/2430)) ([a15a128](a15a12873f)) ### Bug Fixes * **dataplex:** Capture GCP HTTP errors in MCP Toolbox ([#2347](https://github.com/googleapis/genai-toolbox/issues/2347)) ([1d7c498](1d7c498116)) * **sources/cockroachdb:** Update kind to type ([#2465](https://github.com/googleapis/genai-toolbox/issues/2465)) ([2d341ac](2d341acaa6)) * Surface Dataplex API errors in MCP results ([#2347](1d7c498116)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
8.5 KiB
title, type, weight, description
| title | type | weight | description |
|---|---|---|---|
| Quickstart (MCP with BigQuery) | docs | 2 | How to get started running Toolbox with MCP Inspector and BigQuery as the source. |
Overview
Model Context Protocol is an open protocol that standardizes how applications provide context to LLMs. Check out this page on how to connect to Toolbox via MCP.
Step 1: Set up your BigQuery Dataset and Table
In this section, we will create a BigQuery dataset and a table, then insert some data that needs to be accessed by our agent.
-
Create a new BigQuery dataset (replace
YOUR_DATASET_NAMEwith your desired dataset name, e.g.,toolbox_mcp_ds, and optionally specify a location likeUSorEU):export BQ_DATASET_NAME="YOUR_DATASET_NAME" export BQ_LOCATION="US" bq --location=$BQ_LOCATION mk $BQ_DATASET_NAMEYou can also do this through the Google Cloud Console.
-
The
hotelstable needs to be defined in your new dataset. First, create a file namedcreate_hotels_table.sqlwith the following content:CREATE TABLE IF NOT EXISTS `YOUR_PROJECT_ID.YOUR_DATASET_NAME.hotels` ( id INT64 NOT NULL, name STRING NOT NULL, location STRING NOT NULL, price_tier STRING NOT NULL, checkin_date DATE NOT NULL, checkout_date DATE NOT NULL, booked BOOLEAN NOT NULL );Note: Replace
YOUR_PROJECT_IDandYOUR_DATASET_NAMEin the SQL with your actual project ID and dataset name.Then run the command below to execute the sql query:
bq query --project_id=$GOOGLE_CLOUD_PROJECT --dataset_id=$BQ_DATASET_NAME --use_legacy_sql=false < create_hotels_table.sql -
. Next, populate the hotels table with some initial data. To do this, create a file named
insert_hotels_data.sqland add the following SQL INSERT statement to it.INSERT INTO `YOUR_PROJECT_ID.YOUR_DATASET_NAME.hotels` (id, name, location, price_tier, checkin_date, checkout_date, booked) VALUES (1, 'Hilton Basel', 'Basel', 'Luxury', '2024-04-20', '2024-04-22', FALSE), (2, 'Marriott Zurich', 'Zurich', 'Upscale', '2024-04-14', '2024-04-21', FALSE), (3, 'Hyatt Regency Basel', 'Basel', 'Upper Upscale', '2024-04-02', '2024-04-20', FALSE), (4, 'Radisson Blu Lucerne', 'Lucerne', 'Midscale', '2024-04-05', '2024-04-24', FALSE), (5, 'Best Western Bern', 'Bern', 'Upper Midscale', '2024-04-01', '2024-04-23', FALSE), (6, 'InterContinental Geneva', 'Geneva', 'Luxury', '2024-04-23', '2024-04-28', FALSE), (7, 'Sheraton Zurich', 'Zurich', 'Upper Upscale', '2024-04-02', '2024-04-27', FALSE), (8, 'Holiday Inn Basel', 'Basel', 'Upper Midscale', '2024-04-09', '2024-04-24', FALSE), (9, 'Courtyard Zurich', 'Zurich', 'Upscale', '2024-04-03', '2024-04-13', FALSE), (10, 'Comfort Inn Bern', 'Bern', 'Midscale', '2024-04-04', '2024-04-16', FALSE);Note: Replace
YOUR_PROJECT_IDandYOUR_DATASET_NAMEin the SQL with your actual project ID and dataset name.Then run the command below to execute the sql query:
bq query --project_id=$GOOGLE_CLOUD_PROJECT --dataset_id=$BQ_DATASET_NAME --use_legacy_sql=false < insert_hotels_data.sql
Step 2: Install and configure Toolbox
In this section, we will download Toolbox, configure our tools in a
tools.yaml, and then run the Toolbox server.
-
Download the latest version of Toolbox as a binary:
{{< notice tip >}} Select the correct binary corresponding to your OS and CPU architecture. {{< /notice >}}
export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64 curl -O https://storage.googleapis.com/genai-toolbox/v0.27.0/$OS/toolbox -
Make the binary executable:
chmod +x toolbox -
Write the following into a
tools.yamlfile. You must replace theYOUR_PROJECT_IDandYOUR_DATASET_NAMEplaceholder in the config with your actual BigQuery project and dataset name. Thelocationfield is optional; if not specified, it defaults to 'us'. The table namehotelsis used directly in the statements.{{< notice tip >}} Authentication with BigQuery is handled via Application Default Credentials (ADC). Ensure you have run
gcloud auth application-default login. {{< /notice >}}kind: sources name: my-bigquery-source type: bigquery project: YOUR_PROJECT_ID location: us --- kind: tools name: search-hotels-by-name type: bigquery-sql source: my-bigquery-source description: Search for hotels based on name. parameters: - name: name type: string description: The name of the hotel. statement: SELECT * FROM `YOUR_DATASET_NAME.hotels` WHERE LOWER(name) LIKE LOWER(CONCAT('%', @name, '%')); --- kind: tools name: search-hotels-by-location type: bigquery-sql source: my-bigquery-source description: Search for hotels based on location. parameters: - name: location type: string description: The location of the hotel. statement: SELECT * FROM `YOUR_DATASET_NAME.hotels` WHERE LOWER(location) LIKE LOWER(CONCAT('%', @location, '%')); --- kind: tools name: book-hotel type: bigquery-sql source: my-bigquery-source description: >- Book a hotel by its ID. If the hotel is successfully booked, returns a NULL, raises an error if not. parameters: - name: hotel_id type: integer description: The ID of the hotel to book. statement: UPDATE `YOUR_DATASET_NAME.hotels` SET booked = TRUE WHERE id = @hotel_id; --- kind: tools name: update-hotel type: bigquery-sql source: my-bigquery-source description: >- Update a hotel's check-in and check-out dates by its ID. Returns a message indicating whether the hotel was successfully updated or not. parameters: - name: checkin_date type: string description: The new check-in date of the hotel. - name: checkout_date type: string description: The new check-out date of the hotel. - name: hotel_id type: integer description: The ID of the hotel to update. statement: >- UPDATE `YOUR_DATASET_NAME.hotels` SET checkin_date = PARSE_DATE('%Y-%m-%d', @checkin_date), checkout_date = PARSE_DATE('%Y-%m-%d', @checkout_date) WHERE id = @hotel_id; --- kind: tools name: cancel-hotel type: bigquery-sql source: my-bigquery-source description: Cancel a hotel by its ID. parameters: - name: hotel_id type: integer description: The ID of the hotel to cancel. statement: UPDATE `YOUR_DATASET_NAME.hotels` SET booked = FALSE WHERE id = @hotel_id; --- kind: toolsets name: my-toolset tools: - search-hotels-by-name - search-hotels-by-location - book-hotel - update-hotel - cancel-hotelFor more info on tools, check out the Tools section.
-
Run the Toolbox server, pointing to the
tools.yamlfile created earlier:./toolbox --tools-file "tools.yaml"
Step 3: Connect to MCP Inspector
-
Run the MCP Inspector:
npx @modelcontextprotocol/inspector -
Type
ywhen it asks to install the inspector package. -
It should show the following when the MCP Inspector is up and running (please take note of
<YOUR_SESSION_TOKEN>):Starting MCP inspector... ⚙️ Proxy server listening on localhost:6277 🔑 Session token: <YOUR_SESSION_TOKEN> Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth 🚀 MCP Inspector is up and running at: http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<YOUR_SESSION_TOKEN> -
Open the above link in your browser.
-
For
Transport Type, selectStreamable HTTP. -
For
URL, type inhttp://127.0.0.1:5000/mcp. -
For
Configuration->Proxy Session Token, make sure<YOUR_SESSION_TOKEN>is present. -
Click Connect.
-
Select
List Tools, you will see a list of tools configured intools.yaml. -
Test out your tools here!

