MCP Catalogs
Homelangchain-mcp-tools-ts screenshot

langchain-mcp-tools-ts

by hideya·23·Score 40

A TypeScript utility to convert MCP server tools into LangChain-compatible tools with schema adjustments for LLM compatibility.

developer-toolsai-llmother
8
Forks
0
Open issues
2 mo ago
Last commit
2d ago
Indexed

Overview

langchain-mcp-tools-ts is a lightweight library that enables integration of Model Context Protocol (MCP) server tools with LangChain in TypeScript. It provides a utility function to convert MCP server configurations into LangChain tools, handling parallel initialization of multiple MCP servers. The library supports various MCP server types including local Node.js, Python, and remote HTTP/WebSocket servers. It offers features like provider-specific schema transformations to prevent compatibility issues with different LLM providers, tools invocation logging, and proper resource cleanup.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Integrating MCP tools like filesystem, GitHub, or Brave search with LangChain agents
you:Creating custom LangChain applications using MCP servers without implementing MCP protocol
you:Developing proof-of-concepts for AI applications that need access to external data sources
you:What LLM providers are supported for schema transformations?
you:How do I handle authentication with MCP servers that require OAuth?

When to choose this

Choose this when working with TypeScript/LangChain and need to integrate multiple MCP servers with LLM provider-specific schema compatibility.

When NOT to choose this

Consider using LangChain's official MCP adapters if you need comprehensive integration with all MCP features beyond Tools.

Comparable tools

@langchain/mcp-adapterslangchain-mcp-tools-py

Installation

Install with npm:

npm i @h1deya/langchain-mcp-tools

Example configuration for Claude Desktop (convert to MCP servers config):

{
  "filesystem": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
  },
  "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"]
  }
}

FAQ

What LLM providers are supported for schema transformations?
The library supports schema transformations for Google Gemini, OpenAI, Anthropic, and XAI. Other providers use default schemas without transformations.
How do I handle authentication with MCP servers that require OAuth?
For MCP servers requiring OAuth, the library suggests using 'mcp-remote' as a command with the server URL provided as an argument.

Compare langchain-mcp-tools-ts with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.