Skip to main content
Glama

MCP Video Recognition Server

ローカルファイルから画像の説明、音声の文字起こし、動画の要約を行うMCPサーバーです。デフォルトではGoogle Geminiを使用し、OpenRouterなどのOpenAI互換エンドポイントにも対応しています。

特徴

  • プロバイダーを選択: Google Gemini(デフォルト)またはOpenAI互換エンドポイント

  • ローカルの画像、音声、動画に対応した3つのMCPツール

  • オプションのGeminiモデルフォールバックと、最終的なOpenAI互換バックアップ

モデルのサポートは異なります。OpenAI互換プロバイダーを選択しても、すべてのエンドポイントやモデルがすべてのメディアタイプを処理できるわけではありません。また、サーバーがモデルやプロバイダーを代わりに置き換えることはありません。

Related MCP server: Puter MCP Server

前提条件

  • Node.js 18.0.0以降

  • プロバイダーのAPIキー:

    • Gemini: GOOGLE_API_KEY

    • OpenAI互換: OPENAI_COMPATIBLE_API_KEY

インストール

git clone https://github.com/yourusername/mcp-video-recognition.git
cd mcp-video-recognition
npm install
npm run build

クイックスタート

MCPクライアントの設定にサーバーを追加し、ビルドした dist/index.js を指定します:

{
  "mcpServers": {
    "video-recognition": {
      "command": "node",
      "args": ["/path/to/mcp-video-recognition/dist/index.js"],
      "env": {
        "GOOGLE_API_KEY": "your_google_api_key"
      }
    }
  }
}

Windowsでは、パスにフォワードスラッシュまたは二重バックスラッシュ(\\)を使用してください。ファイルを保存して、MCPクライアントに再接続します。

OpenRouterやその他のOpenAI互換エンドポイントを使用するには、RECOGNITION_PROVIDER=openai-compatible と関連変数を設定します。すぐに使える例については、構成 を参照してください。

FLUJO を使用する場合:

  1. サーバーを追加 をクリックします。

  2. GitHub URLを貼り付けます。

  3. 解析、クローン、インストール、ビルド、保存 をクリックします。

構成

サーバーは環境変数を読み取ります。最も一般的なものは次のとおりです:

変数

デフォルト

目的

RECOGNITION_PROVIDER

gemini

gemini または openai-compatible

GOOGLE_API_KEY

なし

Gemini APIキー

GEMINI_MODEL

gemini-3.5-flash

使用するGeminiモデル

OPENAI_COMPATIBLE_API_KEY

なし

OpenAI互換APIキー

OPENAI_COMPATIBLE_BASE_URL

なし

エンドポイントのベースURL

OPENAI_COMPATIBLE_MODEL

xiaomi/mimo-v2.5

使用するモデル

ALLOWED_MEDIA_ROOTS

なし

OpenAI互換プロバイダーとGeminiバックアップ用のメディアディレクトリ

不正な値があると起動が停止します。静かに修正されることはありません。

完全な変数リスト、検証ルール、OpenRouterの例、対応メディアタイプについては、構成リファレンス を参照してください。

Geminiモデルのフォールバックと最終バックアップについては、プロバイダーリカバリリファレンス を参照してください。

ツール

サーバーは3つのMCPツールを提供します。各ツールは、ローカルの filepath、オプションの prompt(デフォルトは Describe this content)、オプションの modelname 上書きを受け取ります。

  • image_recognition — 画像を説明する

  • audio_recognition — 音声を文字起こしまたは説明する

  • video_recognition — 動画を説明する

例:

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

セキュリティ

  • デフォルトではHTTPSが必要です。プレーンなHTTPは、明示的に有効化されたローカルエンドポイントでのみ許可されます。

  • OpenAI互換プロバイダーとGeminiバックアップは、ALLOWED_MEDIA_ROOTS にリストしたディレクトリからのみメディアを読み取ります。

  • キーはプロセス環境に保持されます。実際のキーをコミットしないでください。

エンドポイントのルール、リソース制限、インシデント対応については、セキュリティリファレンス を参照してください。

開発

# Run in development mode
GOOGLE_API_KEY=your_api_key npm run dev

# Build and run the provider foundation tests
npm run verify:provider-foundation

プロジェクト構造

  • src/index.ts: エントリポイントとプロバイダー構築

  • src/server.ts: MCPサーバーとトランスポート

  • src/tools/: 3つの認識ツール

  • src/services/: GeminiおよびOpenAI互換プロバイダー

  • src/types/: 共有タイプ

  • src/utils/: ヘルパー

ライセンス

MIT

Available Tools

3 tools
audio_recognitionB

Analyze and transcribe audio using Google Gemini AI

Inputs: filepath (required), modelname, prompt.

image_recognitionB

Analyze and describe images using Google Gemini AI

Inputs: filepath (required), modelname, prompt.

video_recognitionC

Analyze and describe videos using Google Gemini AI

Inputs: filepath (required), modelname, prompt.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting different media types: audio, images, and videos. There is no overlap in functionality, as they handle separate input formats with similar analysis capabilities but different domains.

    Naming Consistency5/5

    All tool names follow a consistent pattern of 'media_type_recognition' using snake_case. This predictable naming scheme makes it easy to understand what each tool does based on its name alone.

    Tool Count3/5

    With only 3 tools, the server feels somewhat thin for a video recognition domain, as it lacks operations like video editing, frame extraction, or metadata retrieval. However, the core recognition functions for audio, images, and videos are covered, making it borderline appropriate.

    Completeness3/5

    The server provides basic recognition for three media types but lacks comprehensive coverage for video processing. There are no tools for operations like video segmentation, object tracking, or format conversion, which are common in video recognition workflows, leaving notable gaps.

    Maintenance

    ActivityStale
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers