toolbox-core

Python Base SDK for interacting with the Toolbox service

19 个版本 Python >=3.10
安装
pip install toolbox-core
poetry add toolbox-core
pipenv install toolbox-core
conda install toolbox-core
描述

MCP Toolbox Logo

MCP Toolbox Core SDK

PyPI version PyPI - Python Version Coverage Status

This SDK allows you to seamlessly integrate the functionalities of MCP Toolbox allowing you to load and use tools defined in the service as standard Python functions within your GenAI applications.

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

Installation

pip install toolbox-core

Quickstart

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

import asyncio
from toolbox_core import ToolboxClient

async def main():
    # Replace with the actual URL where your Toolbox service is running
    async with ToolboxClient("http://127.0.0.1:5000") as toolbox:
        weather_tool = await toolbox.load_tool("get_weather")
        result = await weather_tool(location="London")
        print(result)

if __name__ == "__main__":
    asyncio.run(main())

Usage

The core package provides a framework-agnostic way to interact with your 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.