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

@hvantoan/gemini-mcp-assistant

v1.0.0

Published

MCP Server for Gemini file attachment functionality

Readme

Gemini Coding Assistant MCP Server (TypeScript Version)

This is a reference version rewritten in TypeScript based on the original mcp-gemini-assistant project (Python).

The original project was developed by Peter Krueck. You can connect with the author on LinkedIn.

Introduction

This MCP Server allows Claude Code (and other MCP Clients) to consult Gemini for complex coding problems with full code context and conversation persistence.

Key Features

  • Session Management: Maintain conversation context across multiple queries.
  • File Attachments: Read and include actual code files in conversations.
  • Hybrid Context: Combine text-based code_context with file attachments.
  • Follow-up Questions: Ask follow-up questions without resending code context.
  • Automatic Processing: Files are processed and formatted automatically.
  • Session Expiry: Automatic cleanup of inactive sessions after 1 hour.
  • Latest Model: Uses Gemini 2.5 Pro (or the latest configured version).

Requirements

Installation

Option 1: Install via npm (Recommended)

You can use the package directly via npx or install it globally.

npm install -g @hvantoan/gemini-mcp-assistant

Option 2: Install from Source

  1. Clone the repository:

    git clone <your-repo-url>
    cd mcp-gemini-assistant
  2. Install dependencies:

    npm install
    # or
    pnpm install
  3. Build the project:

    npm run build
    # or
    pnpm build
  4. Configure environment variables: Create a .env file in the root directory and add your API Key:

    GEMINI_API_KEY=your_api_key_here

Configuration Guide

1. Configuration for Claude Desktop / Claude Code

To use with Claude Desktop or Claude Code, add the configuration to your claude_desktop_config.json file.

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

If using npx (Recommended):

{
  "mcpServers": {
    "gemini-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@hvantoan/gemini-mcp-assistant"
      ],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here",
        "GEMINI_MODEL": "gemini-2.5-pro"
      }
    }
  }
}

If installed from source:

{
  "mcpServers": {
    "gemini-assistant": {
      "command": "node",
      "args": [
        "C:/path/to/mcp-gemini-assistant/build/index.js"
      ],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here",
        "GEMINI_MODEL": "gemini-2.5-pro"
      }
    }
  }
}

Note: Replace C:/path/to/mcp-gemini-assistant/ with the absolute path to your project directory.

2. Configuration for GitHub Copilot

If you are using GitHub Copilot in an environment that supports MCP (e.g., via extension or experimental features), provide the server information as follows:

Using npx:

  • Command: npx
  • Arguments: -y @hvantoan/gemini-mcp-assistant
  • Environment Variables: GEMINI_API_KEY=[Your API Key]

Using Source:

  • Command: node
  • Arguments: [Absolute path to build/index.js]
  • Environment Variables: GEMINI_API_KEY=[Your API Key]

Usage

Once configured, you can use the following tools in the Claude or Copilot chat window:

consult_gemini

Start a new consultation session or continue an existing one.

  • problem_description: Description of the problem (required for new sessions).
  • code_context: Relevant code (text format).
  • attached_files: List of file paths to read.
  • specific_question: Your specific question.
  • session_id: Session ID to continue the conversation.

list_sessions

List active conversation sessions.

end_session

End a session to free up memory.

Publishing to npm

To publish this package to npm (as a scoped package):

  1. Login to npm:
    npm login
  2. Publish the package (use --access public for the first publish if using a free account):
    npm publish --access public

This project is a TypeScript reference version, rewritten based on the structure and concepts of mcp-gemini-assistant.