Skip to main content
Glama

gemini-mcp

npm MCP Registry Node.js License: MIT

Google Gemini を Claude Code(または任意の MCP クライアント)向けのツールとして公開する、軽量な MCP サーバーです。

セカンドオピニオン、大規模コンテキストの分析、コードレビュー、または別のモデルの視点が役立つあらゆる場面で Gemini を活用できます。

ツール

ツール

説明

gemini_ask

Gemini に質問したり、タスクを依頼したりする

gemini_analyze

特定の指示を付けてコードやテキストを分析用に送信する

gemini_chat

完全な履歴を保持したマルチターン会話

gemini_models

利用可能な 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-mcp

3. 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

環境変数

変数

デフォルト

説明

GEMINI_API_KEY

(必須)

Google AI Studio の API キー

GEMINI_MODEL

gemini-2.5-pro

全ツールのデフォルトモデル

モデル

モデル

最適な用途

gemini-2.5-pro

最高品質、大規模コンテキスト(100万トークン)

gemini-2.5-flash

高速で、ほとんどのタスクに適している

gemini-2.0-flash

最速、シンプルなタスク向け

すべてのツールはオプションの model パラメータを受け付け、呼び出しごとにデフォルトを上書きできます。

機能

  • レート制限(429)およびサーバーエラー(5xx)に対する指数バックオフ付きリトライ

  • MCP クライアントへのグレースフルなエラー報告(クラッシュなし)

  • 呼び出しごとのモデル上書き

  • API キー以外の設定は不要

トラブルシューティング

問題

解決方法

GEMINI_API_KEY is not set

settings.jsonenv ブロックにキーを追加してください

429 Too Many Requests

組み込みのリトライが処理します — 数秒待ってください

Model not found

gemini_models を実行して有効なモデル名を一覧表示してください

Claude Code にツールが表示されない

~/.claude/settings.json の構文を確認し、Claude Code を再起動してください

ECONNREFUSED

ネットワーク/ファイアウォールを確認してください — サーバーは generativelanguage.googleapis.com を呼び出します

開発

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

ライセンス

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PavelGuzenfeld/gemini-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server