---
title: MCP Toolbox For Databases | Developer Documentation
description: MCP Toolbox for Databases is an open source MCP server for databases.
---

# MCP Toolbox for Databases

[MCP Toolbox for Databases](https://github.com/googleapis/genai-toolbox) is an open source MCP server for databases. It was designed with enterprise-grade and production-quality in mind. It enables you to develop tools easier, faster, and more securely by handling the complexities such as connection pooling, authentication, and more.

Toolbox Tools can be seemlessly integrated with LlamaIndex applications. For more information on [getting started](https://googleapis.github.io/genai-toolbox/getting-started/local_quickstart_js/) or [configuring](https://googleapis.github.io/genai-toolbox/getting-started/configure/) Toolbox, see the [documentation](https://googleapis.github.io/genai-toolbox/getting-started/introduction/).

![architecture](/images/mcp_db_toolbox.png)

### Configure and deploy

Toolbox is an open source server that you deploy and manage yourself. For more instructions on deploying and configuring, see the official Toolbox documentation:

- [Installing the Server](https://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server)
- [Configuring Toolbox](https://googleapis.github.io/genai-toolbox/getting-started/configure/)

### Install client SDK

LlamaIndex relies on the `@toolbox-sdk/core` node package to use Toolbox. Install the package before getting started:

Terminal window

```
npm install @toolbox-sdk/core
```

### Loading Toolbox Tools

Once your Toolbox server is configured and up and running, you can load tools from your server using the SDK:

```
import { gemini, GEMINI_MODEL } from "@llamaindex/google";
import { agent } from "@llamaindex/workflow";
import { tool } from "llamaindex";
import { ToolboxClient } from "@toolbox-sdk/core";


// Initialize LLM
const llm = gemini({
  model: GEMINI_MODEL.GEMINI_2_0_FLASH,
  apiKey: process.env.GOOGLE_API_KEY,
});


// Replace with your Toolbox Server URL
const URL = 'https://127.0.0.1:5000';


const client = new ToolboxClient("http://127.0.0.1:5000");
const toolboxTools = await client.loadToolset("my-toolset");


const getTool = (toolboxTool) => tool({
  name: toolboxTool.getName(),
  description: toolboxTool.getDescription(),
  parameters: toolboxTool.getParamSchema(),
  execute: toolboxTool
});
const tools = toolboxTools.map(getTool);


const myAgent = agent({
  tools: tools,
  llm,
  memory,
  systemPrompt: prompt,
});
const result = await myAgent.run(query);
console.log(result);
```

### Advanced Toolbox Features

Toolbox has a variety of features to make developing Gen AI tools for databases seamless. For more information, read more about the following:

- [Authenticated Parameters](https://googleapis.github.io/genai-toolbox/resources/tools/#authenticated-parameters): bind tool inputs to values from OIDC tokens automatically, making it easy to run sensitive queries without potentially leaking data
- [Authorized Invocations](https://googleapis.github.io/genai-toolbox/resources/tools/#authorized-invocations): restrict access to use a tool based on the users Auth token
- [OpenTelemetry](https://googleapis.github.io/genai-toolbox/how-to/export_telemetry/): get metrics and tracing from Toolbox with [OpenTelemetry](https://opentelemetry.io/docs/)
