ffmpeg-mcp
# ffmpeg-mcp
FFmpegを使用した音声・動画操作のためのMCPサーバーです。
## 前提条件
- Node.js
- FFmpeg(ローカルにインストール済みで、PATHが通っていること)
## インストール
```bash
npm install
npm run build
```
## 利用可能なツール
| ツール名 | 説明 |
|---------|------|
| `get_media_info` | メディアファイルの詳細情報を取得 |
| `extract_audio` | 動画から音声トラックを抽出 |
| `convert_audio` | 音声フォーマットの変換(コーデック、ビットレート、サンプルレート、チャンネル数) |
| `merge_audio` | 複数の音声ファイルを結合 |
| `trim_audio` | 音声ファイルの切り出し(開始時間、終了時間/長さ指定) |
| `adjust_volume` | 音量調整(%指定、dB指定対応) |
## Claude Desktop(GUI版)での設定
### 設定ファイルの場所
```
%APPDATA%\Claude\claude_desktop_config.json
```
### 設定例
```json
{
"mcpServers": {
"ffmpeg": {
"command": "node",
"args": ["<path-to-ffmpeg-mcp>/dist/index.js"]
}
}
}
```
### 設定後
Claude Desktopを再起動してください。
## Claude Code(CLI版)での設定
### MCPサーバーの追加
```powershell
claude mcp add ffmpeg --scope user -- node "<path-to-ffmpeg-mcp>/dist/index.js"
```
### 設定の確認
```powershell
claude mcp list
```
## 使用例
### 動画から音声を抽出
```
input: video.mp4
output: audio.mp3
```
### 音声フォーマット変換
```
input: audio.wav
output: audio.mp3
bitrate: 192k
```
### 音声ファイルの結合
```
inputs: [part1.mp3, part2.mp3, part3.mp3]
output: combined.mp3
```
### 音声の切り出し
```
input: audio.mp3
start_time: 00:01:30
duration: 30
output: clip.mp3
```
### 音量調整
```
input: audio.mp3
volume: 1.5 (150%)
output: louder.mp3
```
TDQS
Scored across 6 tools
Each tool has a clear verb targeting a distinct audio operation (info, extract, convert, merge, trim, volume). The only mild overlap is extract_audio vs convert_audio, since both produce a new audio file from an existing media file, but the source type distinction mostly disambiguates them.
All six tools follow a consistent snake_case verb_noun pattern (get_media_info, extract_audio, convert_audio, merge_audio, trim_audio, adjust_volume). No mixed conventions or vague one-word names.
Six tools is a well-scoped size for a focused FFmpeg wrapper, with each tool earning its place as a distinct audio operation. Nothing feels redundant or padded.
The tools cover audio lifecycle well (inspect, extract, convert, merge, trim, volume), but for an 'ffmpeg' server the video surface is nearly absent—only get_media_info touches video. Missing video conversion/trim/merge, frame extraction, or filter/resolution operations are notable gaps given the stated domain.