
savethepolarbears/google-photos-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
savethepolarbears/google-photos-mcp は [https://github.com/savethepolarbears/google-photos-mcp.] からインポートされた MCP サーバーの候補です
概要
savethepolarbears/google-photos-mcp は [https://github.com/savethepolarbears/google-photos-mcp.] からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
Google Photosの統合のためのモデルコンテキストプロトコル(MCP)サーバー、Claude、Gemini、その他のAIアシスタントが、Googleフォトライブラリから**写真を読み、書き、および選択できるようにします。
✅ Picker API サポート(2025年3月)
このサーバーは、特定のライブラリ API スコープの 2025 減価償却後であっても、Google Photos Picker API を実行します。
| 機能 | ステータス | API | | お問い合わせ | | 完全フォトライブラリー | ✅ | ピッカー API | | テキスト・日付・カテゴリーから探す | ✅ | ライブラリ API | | アルバムの作成・アップロード | ✅ | ライブラリー API | | アクセスアプリ作成コンテンツ | ✅ | ライブラリー API |
##Picker APIの仕組み
- [
create_picker_sessionを呼び出して、ユーザがブラウザで開く認証セッション URL ([pickerUri) を返します。 2。 ユーザーは、インタラクティブに個人的なGoogleフォトライブラリ全体から写真やビデオを選択します。 - [
poll_picker_sessionを呼び出して、セッションの状態を確認します。 [mediaItemsSetが真の場合、選択した項目 ID、ファイル名、MIMEタイプ、寸法、ベースURLが返されます。 - [[
download_picker_media- OAuthベアトークンを使用して認証されたメディアバイトをダウンロード:
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Google Photos MCP Server
A Model Context Protocol (MCP) server for Google Photos integration, enabling Claude, Gemini, and other AI assistants to read, write, and pick photos from your Google Photos library.
✅ Picker API Support (March 2025+)
This server implements the Google Photos Picker API, providing full library access even after the March 31, 2025 deprecation of certain Library API scopes.
| Capability | Status | API |
|---|---|---|
| Browse full photo library | ✅ | Picker API |
| Search photos by text/date/category | ✅ | Library API |
| Create albums & upload photos | ✅ | Library API |
| Access app-created content | ✅ | Library API |
How the Picker API works
- Call
create_picker_session— returns an authenticated session URL (pickerUri) that the user opens in their browser. - The user interactively selects photos and videos from their entire personal Google Photos library.
- Call
poll_picker_session— checks session status. WhenmediaItemsSetis true, the selected items’ IDs, filenames, MIME types, dimensions, and base URLs are returned. - Call
download_picker_media— downloads authenticated media bytes using OAuth bearer tokens:- Image downloads: Downloads original full-resolution files (
=d) by default. Supports custom bounding boxes viawidthandheightparameters (=w{width}-h{height}, range: 1–16,383 pixels). WhendownloadOriginal: falseis supplied without explicit dimensions, defaults to=w2048-h2048preview. - Video downloads: Google Photos base URLs exclusively provide high-quality transcoded MP4 streams (
=dv). Unmodified original video files are not exposed via base URLs per Google API design; responses includeisTranscoded: true. Video bytes can only be requested once videoprocessingStatusis explicitlyREADY. - Session & identity validation: When specifying
baseUrlalongsidesessionId, the server verifies the item exists in the session. IfmediaItemIdis also provided, both must identify the same selected item. - Storage & memory safety: Media bytes can be streamed directly to disk via
savePathwith O(1) heap overhead (strongly recommended for large files and videos). In-memory base64 responses (includeBase64: true) are capped at 10MB to avoid process heap exhaustion (raw binary payloads exceeding ~7.5MB, which expand to >10MB in base64, are rejected with guidance to usesavePath). WhenincludeBase64: falseis specified,savePathis required. - Origin allowlist: Enforces HTTPS and strictly restricts base URLs to official Google Photos media domains (
*.googleusercontent.com,*.photos.google.com,photoslibrary.googleapis.com) to prevent SSRF and token exfiltration.
- Image downloads: Downloads original full-resolution files (
- Call
delete_picker_session— cleans up the session after all desired media items and bytes have been retrieved.
🛡️ Security Notice: CORS Removed
CORS middleware has been removed for security (prevents drive-by attacks on localhost).
インストール
npx -y @smithery/cli install google-photos-mcp --client claude設定
{
"mcpServers": {
"google-photos": {
"command": "node",
"args": ["/path/to/google-photos-mcp/dist/index.js", "--stdio"],
"env": {
"GOOGLE_CLIENT_ID": "your_client_id",
"GOOGLE_CLIENT_SECRET": "your_client_secret",
"GOOGLE_REDIRECT_URI": "http://localhost:3000/auth/callback"
}
}
}
}