{"type":"mcp_client","name":"mcp-client-langchain-ts","description":"This repository provides a TypeScript-based Model Context Protocol (MCP) client that integrates with LangChain ReAct Agent, enabling interaction with LLMs like Anthropic, OpenAI, and Groq through MCP servers.","category":"AI","language":"TypeScript","stars":13,"forks":0,"owner":"hideya","github_url":"https://github.com/hideya/mcp-client-langchain-ts","homepage":null,"setup":"## Setup\n1. Install dependencies:\n    ```bash\n    npm install\n    ```\n\n2. Setup API keys:\n    ```bash\n    cp .env.template .env\n    ```\n    - Update `.env` as needed.\n    - `.gitignore` is configured to ignore `.env`\n      to prevent accidental commits of the credentials.\n\n3. Configure LLM and MCP Servers settings `llm_mcp_config.json5` as needed.\n\n    - [The configuration file format](https://github.com/hideya/mcp-client-langchain-ts/blob/main/llm_mcp_config.json5)\n      for MCP servers follows the same structure as\n      [Claude for Desktop](https://modelcontextprotocol.io/quickstart/user),\n      with one difference: the key name `mcpServers` has been changed\n      to `mcp_servers` to follow the snake_case convention\n      commonly used in JSON configuration files.\n    - The file format is [JSON5](https://json5.org/), where comments and trailing commas are allowed.\n    - The format is further extended to replace `${...}` notations with the values of corresponding environment variables.\n    - Keep all the credentials and private info in the `.env` file and refer to them with `${...}` notation as needed.","tools":"## Available Tools\n\n1.  `convertMcpToLangchainTools()` (Handles parallel initialization of specified multiple MCP servers and converts their available tools into an array of LangChain-compatible tools).\n2.  LangChain ReAct Agent (Demonstrates the use of MCP server tools).\n3.  LLMs from Anthropic, OpenAI and Groq (Currently supported).","faq":null,"created_at":"2024-12-31T13:54:03+00:00","updated_at":"2025-03-28T02:38:52+00:00","source_url":"https://model-context-protocol.com/clients/typescript-langchain-mcp-client-react-agent","related_articles":[]}