MCP Catalogs
Home

mcp-gemini-server

by bsmi021·35·Score 41

A TypeScript MCP server wrapping Google Gemini API, offering tools for text generation, multimedia analysis, and function calling.

ai-llmdeveloper-toolsmedia
15
Forks
1
Open issues
12 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server provides a comprehensive interface to Google's Gemini models through the Model Context Protocol. It wraps the @google/genai SDK to expose Gemini capabilities as standard MCP tools, enabling other LLMs or MCP-compatible systems to leverage Gemini as a backend. The server supports multiple Gemini models including gemini-1.5-pro-latest, gemini-1.5-flash, and gemini-2.5-pro. It offers features like core text generation, function calling, stateful chat management, URL-based multimedia analysis, caching, and image generation. While it doesn't support direct file uploads, it excels at analyzing publicly accessible URLs including images and YouTube videos.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Analyzing YouTube videos for educational content summarization
you:Generating text content with system instructions and cached context
you:Performing web content analysis through URL processing
you:Does this server support direct file uploads?
you:Can I use this with Vertex AI credentials?

When to choose this

Choose this server when you need to integrate Google's Gemini models into an MCP-compatible system, especially for multimedia analysis from URLs and image generation capabilities.

When NOT to choose this

Don't choose this if you need direct file upload support or want to use Vertex AI credentials instead of Google AI Studio API keys.

Tools this server exposes

12 tools extracted from the README
  • gemini_generateContent

    Generates non-streaming text content from a prompt with optional URL context support.

  • gemini_generateContentStream

    Generates streaming text content from a prompt with optional URL context support.

  • gemini_functionCall

    Enables Gemini models to request the execution of client-defined functions.

  • gemini_startChat

    Starts a new chat session with Gemini for stateful conversations.

  • gemini_sendMessage

    Sends a message in an ongoing chat session with Gemini.

  • gemini_generateImage

    Generates images from text prompts using Gemini 2.0 Flash Experimental.

  • gemini_url_analysis

    Specialized tool for advanced URL content analysis with multiple analysis types.

  • mcpConnectToServer

    Establishes a connection to an external MCP server.

  • mcpListServerTools

    Lists available tools on a connected MCP server.

  • mcpCallServerTool

    Calls a function on a connected MCP server, with an option for file output.

  • mcpDisconnectFromServer

    Disconnects from an external MCP server.

  • writeToFile

    Writes content directly to files within allowed directories.

Comparable tools

mcp-openai-serveranthropic-claude-mcp-servergemini-api-cli

Installation

Installation & Setup

  1. **Clone/Place Project:** Ensure the mcp-gemini-server project directory is accessible.
  2. **Install Dependencies:**

``bash npm install ``

  1. **Build Project:**

``bash npm run build ``

  1. **Generate Connection Token:** Create a secure token using Node.js crypto:

``bash node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" ``

  1. **Configure MCP Client:** Add to your settings file:

``json { "mcpServers": { "gemini-server": { "command": "node", "args": ["/path/to/mcp-gemini-server/dist/server.js"], "env": { "GOOGLE_GEMINI_API_KEY": "YOUR_API_KEY", "MCP_SERVER_HOST": "localhost", "MCP_SERVER_PORT": "8080", "MCP_CONNECTION_TOKEN": "YOUR_GENERATED_CONNECTION_TOKEN", "GOOGLE_GEMINI_MODEL": "gemini-1.5-flash" } } } } ``

FAQ

Does this server support direct file uploads?
No, this MCP Gemini Server does not support direct file uploads. It focuses on URL-based multimedia analysis for images and videos. Local files must be hosted publicly to be analyzed.
Can I use this with Vertex AI credentials?
No, this server only supports Google AI Studio API keys. The Caching API is not compatible with Vertex AI credentials and is not currently supported.

Compare mcp-gemini-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.