- Home
- MCP servers
- Gemini
Gemini
- typescript
0
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"raydius-gemini-for-claude-mcp": {
"command": "node",
"args": [
"/absolute/path/to/gemini-for-claude-mcp/dist/app.js"
],
"env": {
"LOG_LEVEL": "info",
"GEMINI_API_KEY": "your-api-key-here",
"GEMINI_TIMEOUT_MS": "120000",
"GEMINI_DEFAULT_MODEL": "gemini-2.5-flash"
}
}
}
}You can enable Claude Code to access Google's Gemini AI models through a dedicated MCP server. This integration lets you solicit second opinions, compare approaches, and leverage Gemini’s capabilities directly within your Claude Code session, streamlining collaboration and decision making across AI models.
How to use
Install and run the Gemini MCP server, then add it to Claude Code so you can query Gemini from your workspace. Use natural language prompts to ask for Gemini’s analysis, comparisons, or reasoning, and let Claude Code handle multi-turn conversations and token counting to manage costs.
Common usage patterns include asking for guidance on algorithms, verifying proofs, or analyzing code with a Gemini perspective. You can start a multi-turn conversation to maintain context and refine Gemini’s responses across turns.
How to install
Prerequisites you need before installing include Node.js 20+ and access to a Gemini API key from Google AI Studio.
Step-by-step installation and setup you can follow directly:
# 1. Clone and build
git clone https://github.com/Raydius/gemini-for-claude-mcp.git
cd gemini-for-claude-mcp
npm install && npm run build
# 2. Add to Claude Code (example using CLI)
claude mcp add gemini \
-e GEMINI_API_KEY=your-api-key \
-e GEMINI_DEFAULT_MODEL=gemini-3-pro-preview \
-- node /absolute/path/to/gemini-for-claude-mcp/dist/app.js
# 3. Start Claude Code and try it out
claude
Configuration
Configure environment variables to control which Gemini model you use and how the server behaves. The following variables are supported when running the MCP server:
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/absolute/path/to/gemini-for-claude-mcp/dist/app.js"],
"env": {
"GEMINI_API_KEY": "your-api-key-here",
"GEMINI_DEFAULT_MODEL": "gemini-2.5-flash",
"GEMINI_TIMEOUT_MS": "120000",
"LOG_LEVEL": "info"
}
}
}
}
Troubleshooting
If Claude Code has trouble connecting or the Gemini responses aren’t appearing, verify the MCP server is added and running, and confirm the runtime path is correct. Common checks include ensuring Node.js is v20 or newer and that dependencies are installed.
If a key-related error occurs, confirm GEMINI_API_KEY is provided in the MCP configuration and visible to Claude Code. When streaming isn’t working, streaming is enabled by default; you can disable it per query if needed.
Available tools
query_gemini
Query Gemini models for text generation, reasoning, and analysis tasks using the configured default model and optional conversation history. Supports streaming responses and multi-turn history.
list_gemini_models
List available Gemini models that can be configured via GEMINI_DEFAULT_MODEL, returning model names and descriptions.
count_gemini_tokens
Count tokens for a given text to estimate prompt and response costs with the configured Gemini model.