Skip to main content

MCP Toolbox Logo

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:

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toolbox_langchain-1.2.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolbox_langchain-1.2.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file toolbox_langchain-1.2.0.tar.gz.

File metadata

  • Download URL: toolbox_langchain-1.2.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for toolbox_langchain-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a20f862785a9d4a3abc648d846b9cd9d1ce810a779914c624918358c47ba0a47
MD5 b2360368ef5a4083dfb3c40606a91a38
BLAKE2b-256 01e48897cd569ec04699c14eecd9600aeaa7c80db46c46007ec7c0b8f7c3005d

See more details on using hashes here.

Provenance

The following attestation bundles were made for toolbox_langchain-1.2.0.tar.gz:

Publisher: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

File details

Details for the file toolbox_langchain-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for toolbox_langchain-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b161a22b9cec145b0d7407f1c5f16e4c06aa385db4246a4ebd89c7ea9525b250
MD5 e6d3a296d3b0455f78b4670d8ff335b1
BLAKE2b-256 ee7b2b84f3b6e19ddbc1abff58fa0c116ccb98acf9fa69b8c9ea41632063a458

See more details on using hashes here.

Provenance

The following attestation bundles were made for toolbox_langchain-1.2.0-py3-none-any.whl:

Publisher: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: google-cloud-sdk-py@oss-exit-gate-prod.iam.gserviceaccount.com

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page