Sponsored by Deepsite.site

MCP Tools Usage From LangChain / Example in TypeScript

Created By
hideyaa year ago
MCP Tools Usage From LangChain ReAct Agent / Example in TypeScript
Overview

What is the Simple MCP Client?

The Simple MCP Client is a straightforward implementation of a Model Context Protocol (MCP) client using LangChain and TypeScript, designed to demonstrate the use of MCP server tools.

How to use the Simple MCP Client?

To use the Simple MCP Client, follow these steps:

  1. Install the necessary dependencies using npm install.
  2. Set up your API key by copying the .env.template to .env and updating it with your credentials.
  3. Run the application with npm start.

Key features of the Simple MCP Client?

  • Utilizes LangChain to interact with MCP servers.
  • Supports parallel initialization of multiple MCP servers.
  • Converts MCP tools into LangChain-compatible tools for easy integration.
  • Includes support for both Anthropic's and OpenAI's language models.

Use cases of the Simple MCP Client?

  1. Building applications that require interaction with multiple language models.
  2. Developing tools that leverage the Model Context Protocol for enhanced functionality.
  3. Creating conversational agents that utilize LangChain's capabilities.

FAQ from the Simple MCP Client?

  • What are the prerequisites for using the Simple MCP Client?

You need Node.js 16+, npm 7+, and an API key from either Anthropic or OpenAI.

  • Is there a Python equivalent of this client?

Yes, a Python version is available at this link.

  • Can I run this client without an API key?

No, an API key is required to access the language models.

Recommend Clients
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
A Sleek AI Assistant & MCP Client5ire is a cross-platform desktop AI assistant, MCP client. It compatible with major service providers, supports local knowledge base and tools via model context protocol servers .
Cherry Studio🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Refact.aiOpen-source AI Agent for VS Code and JetBrains that autonomously solves coding tasks end-to-end.
LutraLutra is the first MCP compatible client built for everyone
MCP PlaygroundCall MCP Server Tools Online
DeepChatYour AI Partner on Desktop
ZedCode at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Roo Code (prev. Roo Cline)Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
Cline – #1 on OpenRouterAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
y-cli 🚀A Tiny Terminal Chat App for AI Models with MCP Client Support
chatmcpChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
LINKAGOGO-MCP---BOOKMARK-MANAGERManage your LinkaGoGo bookmarks through any AI assistant that supports the Model Context Protocol (MCP). Search, add, organize, tag, move, and export bookmarks conversationally — 16 tools for full bookmark and folder management. Connect via Claude.ai, Claude Desktop, or any MCP-compatible client.
MCP ConnectEnables cloud-based AI services to access local Stdio based MCP servers via HTTP requests
Continue⏩ Create, share, and use custom AI code assistants with our open-source IDE extensions and hub of models, rules, prompts, docs, and other building blocks
HyperChatHyperChat is a Chat client that strives for openness, utilizing APIs from various LLMs to achieve the best Chat experience, as well as implementing productivity tools through the MCP protocol.