Visitar URL original
mcp-toolbox-sdk-js/packages/toolbox-core/README.md at main · googleapis/mcp-toolbox-sdk-js · GitHub
Skip to content

Latest commit

 

History

History
89 lines (63 loc) · 3.82 KB

README.md

File metadata and controls

89 lines (63 loc) · 3.82 KB

MCP Toolbox Logo

MCP Toolbox SDKs for Javascript

License: Apache 2.0

The @toolbox-sdk/core package provides a Javascript interface to the MCP Toolbox service, enabling you to load and invoke tools from your own applications. It is framework-agnostic and designed to seamlessly integrate with popular orchestration frameworks like Langchain and Genkit.

For detailed guides, authentication examples, and advanced configuration, visit the JS SDK Core Guide.

Supported Environments

This SDK is a standard Node.js package built with TypeScript, ensuring broad compatibility with the modern JavaScript ecosystem.

  • Node.js: Actively supported on Node.js v18.x and higher. The package is compatible with both modern ES Modules (import) and legacy CommonJS (require).
  • TypeScript: The SDK is written in TypeScript and ships with its own type declarations, providing a first-class development experience with autocompletion and type-checking out of the box.
  • JavaScript: Fully supports modern JavaScript in Node.js environments.

Installation

npm install @toolbox-sdk/core

Quickstart

Here's a minimal example to get you started. Ensure your Toolbox service is running and accessible.

import { ToolboxClient } from '@toolbox-sdk/core';  
const client = new ToolboxClient(URL);  

async function quickstart() {  
  try {  
      const tools = await client.loadToolset();  
      // Use tools  
  } catch (error) {  
      console.error("unable to load toolset:", error.message);  
  }  
}  
quickstart();  

Note

This guide uses modern ES Module (import) syntax. If your project uses CommonJS, you can import the library using require: const { ToolboxClient } = require('@toolbox-sdk/core');.

Usage

The core package provides a framework-agnostic way to interact with your MCP Toolbox server. For detailed guides and advanced configuration, please visit the following sections on our Documentation Site:

Contributing

Contributions are welcome! Please refer to the DEVELOPER.md file for guidelines on how to set up a development environment and run tests.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Support

If you encounter issues or have questions, check the existing GitHub Issues for the main Toolbox project.