Gemini Media Analysis MCP server

Provides image, audio, and video analysis tools using Google's Gemini AI for content description, transcription, and understanding with file caching for improved performance.
Back to servers
Provider
Mario Andreschak
Release date
Apr 20, 2025
Language
TypeScript
Stats
6 stars

The MCP Video Recognition Server provides tools for image, audio, and video recognition using Google's Gemini AI. It allows you to analyze and describe media files through a standard MCP interface that integrates with compatible clients.

Prerequisites

  • Node.js 18 or higher
  • Google Gemini API key

Installation Options

Manual Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-video-recognition.git
    cd mcp-video-recognition
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Installing in FLUJO

  1. Click Add Server
  2. Copy & Paste Github URL into FLUJO
  3. Click Parse, Clone, Install, Build and Save.

Installing via Configuration Files

To integrate with Cline or other MCP clients via configuration files:

  1. Open your Cline settings:

    • In VS Code, go to File -> Preferences -> Settings
    • Search for "Cline MCP Settings"
    • Click "Edit in settings.json"
  2. Add the server configuration:

    {
      "mcpServers": {
        "video-recognition": {
          "command": "node",
          "args": [
            "/path/to/mcp-video-recognition/dist/index.js"
          ],
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    
  3. Replace /path/to/mcp-video-recognition/dist/index.js with the actual path to the index.js file in your project directory.

Configuration

Configure the server using environment variables:

  • GOOGLE_API_KEY (required): Your Google Gemini API key
  • TRANSPORT_TYPE: Transport type (stdio or sse, defaults to stdio)
  • PORT: Port number for SSE transport (defaults to 3000)
  • LOG_LEVEL: Logging level (verbose, debug, info, warn, error, defaults to info)

Usage

Starting the Server

With stdio Transport (Default)

GOOGLE_API_KEY=your_api_key npm start

With SSE Transport

GOOGLE_API_KEY=your_api_key TRANSPORT_TYPE=sse PORT=3000 npm start

Using the Tools

The server provides three tools that can be called by MCP clients:

Image Recognition

{
  "name": "image_recognition",
  "arguments": {
    "filepath": "/path/to/image.jpg",
    "prompt": "Describe this image in detail",
    "modelname": "gemini-2.0-flash"
  }
}

Audio Recognition

{
  "name": "audio_recognition",
  "arguments": {
    "filepath": "/path/to/audio.mp3",
    "prompt": "Transcribe this audio",
    "modelname": "gemini-2.0-flash"
  }
}

Video Recognition

{
  "name": "video_recognition",
  "arguments": {
    "filepath": "/path/to/video.mp4",
    "prompt": "Describe what happens in this video",
    "modelname": "gemini-2.0-flash"
  }
}

Tool Parameters

All tools accept the following parameters:

  • filepath (required): Path to the media file to analyze
  • prompt (optional): Custom prompt for the recognition (defaults to "Describe this content")
  • modelname (optional): Gemini model to use for recognition (defaults to "gemini-2.0-flash")

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later