Google Photos MCP Server logo

Google Photos MCP Server

Community
savethepolarbears

A Model Context Protocol repository for Google Photos API

Publishersavethepolarbears
Repositorygoogle-photos-mcp
LanguageTypeScript
Forks
15
Stars
44
Available tools
0
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    Google Photos MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    44 stars and 15 forks from the linked repository.

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.

CapabilityStatusAPI
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

  1. Call create_picker_session — returns a URL the user opens in their browser
  2. User selects photos from their full library
  3. Call poll_picker_session — when mediaItemsSet is 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 22.22+
  • Google Cloud project with Photos Library API enabled
  • OAuth 2.0 credentials (Web application type)

Setup

1. Google Cloud setup

  1. Go to Google Cloud Console
  2. Create a new project (or select existing)
  3. Enable Photos Library API
  4. Create OAuth 2.0 credentials (Web application)
  5. Add http://localhost:3000/auth/callback as an authorized redirect URI
  6. Note your Client ID and Client Secret

2. Installation

bash
git clone https://github.com/savethepolarbears/google-photos-mcp.git
cd google-photos-mcp
npm install

3. Configuration

bash
cp .env.example .env

Edit .env:

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=development

4. Build & run

bash
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 reload

5. Authenticate

  1. Start in HTTP mode: npm start
  2. Visit http://localhost:3000/auth in your browser
  3. Complete the Google OAuth flow
  4. 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

bash
PORT=3001 npm start
# Also update GOOGLE_REDIRECT_URI in .env to match

Client configuration

Claude Desktop (STDIO)

json
{
  "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

bash
# Claude Desktop
npx -y @smithery/cli install google-photos-mcp --client claude

# Cursor IDE
npx -y @smithery/cli install google-photos-mcp --client cursor

MCP Inspector

bash
npx @modelcontextprotocol/inspector node dist/index.js        # HTTP
npx @modelcontextprotocol/inspector node dist/index.js --stdio # STDIO

Available tools (19)

Search & browse

ToolDescription
search_photosText-based photo search
search_photos_by_locationSearch by location name
search_media_by_filterFilter by dates, categories, media type, favorites, archived
get_photoGet photo details (optional base64)
list_albumsList all albums
get_albumGet album details
list_album_photosList photos in an album
list_media_itemsList all media items
describe_filter_capabilitiesJSON reference of all filter options

Write & manage

ToolDescription
create_albumCreate a new album
upload_mediaUpload a local file
add_media_to_albumAdd existing items to an album (max 50)
create_album_with_mediaCreate album + upload files in one call (max 50)
add_album_enrichmentAdd text or location enrichment
set_album_coverSet album cover photo

Picker API

ToolDescription
create_picker_sessionStart a Picker session for full library access
poll_picker_sessionCheck session status and retrieve selected photos

Auth

ToolDescription
auth_statusCheck authentication status
start_authStart OAuth flow via temporary local server

Example queries

text
"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 set errors or authentication fails, verify your .env file is present in the root directory and contains your correct Google Cloud credentials. Remember to run npm 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

text
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 templates

Testing

bash
npm test              # All tests (Vitest)
npm run test:watch    # Interactive TDD
npm run test:coverage # Coverage report
npm run test:security # Security suite only

Quality checks

All three must pass before merge:

bash
npx tsc --noEmit   # Type check
npm run lint        # ESLint
npm test            # Tests

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "google-photos-mcp": {
      "command": "node",
      "args": [
        "dist/index.js",
        "--stdio"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>",
        "GOOGLE_REDIRECT_URI": "<GOOGLE_REDIRECT_URI>"
      }
    }
  }
}

Use Google Photos MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Google Photos MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Google Photos MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Google Photos MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "google-photos-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "google-photos-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Google Photos MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Google Photos MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Google Photos MCP Server to help me with this task?
Google Photos MCP Server
Sure. I read it.
Here is what I found using Google Photos MCP Server.

Option 2: Add an MCP server URL

Use this when Google Photos MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for Google Photos MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Google Photos MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Google Photos MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Google Photos MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Google Photos MCP Server to help me with this task?
Google Photos MCP Server
Sure. I read it.
Here is what I found using Google Photos MCP Server.

Frequently asked questions

What is the Google Photos MCP Server MCP server used for?

Google Photos MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Google Photos MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Google Photos MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Google Photos MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Google Photos MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Google Photos MCP Server MCP to TypingMind?

Google Photos MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Google Photos MCP Server MCP provide in TypingMind?

Google Photos MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Google Photos MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Google Photos MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇