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.
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 via configuration files:
Open your Cline settings:
Add the server configuration:
{
"mcpServers": {
"video-recognition": {
"command": "node",
"args": [
"/path/to/mcp-video-recognition/dist/index.js"
],
"disabled": false,
"autoApprove": []
}
}
}
Replace /path/to/mcp-video-recognition/dist/index.js
with the actual path to the index.js
file in your project directory.
Configure the server using 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
)GOOGLE_API_KEY=your_api_key npm start
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")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 > 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"
]
}
}
}
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.