Skip to main content
Glama
ShunL12324

Claude Code Gemini MCP

by ShunL12324
README.md
# Claude Code Gemini MCP

MCP Server that enables Claude Code to call Gemini models through OpenAI-compatible API.

## Installation

```bash
git clone https://github.com/shun-sfoo/claude-code-gemini-mcp.git
cd claude-code-gemini-mcp
npm install
npm run build
```

## Configuration

### Environment Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `GEMINI_API_KEY` | Your API key | Yes |
| `GEMINI_BASE_URL` | API endpoint (OpenAI-compatible) | Yes |
| `GEMINI_MODEL` | Model ID (default: `gemini-3-pro-preview`) | No |

### Claude Code Integration

Add to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/claude-code-gemini-mcp/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your-api-key",
        "GEMINI_BASE_URL": "https://your-api-endpoint/v1",
        "GEMINI_MODEL": "gemini-3-pro-preview"
      }
    }
  }
}
```

Or add to global settings (`~/.claude/settings.json`).

## Available Tools

### gemini_think

Deep analysis and reasoning for complex problems.

**Parameters:**
- `problem` (string, required) - The problem to analyze
- `context` (string, optional) - Background information
- `thinkingStyle` (string, optional) - One of: `analytical`, `creative`, `critical`, `systematic`

### gemini_brainstorm

Generate multiple creative ideas with pros and cons.

**Parameters:**
- `topic` (string, required) - The topic to brainstorm
- `constraints` (string, optional) - Constraints or requirements
- `count` (number, optional) - Number of ideas, 3-10 (default: 5)

### gemini_review

Code, architecture, security, or performance review.

**Parameters:**
- `content` (string, required) - Content to review
- `reviewType` (string, required) - One of: `code`, `architecture`, `security`, `performance`
- `focus` (string, optional) - Specific aspects to focus on

### gemini_query

General purpose query with full control.

**Parameters:**
- `prompt` (string, required) - The prompt to send
- `systemPrompt` (string, optional) - System prompt
- `temperature` (number, optional) - 0-2 (default: 0.7)

## Testing

```bash
# Create .env file first
cp .env.example .env
# Edit .env with your credentials

# Run tests
npm test
```

## Development

```bash
npm run dev    # Watch mode
npm run build  # Build
npm test       # Run tests
```

## License

MIT

TDQS

C2.9/5.0

Scored across 4 tools

Disambiguation2/5

Multiple tools have overlapping purposes that could cause confusion. gemini_brainstorm and gemini_think both involve generating ideas and analysis, while gemini_query is a general-purpose tool that could potentially cover the same ground. The descriptions don't clearly differentiate when to use each tool versus the others.

Naming Consistency5/5

All tools follow a perfect gemini_verb pattern consistently throughout. The naming is completely predictable and follows the same structure for every tool, making it easy to understand the pattern.

Tool Count3/5

With only 4 tools, the server feels somewhat thin for a general-purpose AI assistant interface. While the count isn't extreme, it's borderline minimal for what appears to be a Gemini API wrapper that could benefit from more specialized operations.

Completeness2/5

There are significant gaps in the tool surface for a Gemini API wrapper. Missing are basic operations like summarization, translation, content generation, or structured output formatting. The tools focus narrowly on brainstorming/thinking/review while omitting many common LLM use cases that agents would expect.

Maintenance

ActivityInactive
ResponsivenessNo issues