MCP Toolbox LangChain SDK
This SDK allows you to seamlessly integrate the functionalities of MCP Toolbox into your LangChain GenAI applications, enabling advanced orchestration and interaction with LLMs.
For detailed guides, authentication examples, and advanced configuration, visit the Python SDK Langchain Guide.
Table of Contents
Installation
pip install toolbox-langchain
Quickstart
Here's a minimal example to get you started using LangGraph:
from toolbox_langchain import ToolboxClient
from langchain_google_vertexai import ChatVertexAI
from langgraph.prebuilt import create_react_agent
async with ToolboxClient("http://127.0.0.1:5000") as toolbox:
tools = toolbox.load_toolset()
model = ChatVertexAI(model="gemini-3-flash-preview")
agent = create_react_agent(model, tools)
prompt = "How's the weather today?"
for s in agent.stream({"messages": [("user", prompt)]}, stream_mode="values"):
message = s["messages"][-1]
if isinstance(message, tuple):
print(message)
else:
message.pretty_print()
Usage
The toolbox-langchain package provids a dedicated integration to seamlessly load and use MCP Toolbox tools within the LangChain orchestration framework. For detailed guides and advanced configuration, please visit the following sections on our Documentation Site:
- Transport Protocols
- Loading Tools
- Use with Langchain
- Use with Langraph
- 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.
Release files for toolbox-langchain 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toolbox_langchain-1.4.0.tar.gz | 21.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toolbox_langchain-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.6 kB
Release files / toolbox_langchain-1.4.0.tar.gz
| Download URL | toolbox_langchain-1.4.0.tar.gz |
|---|---|
| Size | 21.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd028e578e6f35c916c90cd722cf57bd2f07bb487dec70893d32ea912ea43acf
|
|
BLAKE2b-256 checksum How to use checksums |
5054cae91c914314a5f25ec8df9d5f42843cf79cf665829e0f7224eeb3ef5eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by Google Cloud, verified by PyPI on Sep 1, 2026.
Transparency logRelease files / toolbox_langchain-1.4.0-py3-none-any.whl
| Download URL | toolbox_langchain-1.4.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4a3485ea8d385f5fd7f78ed5925eeb748482f5e4106126121bf8cdc358d58e2
|
|
BLAKE2b-256 checksum How to use checksums |
7997d7df4473d5ad01ffa8e910d7959986404de855cb763ef7c33384d9e0656f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by Google Cloud, verified by PyPI on Sep 1, 2026.
Transparency log