Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/toolbox-adk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Toolbox ADK Integration

This package allows Google ADK agents to natively use tools from the MCP Toolbox.

## Installation

```bash
pip install toolbox-adk
```

## Usage

```python
from toolbox_adk import ToolboxToolset, CredentialStrategy

# Configure auth (e.g., Use the agent's identity)
creds = CredentialStrategy.TOOLBOX_IDENTITY()

# Create the toolset
toolset = ToolboxToolset(
server_url="http://localhost:5000",
credentials=creds
)

# Use in your agent
# agent = Agent(tools=toolset.get_tools())
```
52 changes: 52 additions & 0 deletions packages/toolbox-adk/integration.cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

steps:
- id: Install library requirements
name: 'python:${_VERSION}'
dir: 'packages/toolbox-adk'
args:
- install
- '-r'
- 'requirements.txt'
- '--user'
entrypoint: pip
- id: Install test requirements
name: 'python:${_VERSION}'
args:
- install
- '-e'
- 'packages/toolbox-adk[test]'
- '--user'
entrypoint: pip
- id: Run integration tests
name: 'python:${_VERSION}'
dir: 'packages/toolbox-adk'
env:
- TOOLBOX_URL=$_TOOLBOX_URL
- TOOLBOX_VERSION=$_TOOLBOX_VERSION
- GOOGLE_CLOUD_PROJECT=$PROJECT_ID
- TOOLBOX_MANIFEST_VERSION=${_TOOLBOX_MANIFEST_VERSION}
args:
- '-c'
- >-
python -m pytest --cov=src/toolbox_adk --cov-report=term --cov-fail-under=90 tests/
entrypoint: /bin/bash
options:
logging: CLOUD_LOGGING_ONLY
substitutions:
_VERSION: '3.13'
# Default values (can be overridden by triggers)
_TOOLBOX_VERSION: '0.22.0'
_TOOLBOX_MANIFEST_VERSION: '34'
65 changes: 65 additions & 0 deletions packages/toolbox-adk/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[project]
name = "toolbox-adk"
dynamic = ["version"]
description = "ADK Integration for MCP Toolbox"
readme = "README.md"
authors = [{name = "Google LLC", email = "[email protected]"}]
license = {file = "LICENSE"}
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
]
requires-python = ">=3.10"
dependencies = [
"toolbox-core>=0.5.4",
"google-auth>=2.43.0,<3.0.0",
"google-auth-oauthlib>=1.2.0,<2.0.0",
"google-adk>=1.20.0,<2.0.0",
"typing-extensions>=4.0.0"
]

[project.urls]
Homepage = "https://github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-adk"
Repository = "https://github.com/googleapis/mcp-toolbox-sdk-python.git"
"Bug Tracker" = "https://github.com/googleapis/mcp-toolbox-sdk-python/issues"
Changelog = "https://github.com/googleapis/mcp-toolbox-sdk-python/blob/main/packages/toolbox-adk/CHANGELOG.md"

[project.optional-dependencies]
test = [
"black[jupyter]==25.11.0",
"isort==7.0.0",
"mypy==1.19.0",
"pytest==9.0.1",
"pytest-asyncio==1.3.0",
"pytest-cov==7.0.0",
"pytest-mock==3.15.1"
]

# Tells setuptools that packages are under the 'src' directory
[tool.setuptools]
package-dir = {"" = "src"}

[tool.setuptools.dynamic]
version = {attr = "toolbox_adk.version.__version__"}

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.black]
target-version = ['py310']

[tool.isort]
profile = "black"

[tool.mypy]
python_version = "3.10"
warn_unused_configs = true
disallow_incomplete_defs = true
29 changes: 29 additions & 0 deletions packages/toolbox-adk/src/toolbox_adk/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from .version import __version__
from .credentials import CredentialStrategy, CredentialConfig, CredentialType
from .client import ToolboxClient
from .tool import ToolboxTool, ToolboxContext
from .toolset import ToolboxToolset

__all__ = [
"CredentialStrategy",
"CredentialConfig",
"CredentialType",
"ToolboxClient",
"ToolboxTool",
"ToolboxContext",
"ToolboxToolset",
]
15 changes: 15 additions & 0 deletions packages/toolbox-adk/src/toolbox_adk/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.0.1"