MCP.so
登录

MCP To LangChain Tools Conversion Utility / TypeScript

@hideya

基本信息

分类

AI 与智能体

许可证

MIT

传输方式

stdio

作者

hideya

关于 MCP To LangChain Tools Conversion Utility / TypeScript

MCP to LangChain Tools Conversion Utility / TypeScript

MCP To LangChain Tools Conversion Utility / TypeScript 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

MCP To LangChain Tools Conversion Utility / TypeScript 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP To LangChain Tools Conversion Utility / TypeScript?

A lightweight TypeScript library that converts MCP (Model Context Protocol) server tools into LangChain-compatible StructuredTool objects. It allows developers to integrate any MCP server—local or remote—into LangChain agents and chains with minimal configuration.

How to use MCP To LangChain Tools Conversion Utility / TypeScript?

Install via npm i @h1deya/langchain-mcp-tools, then call convertMcpToLangchainTools() with an McpServersConfig object that mirrors the mcpServers structure from Claude for Desktop. The function returns an array of LangChain tools and a cleanup callback. Use the tools with LangChain models and always invoke cleanup() when done.

Key features of MCP To LangChain Tools Conversion Utility / TypeScript

  • Converts multiple MCP servers into LangChain tools in parallel
  • LLM provider-specific schema transformations (Gemini, OpenAI, etc.)
  • Supports local stdio and remote HTTP, SSE, and WebSocket MCP servers
  • Automatic transport selection and explicit configuration
  • Stderr redirection and working directory control for local servers
  • Concurrent cleanup with error handling

Use cases of MCP To LangChain Tools Conversion Utility / TypeScript

  • Integrate filesystem, fetch, and search MCP tools into a LangChain agent
  • Combine public and private MCP servers (Brave Search, GitHub, Notion) in one application
  • Quickly experiment with custom MCP servers in a LangChain prototype
  • Access the growing ecosystem of 2000+ MCP servers from LangChain

常见问题

1

What are the prerequisites?

Node.js 18+. Optional: npm 7+ for Node.js-based local MCP servers, and `uv` (`uvx`) for Python-based local MCP servers.

2

Does it support remote MCP servers?

Yes. It supports Streamable HTTP, SSE, and WebSocket transports. Transport is auto-detected or can be set explicitly via a `type` or `transport` field.

3

What are the known limitations?

Only text results of tool calls are supported—image or other content types are filtered out. Only the MCP Tools feature is implemented; Resources, Prompts, and Sampling are not supported.

4

How does the library handle schema compatibility?

When the `llmProvider` option is specified, the library performs provider-specific JSON schema transformations to prevent compatibility issues (e.g., for Google Gemini or OpenAI). Set it if you encounter schema-related warnings or errors.

5

How does cleanup work?

The `cleanup` function closes all MCP server connections concurrently and logs any failures. It continues cleanup of remaining servers even if some fail. Always call it in a `finally` block after using the tools.

评论

AI 与智能体 分类下的更多 MCP 服务器