Skip to content

MCP Toolbox for Databases

MCP Toolbox for Databases 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 Genkit applications. For more information on getting started or configuring Toolbox, see the documentation.

architecture

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

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

Terminal window
npm install @toolbox-sdk/core

Once you’re Toolbox server is configured and up and running, you can load tools from your server using ADK:

import {ToolboxClient} from '@toolbox-sdk/core';
import { genkit, z } from 'genkit';
const ai = genkit({
plugins: [googleAI()],
model: googleAI.model('gemini-1.5-pro'),
});
// Replace with your Toolbox Server URL
const URL = 'https://127.0.0.1:5000';
let client = ToolboxClient(URL);
toolboxTools = await client.loadToolset('toolsetName');
const getGenkitTool = (toolboxTool) => ai.defineTool({
name: toolboxTool.getName(),
description: toolboxTool.getDescription(),
inputSchema: toolboxTool.getParams(),
},
toolboxTool,
);
const tools = toolboxTools.map(getGenkitTool);
await ai.generate({
prompt: 'Ask some question.',
tools: tools,
});

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

  • Authenticated Parameters: bind tool inputs to values from OIDC tokens automatically, making it easy to run sensitive queries without potentially leaking data
  • Authorized Invocations: restrict access to use a tool based on the users Auth token
  • OpenTelemetry: get metrics and tracing from Toolbox with OpenTelemetry