> For the complete documentation index, see [llms.txt](https://getsquish.gitbook.io/squish/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://getsquish.gitbook.io/squish/ja/hajimeni/quickstart-mcp.md).

# クイックスタート: MCP

**AI に動画へのランダムアクセスを提供します。** Squish MCPサーバーは、CLIと同じエンジン上にある薄いstdioサーバーで、1つのツールを公開します — **`squish_video`** — これはローカル動画をタイムスタンプ付きのコンタクトシートに変換し、エージェントがそれをVisionで読み取ります。エンジンも出力もCLIと同じです。すべてはエージェントが動作するマシン上で実行され、何もアップロードされることは一切なく、どの密度でも無料です。

## 要件

Node ≥ 20 と `ffmpeg` + `ffprobe` がPATHにあり（macOS `brew install ffmpeg` ・Ubuntu `sudo apt-get install ffmpeg`）。サーバー自体は npm から直接、次の方法で実行されます： `npx` — インストール手順は不要です。

## サーバーを登録する

1つの設定ブロックで、任意のstdio MCPクライアントにサーバーを登録できます：

```json
{
  "mcpServers": {
    "squish": { "command": "npx", "args": ["-y", "@getsquish/squish", "mcp"] }
  }
}
```

{% tabs %}
{% tab title="Claude Code" %}
1つのコマンド：

```bash
claude mcp add squish -- npx -y @getsquish/squish mcp
```

または、上記の設定ブロックを次の名前でコミットします： `.mcp.json` プロジェクトルートに配置すると、リポジトリで作業する全員とサーバーを共有できます。
{% endtab %}

{% tab title="Claude Desktop" %}
設定 → 開発者 → **Configを編集** を開くと `claude_desktop_config.json`。上記のブロックを追加し、保存して、Claude Desktopを再起動します。
{% endtab %}

{% tab title="Cursor" %}
上記のブロックを次に追加します： `.cursor/mcp.json` プロジェクト内の（または `~/.cursor/mcp.json` 全プロジェクト向け）— エージェントがローカルクリップを自分で処理します。
{% endtab %}
{% endtabs %}

他の任意のstdio MCPクライアントでも同じように動作します — 設定ブロックは同一です。

## 動作確認する

エージェントに次を尋ねます：

> /path/to/clip.mov では何が起こりますか？ squish\_video を使ってください。

エージェントは次を呼び出すはずです： `squish_video`、シートのファイルパスと各フレームのタイムコードを受け取り、Visionでシートを読み取り、各セルに刻印されたタイムコードを引用して回答します。

## ツール

1 つのツール、 **`squish_video`** — `{ video_path, density?, start?, end?, out_dir? }` → CLIの契約 **に加えて** `timecodes[][]` （フレームごと、シートごとに1つ； `m:ss`、1秒未満の `m:ss.d` ウィンドウが短い場合）、刻印された `"contract": "squish-mcp-v0"`:

```json
{
  "input": "/abs/path/clip.mov",
  "duration": 20.275,
  "frames": 9,
  "sheets": 1,
  "files": ["/abs/path/out/clip.sheet-1.jpg"],
  "warnings": [],
  "timecodes": [["0:01","0:03","0:05","0:07","0:10","0:12","0:14","0:16","0:19"]],
  "contract": "squish-mcp-v0"
}
```

エラーはクラッシュではなく、MCPツールのエラーとして表面化します。 `契約` このフィールドはバージョンマーカーです — 破壊的変更を検出するために解析してください。

## ナビゲーションを続ける

`start` / `end` 秒またはシートのタイムコードを受け付け、実行範囲を指定した範囲に絞ります — タイムコードはソース動画に対して絶対値のままなので、エージェントは繰り返し詳細化できます：概要 → シート上で範囲を見つける → 呼び出す `squish_video` 再度、次を指定して `start`/`end` を、見つけたタイムコードに設定 → より狭いウィンドウの、より密なシート。参照： [ナビゲーションループ](/squish/ja/purimitibu/the-navigation-loop.md).

## 次へ

* [ナビゲーションのループ](/squish/ja/purimitibu/the-navigation-loop.md) — 概要 → 拡大 → 引用。
* [MCP リファレンス](/squish/ja/rifarensu/mcp.md) — ツールの完全なスキーマと結果契約。
* [CLI クイックスタート](/squish/ja/hajimeni/quickstart-cli.md) — シェルから同じエンジンを利用でき、スクリプトやシェル対応エージェント向けです。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://getsquish.gitbook.io/squish/ja/hajimeni/quickstart-mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
