Google Photos MCP Server
Requires setup of a Google Cloud project to enable the Photos Library API and manage OAuth credentials for library access.
Allows searching photos by content, date, and location, listing albums, and retrieving photo metadata and images from a Google Photos library.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Photos MCP Serverfind photos from my trip to Paris last summer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Call
delete_picker_session— cleans up the session after all desired media items and bytes have been retrieved.
Related MCP server: CoreViz MCP
🛡️ Security Notice: CORS Removed
CORS middleware has been removed for security (prevents drive-by attacks on localhost).
✅ STDIO mode (Claude Desktop): Works normally
✅ Streamable HTTP (Cursor, server-to-server): Works normally
❌ Browser AJAX: Not supported (by design)
Features
Read operations
Search photos by text, date, location, category, favorites
Filter by media type (photo/video), date ranges, archived status
Get photo details including base64-encoded images
List albums and their contents
Describe available filter capabilities
Write operations
Create albums and upload photos
Batch upload with
create_album_with_media(up to 50 files)Add text and location enrichments to albums
Set album cover photos
Picker operations
Create picker sessions for interactive user media selection across the full photo library
Poll sessions and retrieve selected media items with pagination
Download authenticated media bytes via
download_picker_mediawith disk streaming or base64Delete and clean up active sessions via
delete_picker_session
MCP Resources & Prompts
Browse app-created albums as MCP resources (
google-photos://albums,google-photos://albums/{albumId})Inspect media items directly via URI (
google-photos://media/{mediaItemId})Built-in prompts for assisted organization, batch uploads, and multi-criteria photo discovery
Infrastructure
⚡ Streamable HTTP transport (MCP 2025-06-18 spec)
🔗 HTTPS Keep-Alive with connection pooling
🔒 Hardened local SQLite token storage (
tokens.dbvia Keyv) with owner-only permissions (0600 on Unix, explicit user-only ACLs viaicaclson Windows)📊 Quota management with automatic per-request and per-page tracking
🔄 Automatic token refresh with race-condition prevention
Prerequisites
Node.js 22.22+
npm 11.11+
Google Cloud project with Photos Library API and Google Photos Picker API enabled
OAuth 2.0 credentials (Web application type)
Setup
1. Google Cloud setup
Go to Google Cloud Console
Create a new project (or select existing)
Enable Photos Library API and Google Photos Picker API
Create OAuth 2.0 credentials (Web application)
Add
http://localhost:3000/auth/callbackas an authorized redirect URINote your Client ID and Client Secret
2. Installation
git clone https://github.com/savethepolarbears/google-photos-mcp.git
cd google-photos-mcp
npm install3. Configuration
cp .env.example .envEdit .env:
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback
PORT=3000
NODE_ENV=development4. Build & run
npm run build # Compile TypeScript
npm start # HTTP mode (for auth & Cursor)
npm run stdio # STDIO mode (for Claude Desktop)
npm run dev # Dev mode with live reload5. Authenticate
Start in HTTP mode:
npm startVisit
http://localhost:3000/authin your browserComplete the Google OAuth flow
Tokens are saved automatically to the local SQLite database (
tokens.dbvia Keyv)
Note: Authentication must be completed in HTTP mode first. After that, switch to STDIO mode for Claude Desktop.
Dynamic port
PORT=3001 npm start
# Also update GOOGLE_REDIRECT_URI in .env to matchClient configuration
Claude Desktop (STDIO)
{
"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"
}
}
}
}Cursor IDE
STDIO (recommended):
Type: Command
Command:
node /path/to/google-photos-mcp/dist/index.js --stdio
HTTP:
Type: URL
URL:
http://localhost:3000/mcp
Smithery
# Claude Desktop
npx -y @smithery/cli install google-photos-mcp --client claude
# Cursor IDE
npx -y @smithery/cli install google-photos-mcp --client cursorMCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js # HTTP
npx @modelcontextprotocol/inspector node dist/index.js --stdio # STDIOAvailable tools (21)
Search & browse
Tool | Description |
| Text-based photo search |
| Search by location name |
| Filter by dates, categories, media type, favorites, archived |
| Get photo details (optional base64) |
| List all albums |
| Get album details |
| List photos in an album |
| List app-created media items (use Picker API for full library) |
| JSON reference of all filter options |
Write & manage
Tool | Description |
| Create a new album |
| Upload a local file |
| Add existing items to an album (max 50) |
| Create album + upload files in one call (max 50) |
| Add text or location enrichment |
| Set album cover photo |
Picker API
Tool | Description |
| Start a Picker session for full library access |
| Check session status and retrieve selected photos |
| Download media bytes via OAuth (original images via |
| Delete and clean up a Picker session after all media items and bytes are downloaded |
Auth
Tool | Description |
| Check authentication status |
| Start OAuth flow via temporary local server |
MCP Resources (3)
AI clients can read Google Photos entities directly as MCP resources:
URI | Description |
| List of app-created albums in Google Photos (photoslibrary.readonly.appcreateddata scope) |
| Metadata for a specific app-created album by ID (title, item count, cover photo URL) |
| Detailed metadata, base URL, and properties for a photo or video |
MCP Prompts (3)
Pre-configured prompt templates guide AI assistants through common media workflows:
Prompt | Description | Arguments |
| Guide the AI to organize photos by theme or date range into albums |
|
| Guide the AI through uploading multiple local media files and creating an album |
|
| Guide the AI to find photos using specific criteria, dates, and locations |
|
Example queries
"Show me photos from my trip to Paris"
"Find photos of my dog from 2024"
"List my photo albums"
"Upload these vacation photos to a new album called 'Summer 2025'"
"Search for landscape photos from last year, ordered newest first"
"Let me pick some photos from my library" (triggers Picker API)Location data
Location data is approximate, extracted from photo descriptions using OpenStreetMap/Nominatim geocoding. When available, includes latitude/longitude, city, region, country.
Deployment / release
This project is a Model Context Protocol (MCP) server intended to be run locally alongside AI clients like Claude Desktop or Cursor. There is no remote deployment or release process required beyond keeping your local checkout or NPM installation up to date.
Troubleshooting
Node Version: Ensure you are using Node.js 22.22+ as older versions are not supported.
Authentication: If you encounter
GOOGLE_CLIENT_ID is not seterrors or authentication fails, verify your.envfile is present in the root directory and contains your correct Google Cloud credentials. Remember to runnpm start(HTTP mode) to authenticate before switching to STDIO mode.Quota Issues: Google Photos API limits apply. Ensure you aren't hitting the 10,000 requests/day quota limit. The server tracks this via
quotaManager.CORS Errors: The server intentionally disables CORS to prevent drive-by attacks. Do not attempt to call the server directly from browser AJAX requests.
Development
Project structure
src/
├── index.ts # HTTP entry point
├── dxt-server.ts # STDIO/DXT entry point
├── mcp/core.ts # All tool handlers (21 tools)
├── api/
│ ├── client.ts # REST client (Library + Picker)
│ ├── photos.ts # Facade module (re-exports)
│ ├── types.ts # TypeScript interfaces
│ └── repositories/ # Low-level API calls
├── auth/ # OAuth, tokens, SQLite storage
├── schemas/ # Zod validation schemas
├── utils/ # Config, logging, quota, retry
└── views/ # HTML templatesTesting
npm test # All tests (Vitest)
npm run test:watch # Interactive TDD
npm run test:coverage # Coverage report
npm run test:security # Security suite onlyQuality checks
All verification commands must pass before merge:
npx tsc --noEmit # Type check
npm run lint # ESLint
npm run lint:md # Markdown lint
npm test # Vitest suite
npm run build # Build checkLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Google Search, YouTube data and transcripts, and media downloads to your cloud storage.
1Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Image and video AI tools and your own pipelines, run from any AI assistant.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI assistants to query and export from the macOS Apple Photos library using natural language, backed by osxphotos.211,493 npm27MIT

CoreViz MCPofficial
AlicenseNot gradedqualityDmaintenanceExposes a visual library with semantic search, tagging, editing, and management of photos as tools for AI agents like Claude Code.13 npm49MIT- FlicenseNot gradedqualityBmaintenanceEnables users to search and retrieve photos from a self-hosted Immich photo library via natural language, supporting CLIP-based semantic search, metadata filtering, album browsing, and share link creation.-
- AlicenseAqualityAmaintenanceEnables AI agents to search, inspect, organize, and export photos from a local Apple Photos library using natural language, including scene labels, text, faces, places, and albums.13227 npmMIT