LangChain.js client for Model Context Protocol.
Developer Tools
LangChain.jsclientModel Context Protocol
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
npm install mcp-langchain-ts-client
Usage
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 });
Prerequisites
- •Familiarity with the server domain
- •Basic understanding of related technologies
- •Knowledge of Developer Tools
Recommended Server
Details
More Server
Gmail Mcp Server
A Model Context Protocol (MCP) server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
Mcp Server Qwen_max
MCP server for Qwen Max model
Mcp Server Redis
MCP server to interact with Redis Server, AWS Memory DB, etc for caching or other use-cases where in-memory and key-value based storage is appropriate
Wildfly Mcp
WildFly MCP server and other tooling to integrate WildFly in AI space