npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yusukedev/gemini-cli-mcp

v1.6.2

Published

A secure Model Context Protocol server for Gemini CLI with automatic fallback, extended timeout (180s), and model transparency features

Downloads

48

Readme

Gemini CLI MCP Server

A secure Model Context Protocol (MCP) server that provides access to Google's Gemini CLI functionality through standardized MCP tools.

✨ Features

  • 💬 Chat Integration: Direct conversation with Gemini models for development consultation and code assistance
  • 🔄 Automatic Fallback: Seamlessly switches from Gemini 2.5 Pro to Flash when quota limits are reached
  • 🛡️ Secure Implementation: Uses temporary files to prevent shell injection vulnerabilities
  • Extended Timeout: 180-second timeout for processing complex queries
  • 🚀 Easy Integration: Simple setup with Claude Desktop and other MCP-compatible clients
  • 📊 Model Transparency: Response includes information about which model was used (Pro or Flash)

🔧 Prerequisites

  1. Node.js 18+ is required
  2. Gemini CLI must be installed and authenticated:
    npm install -g @google/generative-ai-cli
    gemini auth

Installation

Install globally via npm:

npm install -g @yusukedev/gemini-cli-mcp

Or use directly with npx:

npx @yusukedev/gemini-cli-mcp

Configuration

Add to your Claude Desktop claude_desktop_config.json file (or similar MCP client configuration):

{
  "mcpServers": {
    "gemini-cli": {
      "command": "npx",
      "args": ["@yusukedev/gemini-cli-mcp"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "gemini-cli": {
      "command": "gemini-cli-mcp"
    }
  }
}

🛠️ Available Tools

gemini_chat_pro

Chat with Gemini 2.5 Pro for development consultation and code assistance.
If this tool fails(quota exceeded, etc.), use gemini_chat_flash as a fallback.

Parameters:

  • message (required): The message or question to send to Gemini
  • context (optional): Additional context or code to include in the conversation

Example:

{
  "name": "gemini_chat_pro",
  "arguments": {
    "message": "Review this TypeScript code for potential improvements",
    "context": "function validateEmail(email: string): boolean { return /\\S+@\\S+\\.\\S+/.test(email); }"
  }
}

gemini_chat_flash

Chat with Gemini 2.5 Flash for development consultation and code assistance.
Use this if gemini_chat_pro fails.

Parameters:

  • message (required): The message or question to send to Gemini
  • context (optional): Additional context or code to include in the conversation

Example:

{
  "name": "gemini_chat_flash",
  "arguments": {
    "message": "Review this TypeScript code for potential improvements",
    "context": "function validateEmail(email: string): boolean { return /\\S+@\\S+\\.\\S+/.test(email); }"
  }
}

🔄 Automatic Fallback

The server automatically handles quota limits by:

  1. Primary: Attempts to use gemini-2.5-pro (high quality)
  2. Fallback: Switches to gemini-2.5-flash if Pro quota is exceeded
  3. Transparency: Response includes model information and fallback status

📋 System Requirements

  • Node.js: 18.0.0 or higher
  • OS: Windows, macOS, Linux (with WSL)
  • Gemini CLI: Google AI Studio

🐛 Debugging

Since MCP servers operate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

📄 License

MIT License

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🔗 Links