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 "Install 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 a URL the user opens in their browserUser selects photos from their full library
Call
poll_picker_session— whenmediaItemsSetis true, selected photos are returned
🛡️ 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 full library access
Poll sessions and retrieve selected media items
Infrastructure
⚡ Streamable HTTP transport (MCP 2025-06-18 spec)
🔗 HTTPS Keep-Alive with connection pooling
🔒 OS keychain token storage
📊 Quota management with automatic tracking
🔄 Automatic token refresh
Prerequisites
Node.js 18+
Google Cloud project with Photos Library 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
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 OS keychain
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 (19)
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 all media items |
| 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 |
Auth
Tool | Description |
| Check authentication status |
| Start OAuth flow via temporary local server |
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.
Development
Project Structure
src/
├── index.ts # HTTP entry point
├── dxt-server.ts # STDIO/DXT entry point
├── mcp/core.ts # All tool handlers (19 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, keychain
├── 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 three must pass before merge:
npx tsc --noEmit # Type check
npm run lint # ESLint
npm test # TestsLicense
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.