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.
Clone the repository:
git clone https://github.com/yourusername/mcp-video-recognition.git
cd mcp-video-recognition
Install dependencies:
npm install
Build the project:
npm run build
To integrate with Cline or other MCP clients:
{
"mcpServers": {
"video-recognition": {
"command": "node",
"args": [
"/path/to/mcp-video-recognition/dist/index.js"
],
"disabled": false,
"autoApprove": []
}
}
}
/path/to/mcp-video-recognition/dist/index.js
with the actual path to the fileConfigure the server using these environment variables:
GOOGLE_API_KEY
(required): Your Google Gemini API keyTRANSPORT_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
)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
The server provides three tools that can be called by MCP clients:
{
"name": "image_recognition",
"arguments": {
"filepath": "/path/to/image.jpg",
"prompt": "Describe this image in detail",
"modelname": "gemini-2.0-flash"
}
}
{
"name": "audio_recognition",
"arguments": {
"filepath": "/path/to/audio.mp3",
"prompt": "Transcribe this audio",
"modelname": "gemini-2.0-flash"
}
}
{
"name": "video_recognition",
"arguments": {
"filepath": "/path/to/video.mp4",
"prompt": "Describe what happens in this video",
"modelname": "gemini-2.0-flash"
}
}
All tools accept the following parameters:
filepath
(required): Path to the media file to analyzeprompt
(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")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.
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.
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": []
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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