mcp_client

MCP.Pizza Chef: theailanguage

Written as companion code for a YouTube tutorial series, the repository holds four small terminal programs plus three experimental web screens. Point one at a list of MCP servers and it opens a chat where Gemini decides which of their tools to run. A free Google Gemini key is required, and the programs do not all look for the same key name. The Gemini model is fixed in the code, each question is answered with no memory of the previous one, and the license is GPL-3.

Unmaintained Β· No commits in 15 months.
Coding
Other

Use This MCP client To

Chat with Gemini and let it use my MCP tools Connect several MCP servers at once from one file Try out a new MCP server before adding it elsewhere Read the code to learn how an MCP client works

README

πŸš€ MCP Client with Gemini AI

πŸ“’ Subscribe to The AI Language on YouTube!

Welcome! This project features multiple MCP clients integrated with Google Gemini AI to execute tasks via the Model Context Protocol (MCP) β€” with and without LangChain.

Happy building, and don’t forget to subscribe!

MCP Client Options

This repository includes four MCP client options for various use cases:

Option Client Script LangChain Config Support Transport Tutorial
1 client.py ❌ ❌ STDIO Legacy Client
2 langchain_mcp_client.py βœ… ❌ STDIO LangChain Client
3 langchain_mcp_client_wconfig.py βœ… βœ… STDIO Multi-Server
4 client_sse.py ❌ ❌ SSE (Loca & Web) SSE Client

If you want to add or reuse MCP Servers, check out the MCP Servers repo.


βœͺ Features

βœ… Connects to an MCP server (STDIO or SSE)
βœ… Uses Google Gemini AI to interpret user prompts
βœ… Allows Gemini to call MCP tools via server
βœ… Executes tool commands and returns results
βœ… (Upcoming) Maintains context and history for conversations


Running the MCP Client

Choose the appropriate command for your preferred client:

  • Legacy STDIO β€” uv run client.py path/to/server.py
  • LangChain STDIO β€” uv run langchain_mcp_client.py path/to/server.py
  • LangChain Multi-Server STDIO β€” uv run langchain_mcp_client_wconfig.py path/to/config.json
  • SSE Client β€” uv run client_sse.py sse_server_url

Project Structure

mcp_client FAQ

Can I use this as my everyday chat app?
Not really. It runs in a terminal window, it answers each question with no memory of the last one, and the promised conversation history is still listed as upcoming.
Do I need to pay for anything?
You need a Google Gemini key, which has a free tier. Heavy use runs into Google's paid pricing, but no other service is involved.
Which apps does it work with?
None of the usual desktop assistants. This is a standalone program you run yourself; it connects out to MCP servers rather than plugging into Claude Desktop, Cursor or similar.
Can I use this to run tools from more than one server at a time?
Yes β€” one of the four programs reads a file listing several servers and pools all of their tools into a single chat.
Is there anything to be careful about?
Yes. Whatever tool the model picks runs immediately, with no confirmation step. The example configuration wires in a server that runs terminal commands, so a misread instruction can change files on your computer.
Which key setting do I put in the .env file?
It depends which program you run β€” the basic one reads GEMINI_API_KEY and the multi-server one reads GOOGLE_API_KEY, which is a common reason it starts up and then fails.
Can I switch to a different model?
Only by editing the code. Each program has its Gemini model written into it, and both are pinned to a 2.0-era Flash release.
Does the web screen work?
Only partly. The three Streamlit screens are experimental, and the option for remote servers is labeled 'not implemented' in the interface itself.
Can I use it at work?
Ask about licensing first. It is GPL-3, and the author states that the project does not accept outside code contributions.