Python SDK for interacting with the Toolbox service with LlamaIndex
Reason this release was yanked:
Underlying orchestration is not v1 yet.
Project description
MCP Toolbox LlamaIndex SDK
This SDK allows you to seamlessly integrate the functionalities of MCP Toolbox into your LlamaIndex LLM applications, enabling advanced orchestration and interaction with GenAI models.
For detailed guides, authentication examples, and advanced configuration, visit the Python SDK LlamaIndex Guide.
Table of Contents
Installation
pip install toolbox-llamaindex
Quickstart
Here's a minimal example to get you started using LlamaIndex:
import asyncio
from llama_index.llms.google_genai import GoogleGenAI
from llama_index.core.agent.workflow import AgentWorkflow
from toolbox_llamaindex import ToolboxClient
async def run_agent():
async with ToolboxClient("http://127.0.0.1:5000") as toolbox:
tools = toolbox.load_toolset()
vertex_model = GoogleGenAI(
model="gemini-3-flash-preview",
vertexai_config={"project": "project-id", "location": "us-central1"},
)
agent = AgentWorkflow.from_tools_or_functions(
tools,
llm=vertex_model,
system_prompt="You are a helpful assistant.",
)
response = await agent.run(user_msg="Get some response from the agent.")
print(response)
asyncio.run(run_agent())
Usage
The toolbox-llamaindex package provides a dedicated integration to seamlessly load and use MCP Toolbox tools within the LlamaIndex orchestration framework. For detailed guides and advanced configuration, please visit the following sections on our Documentation Site:
- Transport Protocols
- Loading Tools
- Use with LlamaIndex
- Manual Usage
- Client to Server Authentication
- Authenticating Tools
- Binding Parameter Values
- Asynchronous Usage
- OpenTelemetry
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toolbox_llamaindex-1.0.0.tar.gz.
File metadata
- Download URL: toolbox_llamaindex-1.0.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15a1e2137e4154e50c87bf0a6c61c74555e959b8a6c622b0d0d99bd418672a52
|
|
| MD5 |
ff3de1c961f0fdbcc4b579243957b355
|
|
| BLAKE2b-256 |
addf5f93cc9bd153bcb0ec9383a34e21806893199638fb5a1a60acdb9d4d937a
|
Provenance
The following attestation bundles were made for toolbox_llamaindex-1.0.0.tar.gz:
Publisher:
google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toolbox_llamaindex-1.0.0.tar.gz -
Subject digest:
15a1e2137e4154e50c87bf0a6c61c74555e959b8a6c622b0d0d99bd418672a52 - Sigstore transparency entry: 1181313571
- Sigstore integration time:
-
Token Issuer:
https://accounts.google.com -
Service Account:
google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com
-
Statement type:
File details
Details for the file toolbox_llamaindex-1.0.0-py3-none-any.whl.
File metadata
- Download URL: toolbox_llamaindex-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b452b7813a1626aacb17b29718379d16e6d115213421072ccfe6c1ea002f1ff9
|
|
| MD5 |
cd06b9ea483452792c0c7d9c615ab660
|
|
| BLAKE2b-256 |
ebbb25e6f73caef862598d6e09c7eaa6298131786b02f4fb6969df95eaed9484
|
Provenance
The following attestation bundles were made for toolbox_llamaindex-1.0.0-py3-none-any.whl:
Publisher:
google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toolbox_llamaindex-1.0.0-py3-none-any.whl -
Subject digest:
b452b7813a1626aacb17b29718379d16e6d115213421072ccfe6c1ea002f1ff9 - Sigstore transparency entry: 1181313564
- Sigstore integration time:
-
Token Issuer:
https://accounts.google.com -
Service Account:
google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com
-
Statement type: