# Gemini Mcp

> Gemini CLI as an MCP server for Claude Code, with agent.md support

- **Type:** MCP server
- **Install:** `agentstack add mcp-brenoxp-gemini-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [brenoxp](https://agentstack.voostack.com/s/brenoxp)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [brenoxp](https://github.com/brenoxp)
- **Source:** https://github.com/brenoxp/gemini-mcp

## Install

```sh
agentstack add mcp-brenoxp-gemini-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# gemini-mcp

MCP server that wraps [Gemini CLI](https://github.com/google-gemini/gemini-cli) for use with Claude Code and other MCP clients.

Use Gemini's large context window (1M tokens) and web search from within Claude Code.

## Prerequisites

- [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed and authenticated
- Node.js 18+ or Bun

## Installation

### Via npm (recommended)

```bash
npm install -g @brenoxp/gemini-mcp
```

### From source

```bash
git clone https://github.com/brenoxp/gemini-mcp.git
cd gemini-mcp
npm install
npm run build
```

## Usage with Claude Code

Add to your Claude Code MCP configuration:

```bash
# If installed globally via npm
claude mcp add gemini-mcp -- gemini-mcp

# Or run directly with npx
claude mcp add gemini-mcp -- npx @brenoxp/gemini-mcp

# Or from source
claude mcp add gemini-mcp -- node /path/to/gemini-mcp/dist/index.js
```

## Tools

### gemini

Send a prompt directly to Gemini CLI.

Parameters:
- `prompt` (required): The prompt to send
- `model`: Gemini model to use (default: `gemini-2.5-flash`)
- `allowed_tools`: Comma-separated tools Gemini can use (e.g., `web_search,shell`)

### gemini_with_agent_md

Send a prompt with an agent.md file as context. Useful for delegating tasks that need specific instructions.

Parameters:
- `agent_md_path` (required): Absolute path to agent.md file
- `prompt` (required): The prompt to send
- `model`: Override model (otherwise inferred from frontmatter)
- `allowed_tools`: Comma-separated tools Gemini can use

Model mapping from Claude agent.md frontmatter:
- `haiku` -> `gemini-2.5-flash-lite`
- `sonnet` -> `gemini-2.5-flash`
- `opus` -> `gemini-2.5-pro`

The tool automatically strips frontmatter from the agent.md before passing to Gemini.

## Example prompts in Claude Code

```
Use the gemini tool to summarize this 500-page PDF: /path/to/large.pdf

Use gemini with web_search to find the latest React 19 features

Use gemini_with_agent_md with my research agent to investigate this topic
```

## Why use this?

- Gemini has 1M token context - process huge files Claude can't handle in one shot
- Web search built into Gemini CLI
- Delegate cheap/simple tasks to Gemini, save Claude tokens for complex reasoning
- Run agents defined in agent.md files through Gemini

## Development

```bash
# Run directly with Bun
bun run dev

# Type check
npm run typecheck

# Build for distribution
npm run build
```

## License

MIT

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [brenoxp](https://github.com/brenoxp)
- **Source:** [brenoxp/gemini-mcp](https://github.com/brenoxp/gemini-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-brenoxp-gemini-mcp
- Seller: https://agentstack.voostack.com/s/brenoxp
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
