AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Gemini MCP CLI

mcp-kkrishnan90-gemini-mcp-cli · by kkrishnan90

This is a simple command-line interface (CLI) chat application powered by Google's Gemini model (specifically `gemini-2.0-flash-001` by default). It acts as an MCP (Model Context Protocol) host, allowing it to connect to one or more MCP servers and leverage the tools they provide directly within the chat interface.

No reviews yet
0 installs
40 views
0.0% view→install

Install

$ agentstack add mcp-kkrishnan90-gemini-mcp-cli

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-kkrishnan90-gemini-mcp-cli)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Gemini MCP CLI? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

MCP Gemini Chat CLI 💬

A simple command-line interface (CLI) chat application powered by Google's Gemini model that acts as an MCP (Model Context Protocol) host.

✨ Features

  • 🤖 Gemini Powered: Uses the Gemini API (gemini-2.0-flash-001 by default) for conversational responses.
  • 🔌 MCP Host & Client: Connects to and leverages tools from multiple MCP servers.
  • 🔎 Dynamic Tool Discovery: Automatically discovers available tools from connected servers.
  • ⚡ Runtime Server Management: Add new MCP servers dynamically while the chat app is running using the add_server command.

🛠️ Prerequisites

  • 🐍 Python 3.10+
  • 📦 uv (or pip) for package management.
  • 🔑 Google Gemini API Key.

🚀 Quick Start

  1. Clone & Enter Directory:

``bash git clone # Replace with the actual repo URL cd mcp-gemini-chat ``

  1. Create Virtual Environment & Activate:

``bash uv venv # On Linux/macOS source .venv/bin/activate # On Windows # .venv\Scripts\activate ``

  1. Install Dependencies:

(Installs mcp, google-genai, python-dotenv, httpx) ``bash uv pip install -r requirements.txt ``

  1. Configure API Key: ⚠️ Replace YOUR_GEMINI_API_KEY with your actual key!

``bash echo "GEMINI_API_KEY=YOUR_GEMINI_API_KEY" > .env ``

  1. Run the App: (Optionally specify MCP server scripts to connect on startup)

```bash # Example assuming the app script is in a 'src' directory python src/mcpchatapp.py [path/to/server1.py] [path/to/server2.py]

# Example without servers at startup # python src/mcpchatapp.py ```

🌊 Flow of Calls

Basic Chat Flow (No Tools)

👤 User Input → 🤖 MCP Gemini Chat App → ✨ Gemini API → 🖥️ Display to User

Tool Usage Flow (e.g., Calculator, Weather)

  1. 👤 User Input → 🤖 MCP Gemini Chat App → ✨ Gemini API
  2. ✨ Gemini decides to use a tool → 🔌 MCP Client → ⚙️ MCP Server (e.g., Calculator Server)
  3. ⚙️ Server executes the tool → 📄 Returns result → 🔌 MCP Client
  4. 📄 Result → ✨ Gemini API → 🤔 Synthesizes final response
  5. 🗣️ Final response → 🖥️ Display to User

▶️ Usage Guide

Running the Application

Start the application script, optionally providing paths to MCP server scripts you want to connect to immediately.

# Start without any initial servers
python src/mcp_chat_app.py

# Start and connect to specific servers
python src/mcp_chat_app.py mcp_server_weather.py mcp_server_calc.py

Adding MCP Servers

You can add more tools by connecting to more MCP servers:

1. At Startup: Provide the paths to your server scripts as command-line arguments when starting mcp_chat_app.py:

python src/mcp_chat_app.py path/to/mcp_server_weather.py path/to/mcp_server_calc.py

2. At Runtime: Use the add_server command within the chat interface:

You: add_server path/to/my_other_server.py

The application will attempt to connect and integrate the tools from the new server.

Example Session

$ python src/mcp_chat_app.py mcp_server_calc.py
# ... Initialization logs ...
MCP Gemini Chat App
Enter your message, 'add_server ' to add a server, or 'quit' to exit.

You: hi
Gemini: Hello! How can I help you today?

You: what is 5 plus 12?
# ... Tool call logs ...
Gemini: 5 plus 12 is 17.0.

You: add_server mcp_server_weather.py
# ... Connection and tool discovery logs ...
Gemini: Successfully added server 'mcp_server_weather.py' with tools: ['get_alerts', 'get_forecast']

You: any weather alerts in London?
# ... Tool call logs ...
Gemini: # ... (Response about weather alerts in London) ...

You: quit
# ... Cleanup logs ...
$

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kkrishnan90](https://github.com/kkrishnan90)
- **Source:** [kkrishnan90/Gemini-MCP-CLI](https://github.com/kkrishnan90/Gemini-MCP-CLI)
- **License:** MIT
- **Homepage:** https://k-krishnan-90.medium.com/meet-mcp-your-llms-super-helpful-assistant-83bd85f04150

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.