Provides three tools for interacting with Google Gemini AI: single-turn chat conversations, multi-turn conversations with context preservation, and AI-powered code analysis and review across multiple programming languages.
π€ Gemini MCP Server
Customized for Warp Terminal
Model Context Protocol Server for Google Gemini API
Optimized for Modern Terminal Workflows
Seamlessly integrate Google Gemini AI into your Warp terminal workflow
Features β’ Installation β’ Configuration β’ Usage β’ API Reference β’ Contributing
π Overview
Gemini MCP Server is a Model Context Protocol implementation that brings Google Gemini's powerful AI capabilities directly into your Warp terminal. Built with enterprise-grade standards, this server enables conversational AI, multi-turn dialogues, and intelligent code analysis through simple, well-defined tools.
Why Use This?
β¨ Zero Configuration - Works out of the box with Warp terminal
π Secure by Default - API keys stored in environment variables
β‘ High Performance - Optimized for rapid response times
π― Purpose-Built Tools - Three focused tools for maximum utility
π Open Source - MIT licensed, community-driven development
β¨ Features
π¬ Single-Turn Chat
gemini_chat
Quick, stateless conversations with Gemini. Perfect for one-off questions, code generation, or content creation.
π Multi-Turn Conversations
gemini_chat_with_history
Maintain context across multiple exchanges. Build complex dialogues and iterative problem-solving sessions.
π Code Analysis
gemini_analyze_code
Deep code review, bug detection, optimization suggestions, and explanations. Supports multiple programming languages.
π Installation
Prerequisites
Node.js β₯ 18.0.0
npm β₯ 9.0.0
Warp Terminal (latest version)
Google Gemini API Key (Get one here)
Quick Start
Manual Installation
βοΈ Configuration
Method 1: Automated Setup (Recommended)
This script automatically:
Creates Warp MCP configuration
Sets up your API key securely
Validates the installation
Method 2: Manual Configuration
Step 1: Get Your API Key
Visit Google AI Studio
Sign in with your Google account
Generate a new API key
Copy the key (keep it secure!)
Step 2: Configure Warp
Create or edit ~/.config/warp/mcp.json
:
β οΈ Security Best Practice: Never commit your API key to version control. Use environment variables for production deployments.
Step 3: Restart Warp
Completely quit and restart Warp terminal for changes to take effect.
π‘ Usage
Testing the Server
Verify your installation works:
You should see: Gemini MCP Server running on stdio
Tool Examples
1. Basic Conversation
Use Cases:
Quick questions and answers
Code generation
Content writing
Brainstorming ideas
2. Contextual Dialogue
Use Cases:
Technical tutorials
Iterative problem-solving
Learning sessions
Complex debugging
3. Code Analysis
Analysis Types:
bugs
- Find errors and potential issuesoptimize
- Performance and best practicesexplain
- Detailed code explanationreview
- Comprehensive assessment
π API Reference
Tool: gemini_chat
Description: Single-turn conversation with Gemini
Parameters:
Parameter | Type | Required | Default | Description |
| string | Yes | - | Your prompt or question |
| number | No | 1.0 | Creativity (0.0-2.0) |
| number | No | 8192 | Maximum response length |
Example Response:
Tool: gemini_chat_with_history
Description: Multi-turn conversation with context preservation
Parameters:
Parameter | Type | Required | Default | Description |
| array | Yes | - | Conversation history |
| number | No | 1.0 | Creativity (0.0-2.0) |
Message Format:
Tool: gemini_analyze_code
Description: AI-powered code analysis and review
Parameters:
Parameter | Type | Required | Default | Description |
| string | Yes | - | Code to analyze |
| string | No | - | Programming language |
| enum | No | review | bugs, optimize, explain, review |
Supported Languages: JavaScript, TypeScript, Python, Go, Rust, Java, C++, Ruby, PHP, Swift, Kotlin, and more
π§ Advanced Configuration
Environment Variables
Model Selection
To use different Gemini models, edit index.js
:
Available Models:
gemini-2.0-flash-exp
- Fast, efficient (default)gemini-2.5-pro
- Most capable (when available)gemini-pro
- Balanced performance
π Troubleshooting
Common Issues
Solution:
Checklist:
Verify
~/.config/warp/mcp.json
exists and is valid JSONEnsure paths in config use absolute paths or
${HOME}
Completely quit and restart Warp (not just close window)
Check Warp logs:
Settings β Advanced β View Logs
Possible causes:
Invalid API key
API key not activated
Billing not enabled on Google Cloud
Rate limits exceeded
Solution: Verify your API key at Google AI Studio
Debug steps:
π Security
Best Practices
Never commit API keys - Use environment variables
Rotate keys regularly - Generate new keys every 90 days
Use key restrictions - Limit keys to specific APIs in Google Cloud Console
Monitor usage - Check Google Cloud Console for unexpected activity
Audit logs - Review MCP server logs periodically
Reporting Security Issues
Please report security vulnerabilities to info@cyberlinksec.com. Do not create public issues for security concerns.
See SECURITY.md for our full security policy.
π€ Contributing
We welcome contributions! Here's how you can help:
Development Setup
Contribution Guidelines
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature
)Commit your changes (
git commit -m 'Add amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
Code Standards
Follow existing code style
Add tests for new features
Update documentation
Ensure no hardcoded credentials
Use meaningful commit messages
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Model Context Protocol - MCP specification
Google AI - Gemini API
Warp Terminal - Modern terminal platform
All contributors who helped build this project
π Stats & Metrics
Response Time: < 2s average
Uptime: 99.9% (dependent on Google API)
Models Supported: 3+ Gemini variants
Languages: JavaScript/TypeScript
MCP Version: 1.0.4
πΊοΈ Roadmap
Add streaming response support
Implement token usage tracking
Add conversation history persistence
Support for image inputs
Multi-language documentation
Docker container support
Health check endpoints
Prometheus metrics export
Built with β€οΈ for the developer community
If this project helped you, please β star the repository!
Documentation β’ Issues β’ Discussions
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Integrates Google Gemini AI into Warp terminal workflows through three focused tools: single-turn chat for quick questions, multi-turn conversations with context preservation, and AI-powered code analysis with bug detection and optimization suggestions.
- Customized for Warp Terminal
- Model Context Protocol Server for Google Gemini API
- Optimized for Modern Terminal Workflows
- π Overview
- β¨ Features
- π Installation
- βοΈ Configuration
- π‘ Usage
- π API Reference
- π§ Advanced Configuration
- π Troubleshooting
- π Security
- π€ Contributing
- π License
- π Acknowledgments
- π Stats & Metrics
- πΊοΈ Roadmap