gemini-mcp

gemini-mcp

Minimal MCP server that provides access to Google's Gemini API with Google Search grounding for up-to-date information through a single ask_gemini tool.

Category
Visit Server

README

gemini-mcp

A minimal MCP (Model Context Protocol) server that provides access to Google's Gemini API with Google Search grounding for up-to-date information.

Features

  • Single ask_gemini tool for querying Gemini models
  • Google Search grounding for up-to-date information
  • Returns grounding sources with responses
  • Lightweight implementation using Bun

Installation

Prerequisites

Install from npm

bunx @nhosoya/gemini-mcp

Install from source

git clone https://github.com/nhosoya/gemini-mcp.git
cd gemini-mcp
bun install

Configuration

Environment Variable

Set your Gemini API key:

export GEMINI_API_KEY=your-api-key-here

Claude Code

claude mcp add gemini --scope user --env GEMINI_API_KEY=your-api-key -- bunx @nhosoya/gemini-mcp

Other MCP Clients

Example configuration for other MCP clients (e.g., Cursor):

{
  "mcpServers": {
    "gemini": {
      "command": "bunx",
      "args": ["@nhosoya/gemini-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Or if installed from source:

{
  "mcpServers": {
    "gemini": {
      "command": "bun",
      "args": ["run", "/path/to/gemini-mcp/src/index.ts"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Usage

Tool: ask_gemini

Ask Gemini a question with optional Google Search grounding.

Parameters:

Parameter Type Default Description
prompt string (required) The question or prompt to send to Gemini
model string gemini-flash-latest Gemini model to use
grounding boolean true Enable Google Search grounding

Example:

What are the latest features in Bun 1.2?

Response:

The tool returns Gemini's response along with grounding sources (when enabled):

Bun 1.2 introduces several new features...

## Sources
- [Bun 1.2 Release Notes](https://bun.sh/blog/bun-v1.2)
- [Bun Documentation](https://bun.sh/docs)

Development

# Run the server
bun run start

# Type check
bun run tsc --noEmit

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured