Purpose: langchain-mcp provides Model Context Protocol (MCP) tool calling support for LangChain, with the goal of integrating MCP tools into LangChain's tool calling system. The project repository is https://github.com/rectalogic/langchain-mcp。
Main capabilities: This project provides langchain_mcp.MCPToolkit, which can be used together with mcp.ClientSession. After creating MCPToolkit, initialize it via await toolkit.initialize(), then call toolkit.get_tools() to obtain a list of langchain_core.tools.BaseTool for use with LangChain. The repository includes tests/demo.py, which can be used for demonstration; the materials mention that this demo can be run against Groq llama-3.1-8b-instant.
Usage: The core workflow given in the materials is: create langchain_mcp.MCPToolkit and pass in mcp.ClientSession, then await toolkit.initialize() to complete initialization, and finally call toolkit.get_tools() to obtain the LangChain tool list. The materials do not provide installation commands, dependency versions, complete configuration parameters, or end-to-end deployment steps.
Applicable scenarios: Suitable for developers or projects that need to call MCP tools in LangChain and convert MCP tools into LangChain BaseTool. The demo code in the repository can also be referenced to understand the basic calling method.
Limitations and notes: The repository description notes that LangChain now has a more official implementation, langchain-mcp-adapters, so project selection should be evaluated in light of this note before use. The materials do not provide pricing model, price, supported platforms, license, maintenance status, performance, or security information; this information is not currently available.