Simple MCP Client
by simozampa
A lightweight implementation of a multiserver MCP client using a LangGraph agent with Express.js and TypeScript. It enables integration with multiple MCP servers for enhanced tool usage in conversations.
Last updated: N/A
What is Simple MCP Client?
This is a simple MCP (Model Context Protocol) client built with Express.js and TypeScript, leveraging a LangGraph agent to manage conversations and integrate tools from multiple MCP servers. It allows you to interact with various services through a unified interface.
How to use Simple MCP Client?
- Clone the repository. 2. Install dependencies using
npm install
. 3. Configure environment variables in a.env
file. 4. Build and start the server usingnpm run build
andnpm start
. 5. Use the API endpoints to initialize, generate, and close chats, providing necessary parameters like input, character ID, LLM configuration, and MCP server details.
Key features of Simple MCP Client
Express.js server with TypeScript
LangGraph agent for conversation handling
MCP client for tool integration
Streaming responses
Use cases of Simple MCP Client
Integrating multiple AI models and services
Building conversational AI applications
Creating agents that can access external tools
Orchestrating complex workflows with multiple services
FAQ from Simple MCP Client
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It's a protocol for AI models to access external tools and services.
What is LangGraph?
What is LangGraph?
LangGraph is a framework for building conversational AI agents with complex workflows.
How do I configure the MCP servers?
How do I configure the MCP servers?
You need to specify the MCP server details (name, version, URL, and optional API key) in the mcpServers
array in the request body.
What LLM models are supported?
What LLM models are supported?
The client is designed to be flexible and can support various LLM models. The example uses 'claude-3-opus-20240229', but you can configure it with other models by modifying the llmConfig
in the request.
How do I handle streaming responses?
How do I handle streaming responses?
The API returns streaming responses. You can use response.body.getReader()
to read the stream and process the data chunks as they arrive.