Integrations
Implements a bridge to Google Gemini's API, enabling text generation with gemini-2.0-flash model, image generation/analysis, and multimodal content processing
Offers video content analysis functionality by processing YouTube videos and providing summaries or answers to queries about video content
MCP Gemini API Server
Google Gemini API server for Cursor and Claude. Provides various Gemini features such as text generation, image analysis, video analysis, etc.
Key Features
- Text generation (using the gemini-2.0-flash model)
- Image creation and analysis
- YouTube video analytics
- Web search
Get started
Essential Requirements
- Node.js 18.0.0 or later
- npm or yarn
- Google API Key (for accessing Gemini API)
installation
Preferences
- Set your Google API key in
config.ts
file:
Build and Run
PM2 Server Management
The server is automatically managed via PM2. You can manage the server with the following commands:
Cursor/Claude integration
MCP Settings
Add the following settings to your ~/.cursor/mcp.json
file:
API endpoint
/gem-generate
: Generate text/gem-generate-image
: Image generation/analysis/gem-analyze-video
: Analyze YouTube videos/gem-search
: Web search
Major Updates
Latest version (2024-03)
- Implementing server automation via PM2
- Unified to gemini-2.0-flash model
- Added automatic restart and error recovery features
- Improve your settings
Previous version
- Added YouTube video analytics feature
- Improved image creation/analysis capabilities
- Add web search functionality
Troubleshooting
Common Problems
- If the server does not startCopy
- API Key Error
- Make sure your API key is set correctly in
config.ts
file. - Check Gemini API Quotas and Permissions
- Make sure your API key is set correctly in
- Memory usage issues
- Check memory limit settings in
ecosystem.config.js
- Track memory usage with PM2 monitoring
- Check memory limit settings in
Contribute
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
This project is licensed under the MIT License. See the LICENSE file for details.
contact
Project Manager: techkwon Email: techkwon@example.com Project Link: https://github.com/techkwon/mcp-gemini
Key Dependencies
- @google/generative-ai: ^0.1.3 (Gemini API SDK)
- @fastify/cors: ^8.5.0 (CORS support)
- fastify: ^4.29.0 (web server framework)
- googleapis: ^148.0.0 (Google API support)
- typescript: ^5.0.0
- zod: ^3.24.2 (data validation)
- pino: ^8.21.0 (logging)
Claude Desktop App Integration Guide
Settings file location
The settings files for the Claude desktop app are located in the following path:
- Windows:
%APPDATA%/Claude/config.json
- macOS:
~/Library/Application Support/Claude/config.json
Example JSON settings
Variable Description
{uuid}
: Unique request ID that is automatically generated.{input}
: Text entered into Claude's chat window
How to use
- Open the settings file of the Claude desktop app.
- Add the JSON settings above to your existing settings.
- Restart the Claude desktop app.
- You can use it in the chat window like this:
Response Format
All API responses follow this format:
Error response
If an error occurs, respond in the following format:
Error Handling
The server returns an appropriate error response in the following situations:
- 400: Bad request format
- 401: Authentication error (API key related)
- 500: Internal server error
Security Considerations
- Be sure to manage your API key as an environment variable.
- In a production environment, add appropriate security settings.
- Be careful not to log sensitive information.
Troubleshooting
Port conflict
If port 8000 is already in use:
Server Stability
If the server terminates unexpectedly:
- Consider using PM2 or another process manager.
- Check the logs to determine the cause of the termination.
Development Guide
Logging
- Implemented structured logging using Pino logger
- In the development environment, readable logs are output via pino-pretty.
Type safety
- Ensure runtime type safety using TypeScript and Zod
- Schema validation for API requests/responses is implemented.
CLINE MCP Marketplace Registration Guide
Preliminary Preparation
- Your GitHub repository must be public
- The README.md file should contain clear installation and setup instructions.
- (Optional) You can provide additional installation instructions for your AI agent via
llms-install.md
file.
Registration Procedure
- Create a new issue in the CLINE MCP Marketplace repository
- The issue includes the following information:
- GitHub repository URL: https://github.com/techkwon/mcp-gemini
- Logo image: PNG file in size 400×400
- Additional Reason: Example of the value this MCP server can provide to CLINE users: GXP12
- Tests whether CLINE can successfully install a server with only README.md
Approval process
- The CLINE team reviews submitted MCP servers
- We are conducting security and stability verification
- Once approved, you will be listed on the Marketplace and accessible to all CLINE users.
Optimized installation guide
You can provide additional installation instructions for your AI agent by creating an llms-install.md
file:
This server cannot be installed
A server that provides access to Google Gemini AI capabilities including text generation, image analysis, YouTube video analysis, and web search functionality through the MCP protocol.