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.
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_geminitool for querying Gemini models - Google Search grounding for up-to-date information
- Returns grounding sources with responses
- Lightweight implementation using Bun
Installation
Prerequisites
- Bun runtime
- Gemini API key
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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.