mcp_client

This repository provides two MCP client implementations that connect to an MCP server and send queries to Google Gemini AI. It enables Gemini to call external tools and maintains conversation

20
0

🚀 MCP Client with Gemini AI

This repository provides two distinct MCP client implementations designed to interface with Google's Gemini AI.

➡️ Option 1: Legacy Client

uv run client.py path/to/server.py

➡️ Option 2: LangChain Client

uv run langchain_mcp_client.py path/to/server.py

The clients connect to an MCP server, send queries to Gemini AI, enable Gemini to call external tools from the server, execute MCP tool commands, and maintain conversation history.

Installation involves cloning the repository, setting up a virtual environment using uv, and installing dependencies like mcp, python-dotenv, and google-genai. An API key from Google AI Studio is required and should be stored in a .env file.

The Legacy Client offers a straightforward approach, while the LangChain Client leverages the LangChain framework with a React Agent for more complex interactions. Both clients allow users to interact with the system using natural language queries, which are then processed by Gemini AI to execute commands on the MCP server.

Repository

TH
theailanguage

theailanguage/mcp_client

Created

March 15, 2025

Updated

March 27, 2025

Language

Python

Category

AI