
MCP 到 LangChain 工具转换工具 / TypeScript
概览
一个简单、轻量级的库,用于使用 LangChain 的模型上下文协议(MCP)服务器工具。 该库目前支持 。它支持 MCP 规范。 对于新项目,我们建议使用 LangChain 官方的 LangChain.js MCP 适配器库,该库为 LangChain 提供了全面的 MCP 集成。 该项目目前处于维护/休眠状态。现有用户可以继续使用兼容2025-03-26规范的MCP服务器,但新的MCP协议功能不会在这里积极实现。 一个简单、轻量级的库,用于使用 LangChain 的模型上下文协议(MCP)服务器工具。 其简单性和额外功能,如为LLM兼容性调整工具模式和工具调用日志,使其成为您实验和定制的有用基础。然而,它仅支持工具调用的文本结果,且不支持除工具外的MCP功能。
概述(AI 翻译)
一个简单、轻量级的库 模型上下文协议(MCP) 来自LangChain的服务器工具。
项目状态
该库目前支持 MCP 协议版本 2025-03-26。 它不支持MCP 2026-07-28规范。
对于新项目,我们建议使用 LangChain官方LangChain.js MCP适配器库, 它为LangChain提供了全面的MCP集成。
该项目目前处于维护/休眠状态。现有用户可以继续使用 与兼容2025-03-26规范的MCP服务器使用,但新版本 MCP协议功能不会在此积极实现。
引言
一个简单、轻量级的库 模型上下文协议(MCP) 来自LangChain的服务器工具。
其简洁性和额外功能,例如 工具模式调整以适应LLM兼容性 以及工具调用日志, 让它成为你实验和定制的有用基础。 然而,它仅支持工具调用的文本结果,且不支持除工具外的其他MCP功能。
LangChain 的官方LangChain.js MCP 适配器库, 支持与 LangChain 的全面集成,已发布。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP to LangChain Tools Conversion Library / TypeScript

A simple, lightweight library to use Model Context Protocol (MCP) server tools from LangChain.
Project Status
This library currently supports MCP Protocol version 2025-03-26. It does not support the MCP 2026-07-28 specification.
For new projects, we recommend using LangChain’s official LangChain.js MCP Adapters library, which provides comprehensive MCP integration for LangChain.
This project is now in maintenance / dormant mode. Existing users may continue using it with MCP servers compatible with the 2025-03-26 specification, but new MCP protocol features will not be actively implemented here.
Introduction
A simple, lightweight library to use Model Context Protocol (MCP) server tools from LangChain.
Its simplicity and extra features, such as tools schema adjustments for LLM compatibility and tools invocation logging, make it a useful basis for your experiments and customizations. However, it only supports text results of tool calls and does not support MCP features other than Tools.
LangChain’s official LangChain.js MCP Adapters library, which supports comprehensive integration with LangChain, has been released. For new projects, it is the recommended MCP integration path for LangChain.
Prerequisites
- Node.js 18+
- [optional] npm 7+ (
npx) to run Node.js package-based local MCP servers - [optional]
uv(uvx) installed to run Python-based local (stdio) MCP servers
Installation
npm i @h1deya/langchain-mcp-tools
Quick Start
convertMcpToLangchainTools() utility function accepts MCP server configurations
that follow the same structure as
Claude for Desktop,
but only the contents of the mcpServers property,
and is expressed as a JS Object, e.g.:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →