|
| 1 | +--- |
| 2 | +title: "Javascript" |
| 3 | +type: docs |
| 4 | +weight: 2 |
| 5 | +description: > |
| 6 | + Javascript SDKs to connect to the MCP Toolbox server. |
| 7 | +--- |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +The MCP Toolbox service provides a centralized way to manage and expose tools |
| 12 | +(like API connectors, database query tools, etc.) for use by GenAI applications. |
| 13 | + |
| 14 | +These JS SDKs act as clients for that service. They handle the communication needed to: |
| 15 | + |
| 16 | +* Fetch tool definitions from your running Toolbox instance. |
| 17 | +* Provide convenient JS objects or functions representing those tools. |
| 18 | +* Invoke the tools (calling the underlying APIs/services configured in Toolbox). |
| 19 | +* Handle authentication and parameter binding as needed. |
| 20 | + |
| 21 | +By using these SDKs, you can easily leverage your Toolbox-managed tools directly |
| 22 | +within your JS applications or AI orchestration frameworks. |
| 23 | + |
| 24 | +## Which Package Should I Use? |
| 25 | + |
| 26 | +Choosing the right package depends on how you are building your application: |
| 27 | + |
| 28 | +- [`@toolbox-sdk/core`](https://github.com/googleapis/mcp-toolbox-sdk-js/tree/main/packages/toolbox-core): |
| 29 | + This is a framework agnostic way to connect the tools to popular frameworks |
| 30 | + like Langchain, LlamaIndex and Genkit. |
| 31 | +- [`@toolbox-sdk/adk`](https://github.com/googleapis/mcp-toolbox-sdk-js/tree/main/packages/toolbox-adk): |
| 32 | + This package provides a seamless way to connect to [Google ADK TS](https://github.com/google/adk-js). |
| 33 | + |
| 34 | +## Available Packages |
| 35 | + |
| 36 | +This repository hosts the following TS packages. See the package-specific |
| 37 | +README for detailed installation and usage instructions: |
| 38 | + |
| 39 | +| Package | Target Use Case | Integration | Path | Details (README) | Npm Version | |
| 40 | +| :------ | :---------- | :---------- | :---------------------- | :---------- | :---------- | |
| 41 | +| `toolbox-core` | Framework-agnostic / Custom applications | Use directly / Custom | `packages/toolbox-core/` | 📄 [View README](https://github.com/googleapis/mcp-toolbox-sdk-js/blob/main/packages/toolbox-core/README.md) |  | |
| 42 | +| `toolbox-adk` | ADK applications | ADK | `packages/toolbox-adk/` | 📄 [View README](https://github.com/googleapis/mcp-toolbox-sdk-js/blob/main/packages/toolbox-adk/README.md) |  | |
| 43 | + |
| 44 | + |
| 45 | +## Getting Started |
| 46 | + |
| 47 | +To get started using Toolbox tools with an application, follow these general steps: |
| 48 | + |
| 49 | +1. **Set up and Run the Toolbox Service:** |
| 50 | + |
| 51 | + Before using the SDKs, you need the main MCP Toolbox service running. Follow |
| 52 | + the instructions here: [**Toolbox Getting Started |
| 53 | + Guide**](https://github.com/googleapis/genai-toolbox?tab=readme-ov-file#getting-started) |
| 54 | + |
| 55 | +2. **Install the Appropriate SDK:** |
| 56 | + |
| 57 | + Choose the package based on your needs (see "[Which Package Should I Use?](#which-package-should-i-use)" above) and install it: |
| 58 | + |
| 59 | + ```bash |
| 60 | + # For the core, framework-agnostic SDK |
| 61 | + npm install @toolbox-sdk/core |
| 62 | + |
| 63 | + # For ADK applications |
| 64 | + npm install @toolbox-sdk/adk |
| 65 | + ``` |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +{{< notice note >}} |
| 70 | +Source code for [js-sdk](https://github.com/googleapis/mcp-toolbox-sdk-js) |
| 71 | +{{< /notice >}} |
0 commit comments