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

@danwahl/gemini-cli-mcp

v0.1.7

Published

MCP server that exposes Gemini CLI as a single tool for Claude Code

Downloads

893

Readme

gemini-cli-mcp

A minimal MCP server that exposes Gemini CLI as a single tool callable from Claude Code (or any MCP client).

How it works

Claude Code sends prompts to this server via MCP. The server spawns gemini -p "..." in headless mode and returns the response. Gemini inherits your Google OAuth session — no API key required.

Claude Code ──MCP/stdio──▶ gemini-cli-mcp ──spawn──▶ gemini -p "..." --output-format json

Prerequisites

  • Gemini CLI installed and authenticated:
    npm install -g @google/gemini-cli
    gemini  # complete the OAuth login flow

Installation

From source

git clone https://github.com/danwahl/gemini-cli-mcp
cd gemini-cli-mcp
npm install
npm run build

Configuration

User install (available across all projects):

claude mcp add gemini-cli -s user -- npx -y @danwahl/gemini-cli-mcp

Project install (shared with your team via .mcp.json):

claude mcp add gemini-cli -s project -- npx -y @danwahl/gemini-cli-mcp

Or from source, replace npx -y @danwahl/gemini-cli-mcp with node /absolute/path/to/gemini-cli-mcp/dist/index.js.

Verify with claude mcp list.

Tool: cli

| Parameter | Type | Required | Description | |-------------|--------|----------|-------------| | prompt | string | yes | Task or question to send to Gemini | | cwd | string | yes | Absolute path to working directory | | model | string | no | Model name or alias (see below). Omit to use Gemini CLI's default (auto). | | sessionId | string | no | Resume a previous session. The session ID is returned in the structured output of each call. |

Structured output

Each call returns structured content alongside the text response:

{
  "sessionId": "e80096bd-...",
  "response": "Gemini's answer...",
  "models": {
    "gemini-2.5-flash-lite": 1399,
    "gemini-3-flash-preview": 18635
  },
  "tools": {
    "list_directory": 2
  }
}

models maps model name → total tokens used. tools maps tool name → call count (only present when Gemini used tools).

Model aliases

These are passed directly to the CLI, which resolves them:

| Alias | Description | |--------------|-------------| | auto | Default routing (pro or preview depending on settings) | | pro | Complex reasoning tasks | | flash | Fast, balanced — good for most tasks | | flash-lite | Fastest, for simple tasks |

Or pass any concrete model name like "gemini-2.5-pro".

What Gemini can do

Gemini runs with --approval-mode yolo, giving it full tool access: read/write files, run shell commands, web search, and more. It operates in the cwd you specify.

Development

npm run build   # compile with tsc
npm test        # run unit tests

Smoke test

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js

Design

One tool, no prompt wrappers. Claude Code is the orchestrator — it decides what to ask Gemini and how to phrase it. This server is a thin, reliable pipe between MCP and gemini -p.

See CLAUDE.md for project conventions.