π’ 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!
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.
β
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
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
mcp-client-gemini/
βββ client.py # Basic client (STDIO)
βββ langchain_mcp_client.py # LangChain + Gemini
βββ langchain_mcp_client_wconfig.py # LangChain + config.json (multi-server)
βββ client_sse.py # SSE transport client (local or remote)
βββ .env # API key environment file
βββ README.md # Project documentation
βββ requirements.txt # Dependency list
βββ .gitignore # Git ignore rules
βββ LICENSE # License information
- You send a prompt:
Create a file named test.txt
- The prompt is sent to Google Gemini AI.
- Gemini uses available MCP tools to determine a response.
- The selected tool is executed on the connected server.
- The AI returns results and maintains conversation context (if supported).
At this time, this project does not accept external code contributions.
This is to keep licensing simple and avoid any shared copyright.
You're very welcome to:
β
Report bugs or request features (via GitHub Issues)
β
Fork the repo and build your own version
β
Suggest documentation improvements
If you'd like to collaborate in another way, feel free to open a discussion!