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
This repository provides two distinct MCP client implementations designed to interface with Google's Gemini AI.
uv run client.py path/to/server.py
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.
theailanguage/mcp_client
March 15, 2025
March 27, 2025
Python