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
Setup instructions
Provider
Mario Andreschak
Release date
Apr 20, 2025
Language
TypeScript
Stats
7 stars

The MCP Video Recognition Server provides tools for image, audio, and video recognition using Google's Gemini AI through a Model Context Protocol (MCP) interface. It enables analysis and description of various media types with AI assistance.

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:

  1. Open your Cline settings in VS Code (File -> Preferences -> Settings)
  2. Search for "Cline MCP Settings" and click "Edit in settings.json"
  3. Add the server configuration:
    {
      "mcpServers": {
        "video-recognition": {
          "command": "node",
          "args": [
            "/path/to/mcp-video-recognition/dist/index.js"
          ],
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    
  4. Replace /path/to/mcp-video-recognition/dist/index.js with the actual path to the file
  5. Save the settings file

Configuration

Configure the server using these 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 install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "video-recognition" '{"command":"node","args":["/path/to/mcp-video-recognition/dist/index.js"],"disabled":false,"autoApprove":[]}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

{
    "mcpServers": {
        "video-recognition": {
            "command": "node",
            "args": [
                "/path/to/mcp-video-recognition/dist/index.js"
            ],
            "disabled": false,
            "autoApprove": []
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "video-recognition": {
            "command": "node",
            "args": [
                "/path/to/mcp-video-recognition/dist/index.js"
            ],
            "disabled": false,
            "autoApprove": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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