# langchain-mcp-client

> MCP Client

This repository provides a LangChain client for the Model Context Protocol, enabling seamless connection to MCP servers. It converts MCP tools for use with LangChain, facilitating dynamic conversations.

## Overview

- **Category:** AI
- **Language:** Python
- **Stars:** 10
- **Forks:** 0
- **Owner:** datalayer
- **GitHub:** https://github.com/datalayer/langchain-mcp-client
- **Homepage:** https://datalayer.io
- **Created:** 2025-02-12T06:44:53+00:00
- **Updated:** 2025-03-17T08:43:52+00:00
- **Source:** https://model-context-protocol.com/clients/langchain-model-context-protocol-mcp-client

## Setup

## Setup

The python version should be 3.11 or higher.

```bash
pip install langchain_mcp_client
```

Create a `.env` file containing all the necessary `API_KEYS` to access your LLM.

Configure the LLM, MCP servers, and prompt example in the `llm_mcp_config.json5` file:

1. **LLM Configuration**: Set up your LLM parameters.
2. **MCP Servers**: Specify the MCP servers to connect to.
3. **Example Queries**: Define example queries that invoke MCP server tools. Press Enter to use these example queries when prompted.

## Tools

## Available Tools

1. Seamlessly connect to any MCP servers.
2. Use any LangChain-compatible LLM for flexible model selection.
3. Interact via CLI, enabling dynamic conversations.
4. Conversion to LangChain Tools using `convert_mcp_to_langchain_tools()`.

