- MCP Tools Usage From LangChain / Example in TypeScript
MCP Tools Usage From LangChain / Example in TypeScript
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:
- Install the necessary dependencies using
npm install. - Set up your API key by copying the
.env.templateto.envand updating it with your credentials. - 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?
- Building applications that require interaction with multiple language models.
- Developing tools that leverage the Model Context Protocol for enhanced functionality.
- 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.
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
LutraLutra is the first MCP compatible client built for everyone
MCP ConnectEnables cloud-based AI services to access local Stdio based MCP servers via HTTP requests
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 .
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
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.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MCP PlaygroundCall MCP Server Tools Online
WindsurfThe new purpose-built IDE to harness magic
Refact.aiOpen-source AI Agent for VS Code and JetBrains that autonomously solves coding tasks end-to-end.
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop
chatmcpChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
Roo Code (prev. Roo Cline)Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.
Cherry Studio🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.
ZedCode at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
y-cli 🚀A Tiny Terminal Chat App for AI Models with MCP Client Support
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.
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.