This PR introduces a significant update to the Toolbox configuration file format, which is one of the primary **breaking changes** required for the implementation of the Advanced Control Plane. # Summary of Changes The configuration schema has been updated to enforce resource isolation and facilitate atomic, incremental updates. * Resource Isolation: Resource definitions are now separated into individual blocks, using a distinct structure for each resource type (Source, Tool, Toolset, etc.). This improves readability, management, and auditing of configuration files. * Field Name Modification: Internal field names have been modified to align with declarative methodologies. Specifically, the configuration now separates kind (general resource type, e.g., Source) from type (specific implementation, e.g., Postgres). # User Impact Existing tools.yaml configuration files are now in an outdated format. Users must eventually update their files to the new YAML format. # Mitigation & Compatibility Backward compatibility is maintained during this transition to ensure no immediate user action is required for existing files. * Immediate Backward Compatibility: The source code includes a pre-processing layer that automatically detects outdated configuration files (v1 format) and converts them to the new v2 format under the hood. * [COMING SOON] Migration Support: The new toolbox migrate subcommand will be introduced to allow users to automatically convert their old configuration files to the latest format. # Example Example for config file v2: ``` kind: sources name: my-pg-instance type: cloud-sql-postgres project: my-project region: my-region instance: my-instance database: my_db user: my_user password: my_pass --- kind: authServices name: my-google-auth type: google clientId: testing-id --- kind: tools name: example_tool type: postgres-sql source: my-pg-instance description: some description statement: SELECT * FROM SQL_STATEMENT; parameters: - name: country type: string description: some description --- kind: tools name: example_tool_2 type: postgres-sql source: my-pg-instance description: returning the number one statement: SELECT 1; --- kind: toolsets name: example_toolset tools: - example_tool ``` --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Averi Kitsch <akitsch@google.com>
4.2 KiB
title, type, weight, description
| title | type | weight | description |
|---|---|---|---|
| Quickstart (MCP with Neo4j) | docs | 1 | How to get started running Toolbox with MCP Inspector and Neo4j 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 Neo4j Database and Data
In this section, you'll set up a database and populate it with sample data for a movies-related agent. This guide assumes you have a running Neo4j instance, either locally or in the cloud.
. Populate the database with data. To make this quickstart straightforward, we'll use the built-in Movies dataset available in Neo4j.
. In your Neo4j Browser, run the following command to create and populate the database: +
:play movies
. Follow the instructions to load the data. This will create a graph with Movie, Person, and Actor nodes and their relationships.
Step 2: Install and configure Toolbox
In this section, we will install the MCP Toolbox, configure our tools in a tools.yaml file, and then run the Toolbox server.
. Install the Toolbox binary. The simplest way to get started is to download the latest binary for your operating system.
. Download the latest version of Toolbox as a binary: +
export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64
curl -O [https://storage.googleapis.com/genai-toolbox/v0.16.0/$OS/toolbox](https://storage.googleapis.com/genai-toolbox/v0.16.0/$OS/toolbox)
. Make the binary executable: +
chmod +x toolbox
. Create the tools.yaml file.
This file defines your Neo4j source and the specific tools that will be exposed to your AI agent.
+
{{< notice tip >}}
Authentication for the Neo4j source uses standard username and password fields. For production use, it is highly recommended to use environment variables for sensitive information like passwords.
{{< /notice >}}
+
Write the following into a tools.yaml file:
+
kind: sources
name: my-neo4j-source
type: neo4j
uri: bolt://localhost:7687
user: neo4j
password: my-password # Replace with your actual password
---
kind: tools
name: search-movies-by-actor
type: neo4j-cypher
source: my-neo4j-source
description: "Searches for movies an actor has appeared in based on their name. Useful for questions like 'What movies has Tom Hanks been in?'"
parameters:
- name: actor_name
type: string
description: The full name of the actor to search for.
statement: |
MATCH (p:Person {name: $actor_name}) -[:ACTED_IN]-> (m:Movie)
RETURN m.title AS title, m.year AS year, m.genre AS genre
---
kind: tools
name: get-actor-for-movie
type: neo4j-cypher
source: my-neo4j-source
description: "Finds the actors who starred in a specific movie. Useful for questions like 'Who acted in Inception?'"
parameters:
- name: movie_title
type: string
description: The exact title of the movie.
statement: |
MATCH (p:Person) -[:ACTED_IN]-> (m:Movie {title: $movie_title})
RETURN p.name AS actor
. Start the Toolbox server.
Run the Toolbox server, pointing to the tools.yaml file you created earlier.
+
./toolbox --tools-file "tools.yaml"
Step 3: Connect to MCP Inspector
. Run the MCP Inspector: +
npx @modelcontextprotocol/inspector
. Type y when 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!