{"_id":"@anzchy/mcp-server-gemini","name":"@anzchy/mcp-server-gemini","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.1":{"name":"@anzchy/mcp-server-gemini","version":"0.5.1","description":"State-of-the-art MCP server for Google Gemini API with all latest features","main":"dist/enhanced-stdio-server.js","bin":{"mcp-server-gemini":"dist/enhanced-stdio-server.js"},"scripts":{"build":"tsc","prepare":"npm run build","start":"node dist/enhanced-stdio-server.js","dev":"ts-node src/enhanced-stdio-server.ts","test":"jest","test:watch":"jest --watch","lint":"eslint src/**/*.ts","format":"prettier --write src/**/*.ts"},"type":"module","dependencies":{"@google/genai":"^1.41.0"},"devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.10.5","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","dotenv":"^17.2.4","eslint":"^8.0.0","global-agent":"^4.1.2","jest":"^29.5.0","prettier":"^3.0.0","ts-jest":"^29.1.0","typescript":"^5.3.3"},"keywords":["mcp","model-context-protocol","gemini","google-gemini","ai","llm","claude-desktop","cursor","windsurf","typescript"],"author":{"name":"anzchy"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anzchy/gemini-cli-mcp-server.git"},"bugs":{"url":"https://github.com/anzchy/gemini-cli-mcp-server/issues"},"homepage":"https://github.com/anzchy/gemini-cli-mcp-server#readme","engines":{"node":">=16.0.0"},"_id":"@anzchy/mcp-server-gemini@0.5.1","gitHead":"1fc25268ac403a1d11bd9ac9c1a54108e1c044f6","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-xyNnKfEz1SPM0I/TkZc5lHyok52ujBou6MBfsqkgFOm5zaisKIOo2SCVXMiwvK8MlyiVrq8HKJ27jL+GcCVDqA==","shasum":"abb3139fc7baf97a7737a2f7e92b2f554fb72168","tarball":"https://registry.npmjs.org/@anzchy/mcp-server-gemini/-/mcp-server-gemini-0.5.1.tgz","fileCount":8,"unpackedSize":81446,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anzchy%2fmcp-server-gemini@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDBPs4fiAT2zKCk5jUJVyw2LhPyC6k8qLqdk7d5/glV4AiBzTBQAHTixlExUlDNkScFUmJUE1CxEoRJoaLtgKbSsqQ=="}]},"_npmUser":{"name":"jackcheng0322","email":"anzchy@163.com"},"directories":{},"maintainers":[{"name":"jackcheng0322","email":"anzchy@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-gemini_0.5.1_1770916296703_0.011260333214916374"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-12T17:11:36.623Z","0.5.1":"2026-02-12T17:11:36.858Z","modified":"2026-02-12T17:11:37.294Z"},"maintainers":[{"name":"jackcheng0322","email":"anzchy@163.com"}],"description":"State-of-the-art MCP server for Google Gemini API with all latest features","homepage":"https://github.com/anzchy/gemini-cli-mcp-server#readme","keywords":["mcp","model-context-protocol","gemini","google-gemini","ai","llm","claude-desktop","cursor","windsurf","typescript"],"repository":{"type":"git","url":"git+https://github.com/anzchy/gemini-cli-mcp-server.git"},"author":{"name":"anzchy"},"bugs":{"url":"https://github.com/anzchy/gemini-cli-mcp-server/issues"},"license":"MIT","readme":"# Gemini MCP Server\n\n![smithery badge](https://smithery.ai/badge/mcp-server-gemini)\n![npm version](https://img.shields.io/npm/v/@anzchy/mcp-server-gemini)\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)\n![MCP Version](https://img.shields.io/badge/MCP-2024--11--05-green)\n\nA powerful MCP (Model Context Protocol) server that brings Google's latest Gemini AI models to your favorite development environment. Access Gemini 3's state-of-the-art reasoning, configurable thinking depth, vision analysis, embeddings, and more through a seamless integration.\n\n🚀 **Works with**: Claude Desktop, Cursor, Windsurf, and any MCP-compatible client\n🎯 **Why use this**: Get Gemini's cutting-edge AI features directly in your IDE with full parameter control\n📚 **Self-documenting**: Built-in help system means you never need to leave your editor\n\n## Features\n\n- **6 Powerful Tools**: Text generation, image analysis, token counting, model listing, embeddings, and self-documenting help\n\n- **Latest Gemini 3 Models**: `gemini-3-pro-preview` and `gemini-3-flash-preview` with configurable thinking depth\n\n- **Thinking Level Control**: Adjust reasoning depth per request (minimal/low/medium/high)\n\n- **Media Resolution Control**: Configure token allocation for image/video inputs\n\n- **Advanced Features**: JSON mode, Google Search grounding, system instructions, conversation memory\n\n- **Full MCP Protocol**: Standard stdio communication for seamless integration with any MCP client\n\n- **Self-Documenting**: Built-in help system - no external docs needed\n\n- **TypeScript & ESM**: Modern, type-safe implementation\n\n### Supported Models\n\n| Model                  | Context   | Max Output | Thinking Levels            | Best For                   |\n| ---------------------- | --------- | ---------- | -------------------------- | -------------------------- |\n| gemini-3-pro-preview ⭐ | 1M tokens | 64K tokens | low, high                  | Complex reasoning, agentic |\n| gemini-3-flash-preview | 1M tokens | 64K tokens | minimal, low, medium, high | Fast + smart               |\n| gemini-2.5-pro         | 2M tokens | —          | —                          | Legacy complex tasks       |\n| gemini-2.5-flash       | 1M tokens | —          | —                          | Legacy general use         |\n| gemini-2.5-flash-lite  | 1M tokens | —          | —                          | Legacy cost-efficient      |\n\n## Quick Start\n\n1. **Get Gemini API Key**\n\n   - Visit [Google AI Studio](https://makersuite.google.com/app/apikey)\n\n   - Create a new API key\n\n   - **IMPORTANT**: Keep your API key secure and never commit it to version control\n\n2. **Configure Your MCP Client**\n\n   <details open>\n   <summary>&lt;b&gt;Claude Desktop&lt;/b&gt;</summary>\n\n   Config location:\n\n   - Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n   - Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n   - Linux: `~/.config/Claude/claude_desktop_config.json`\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"gemini\": {\n         \"type\": \"stdio\",\n         \"command\": \"npx\",\n         \"args\": [\"-y\", \"github:anzchy/gemini-cli-mcp-server\"],\n         \"env\": {\n           \"GEMINI_API_KEY\": \"your_api_key_here\"\n         }\n       }\n     }\n   }\n   ```\n   </details>\n\n   <details>\n   <summary>&lt;b&gt;Cursor&lt;/b&gt;</summary>\n\n   Add to Cursor's MCP settings:\n\n   ```json\n   {\n     \"gemini\": {\n       \"type\": \"stdio\",\n       \"command\": \"npx\",\n       \"args\": [\"-y\", \"github:anzchy/gemini-cli-mcp-server\"],\n       \"env\": {\n         \"GEMINI_API_KEY\": \"your_api_key_here\"\n       }\n     }\n   }\n   ```\n   </details>\n\n   <details>\n   <summary>&lt;b&gt;Windsurf&lt;/b&gt;</summary>\n\n   Configure in Windsurf's MCP settings following their documentation.\n   </details>\n\n   <details>\n   <summary>&lt;b&gt;Other MCP Clients&lt;/b&gt;</summary>\n\n   Use the standard MCP stdio configuration:\n\n   ```json\n   {\n     \"type\": \"stdio\",\n     \"command\": \"npx\",\n     \"args\": [\"-y\", \"github:anzchy/gemini-cli-mcp-server\"],\n     \"env\": {\n       \"GEMINI_API_KEY\": \"your_api_key_here\"\n     }\n   }\n   ```\n   </details>\n\n3. **Restart Your MCP Client**\n\n## How to Use\n\nOnce configured, you can use natural language in your MCP client to access Gemini's capabilities:\n\n### Basic Commands\n\n```\n\"Use Gemini to explain quantum computing\"\n\"Analyze this image with Gemini\" \n\"List all Gemini models\"\n\"Get help on using Gemini\"\n```\n\n### Advanced Examples\n\n```\n\"Use Gemini 3 Pro with thinkingLevel high to review this code\"\n\"Use Gemini in JSON mode to extract key points with schema {title, summary, tags}\"\n\"Use Gemini with grounding to research the latest in quantum computing\"\n\"Analyze this image with mediaResolution high for maximum detail\"\n```\n\n📖 **[See the complete Usage Guide](USAGE_GUIDE.md)** for detailed examples and advanced features.\n\n## Why Gemini MCP Server?\n\n- **Access Latest Models**: Use Gemini 3 with configurable thinking depth - Google's most advanced models\n\n- **Full Feature Set**: All Gemini API features including JSON mode, grounding, thinkingLevel, mediaResolution, and system instructions\n\n- **Easy Setup**: One-line npx installation, no complex configuration needed\n\n- **Production Ready**: Comprehensive error handling, TypeScript types, and extensive documentation\n\n- **Active Development**: Regular updates with new Gemini features as they're released\n\n## Documentation\n\n- **[Usage Guide](USAGE_GUIDE.md)** - Complete guide on using all tools and features\n\n- **[Parameters Reference](PARAMETERS_REFERENCE.md)** - Detailed documentation of all parameters\n\n- **[Quick Reference](QUICK_REFERENCE.md)** - Quick commands cheat sheet\n\n- **[Enhanced Features](ENHANCED_FEATURES.md)** - Detailed list of v5.0.0 capabilities\n\n- [Claude Desktop Setup Guide](docs/claude-desktop-setup.md) - Detailed setup instructions\n\n- [Examples and Usage](docs/examples.md) - Usage examples and advanced configuration\n\n- [Implementation Notes](docs/implementation-notes.md) - Technical implementation details\n\n- [Development Guide](docs/development-guide.md) - Guide for developers\n\n- [Troubleshooting Guide](docs/troubleshooting.md) - Common issues and solutions\n\n## Local Development\n\n```bash\n# Clone repository\ngit clone https://github.com/anzchy/gemini-cli-mcp-server.git\ncd mcp-server-gemini\n\n# Install dependencies\nnpm install\n\n# Set up environment variables\ncp .env.example .env\n# Edit .env and add your GEMINI_API_KEY\n\n# Start development server\nnpm run dev\n```\n\n## Contributing\n\nContributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md).\n\n## Common Issues\n\n1. **Connection Issues**\n\n   - Ensure your MCP client is properly restarted\n\n   - Check the client's logs (e.g., `~/Library/Logs/Claude/mcp-server-gemini.log` for Claude Desktop on Mac)\n\n   - Verify internet connection\n\n   - See [Troubleshooting Guide](docs/troubleshooting.md)\n\n2. **API Key Problems**\n\n   - Verify API key is correct\n\n   - Check API key has proper permissions\n\n   - Ensure the key is set in the environment variable\n\n   - See [Setup Guide](docs/claude-desktop-setup.md)\n\n3. **Stale Version / Not Picking Up Updates**\n\n   When using `npx -y github:anzchy/gemini-cli-mcp-server`, npx caches the package locally. If you're not seeing new features or bug fixes after an update, clear the cache:\n\n   ```bash\n   # Clear the npx cache (installs a small helper, then wipes the cache)\n   npx clear-npx-cache\n\n   # Also clear the npm cache for good measure\n   npm cache clean --force\n   ```\n\n   After clearing, restart your MCP client. The next invocation will pull the latest version from GitHub.\n\n   **Tip:** If you want to skip caching entirely during development, point your MCP client to the local build instead:\n   ```json\n   {\n     \"command\": \"node\",\n     \"args\": [\"--use-env-proxy\", \"/path/to/dist/enhanced-stdio-server.js\"]\n   }\n   ```\n\n## Security\n\n- API keys are handled via environment variables only\n\n- Never commit API keys to version control\n\n- The `.claude/` directory is excluded from git\n\n- No sensitive data is logged or stored\n\n- Regular security updates\n\n- If your API key is exposed, regenerate it immediately in Google Cloud Console\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-7c55cb845636bc73ff63fa68c5135d97"}