trackmcp
Back to directory
isaacwasserman

mcp-langchain-ts-client

View on GitHub

LangChain.js client for Model Context Protocol.

35 stars TypeScriptAI & Machine Learning Updated Oct 21, 2025

Documentation

mcp-langchain-ts-client

A LangChain.js client for Model Context Protocol.

This is a port of rectalogic/langchain-mcp to the JS/TS LangChain and MCP APIs.

Installation

bash
npm install mcp-langchain-ts-client

Usage

typescript
const serverParams = {
  command: "npx",
  args: [
    "-y",
    "@modelcontextprotocol/server-everything"
  ]
}

// Initialize the toolkit
const toolkit = new MCPToolkit(serverParams);
await toolkit.initialize();

// Extract LangChain.js compatible tools
const tools = toolkit.tools;

// Use the tools
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { ChatAnthropic } from "@langchain/anthropic";

const llm = new ChatAnthropic({ model: 'claude-3-5-sonnet-20241022' });
const agent = createReactAgent({ llm, tools });

Frequently asked questions

What is mcp-langchain-ts-client?

mcp-langchain-ts-client is LangChain.js client for Model Context Protocol.

How do I install mcp-langchain-ts-client?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is mcp-langchain-ts-client open source?

Yes, it is hosted on GitHub at https://github.com/isaacwasserman/mcp-langchain-ts-client and has 35 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP