gemini-mcp
gemini-mcp
Google Gemini を Claude Code(または任意の MCP クライアント)向けのツールとして公開する、軽量な MCP サーバーです。
セカンドオピニオン、大規模コンテキストの分析、コードレビュー、または別のモデルの視点が役立つあらゆる場面で Gemini を活用できます。
ツール
ツール | 説明 |
| Gemini に質問したり、タスクを依頼したりする |
| 特定の指示を付けてコードやテキストを分析用に送信する |
| 完全な履歴を保持したマルチターン会話 |
| 利用可能な Gemini モデルを一覧表示する |
Related MCP server: Gemini Bridge
クイックスタート
1. API キーを取得する
Google AI Studio にアクセスして、無料の API キーを作成してください。
2. インストール
オプション A — クローン(Claude Code 推奨)
git clone https://github.com/PavelGuzenfeld/gemini-mcp.git ~/.claude/mcp-servers/gemini
cd ~/.claude/mcp-servers/gemini
npm installオプション B — npx(インストール不要)
npx claude-gemini-mcp3. Claude Code に登録する
~/.claude/settings.json に追加します:
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/home/you/.claude/mcp-servers/gemini/index.js"],
"env": {
"GEMINI_API_KEY": "your-key-here"
}
}
}
}または npx を使用する場合:
{
"mcpServers": {
"gemini": {
"command": "npx",
"args": ["-y", "claude-gemini-mcp"],
"env": {
"GEMINI_API_KEY": "your-key-here"
}
}
}
}使用例
質問する
> Use gemini_ask to explain the difference between std::expected and std::optional
Gemini says: std::optional<T> represents a value that may or may not be present...
std::expected<T, E> additionally carries an error value when the expected value is absent...コードを分析する
> Use gemini_analyze to review this function for performance issues:
instruction: "Find performance bottlenecks"
content: <your code here>
Gemini says: Line 12 allocates inside the loop — move the vector outside...マルチターン会話
> Use gemini_chat with messages:
[{"role": "user", "content": "Design a REST API for a task manager"},
{"role": "model", "content": "Here's a RESTful design..."},
{"role": "user", "content": "Now add authentication"}]
Gemini says: Building on the previous design, add JWT-based auth...呼び出しごとにモデルを上書きする
> Use gemini_ask with model: "gemini-2.5-flash" to quickly summarize this error log環境変数
変数 | デフォルト | 説明 |
| (必須) | Google AI Studio の API キー |
|
| 全ツールのデフォルトモデル |
モデル
モデル | 最適な用途 |
| 最高品質、大規模コンテキスト(100万トークン) |
| 高速で、ほとんどのタスクに適している |
| 最速、シンプルなタスク向け |
すべてのツールはオプションの model パラメータを受け付け、呼び出しごとにデフォルトを上書きできます。
機能
レート制限(429)およびサーバーエラー(5xx)に対する指数バックオフ付きリトライ
MCP クライアントへのグレースフルなエラー報告(クラッシュなし)
呼び出しごとのモデル上書き
API キー以外の設定は不要
トラブルシューティング
問題 | 解決方法 |
|
|
| 組み込みのリトライが処理します — 数秒待ってください |
|
|
Claude Code にツールが表示されない |
|
| ネットワーク/ファイアウォールを確認してください — サーバーは |
開発
git clone https://github.com/PavelGuzenfeld/gemini-mcp.git
cd gemini-mcp
npm install
npm test # Run smoke tests
node index.js # Start the MCP server locallyライセンス
This server cannot be deployed
Maintenance
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server implementation that allows using Google's Gemini AI models (specifically Gemini 1.5 Pro) through Claude or other MCP clients via the Model Context Protocol.1MIT
- AlicenseAqualityFmaintenanceA lightweight MCP server that enables AI coding assistants to interact with Google's Gemini AI through the official CLI.3MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that integrates Google Gemini CLI with Claude Code for AI-powered development assistance, enabling code review, bug analysis, feature planning, and code explanation without requiring an API key.8MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides access to Google Gemini models via Vertex AI, enabling text generation, multi-turn chat, image/video generation, and frontend design through Claude Code.21MIT