Cover image
Try Now
2024-12-17

LangChain.js client for Model Context Protocol.

3 years

Works with Finder

1

Github Watches

2

Github Forks

28

Github Stars

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 });

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • WILLIAM JOEL FOTEPING
  • Friendly music guide for 60s-2000s songs, with links to listen online.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Khalid kalib
  • Write professional emails

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Teach you all the details related to YouTube. Solve all your YouTube-related issues.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • oatpp
  • Anthropic’s Model Context Protocol implementation for Oat++

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

    Reviews

    1 (1)
    Avatar
    user_zdRzl20C
    2025-04-15

    As a dedicated user of the MCP Server by Protagonistss, I highly recommend it for anyone looking for a reliable server solution. It's robust, efficient, and user-friendly, making server management a breeze. The support and regular updates from Protagonistss ensure that the server stays current with the latest technology trends. For more details, check out their official page: https://mcp.so/server/code-mcp-server/Protagonistss.