Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLog level for photos-mcp's own JSON log lines on stderr.INFO
MCP_BEARER_TOKENNoRequired for --transport http. Bearer token clients must send; several tokens may be comma-separated.
PHOTOS_BUDGET_TZNoIANA time zone whose midnight resets the daily budgets.UTC
PHOTOS_STATE_DIRNoDirectory for state.json (budgets, breaker, dead generation, last error) and the cache/ directory./state
PHOTOS_SESSION_DIRNoDirectory holding the read-only session snapshot (cookies.txt and meta.json)./session
PHOTOS_CACHE_MAX_BYTESNoMaximum size of the LRU thumbnail cache; 0 disables it.2 GiB
PHOTOS_DAILY_RPC_BUDGETNoDaily budget for RPCs plus app-page loads.3000
PHOTOS_DAILY_THUMB_BUDGETNoDaily budget for image fetches; cache hits are free.2000
GOOGLE_PHOTOS_EXPECTED_EMAILYesRequired. The only Google account served by the server.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Google Photos for the calling person's own account: search, view, upload, move to/from trash, and organise albums. Nothing here empties the trash, archives or edits photos, or changes sharing.

Flow: photos_search -> photos_contact_sheet -> photos_view, then photos_show for the person.

  • Always call photos_show with a short note per photo whenever presenting picks or results to the person (claude.ai and ChatGPT render a gallery), without waiting to be asked.

  • Items share one shape ({id, url, type, taken_at, tz_known, filename, description, place, favourite, archived}); link with url. taken_at has a local UTC offset when tz_known is true, else UTC ("Z"). Search omits place unless details=true or photos_get is called.

  • Viewing caps at 1568 px; width/height reflect the returned JPEG, not originals (originals are unavailable; photos_get has original dimensions). photos_download links expire in 10 min and are consumed on first GET (do not preview them first; videos are refused).

  • Paging cursors live 1 h (same query/source/album). Shared/partner libraries are not covered. photos_list(source=library) excludes archived items; search/albums/archive include them.

  • Destructive actions (photos_delete, photos_album_delete, photos_album_remove): confirm with the person first, showing exactly what goes (photos_show for photos; title and count for albums).

  • Requests are paced and daily-budgeted: keep limits modest and avoid loops. photos_canary is for monitoring only. Errors return {"error": {"code", "next_step", "retryable"}}; follow next_step.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
photos_searchA

Search the library with Google Photos' own search (people, places, things, text in images, dates; archived items included). Returns items {id, url, type, taken_at, tz_known, filename, description, place, favourite, archived}, next_cursor, coverage and freshness. place is null here (Google's search response has none) unless details=true, which also adds lat, lon and camera.

photos_listA

List the library newest-first by taken date (archive excluded; from_date/to_date for an exact range of the items' own local dates), the archive, one album, the favourites, or what was uploaded most recently. Same item shape as photos_search; place is set where Google's listing carries it (details=true adds it, with lat, lon and camera). A supported managed album listing returns connection_epoch, distinct from freshness.generation. Retain it and pass expected_connection on subsequent album reads/removal. Unsupported setups provide no binding. Start a fresh complete listing to observe exact IDs; recovered cursors cannot prove absence.

photos_albumsA

List albums: {id, title, count, shared}. Use an id with photos_list(source="album").

photos_getA

Details per item, all ids in one Google request: the item shape of photos_search plus uploaded_at (UTC), lat/lon, camera, width/height (original), size_bytes, duration_s and albums. Failed items carry their own error. For conditional capture, pass the original album listing's connection_epoch as expected_connection; successful responses retain that binding and validate each returned provider item identity.

photos_contact_sheetA

One JPEG grid (at most 1568 px) of up to 24 items with numbered tiles and a play badge on videos, plus a legend mapping each number to its id and date.

photos_viewA

Look at up to 4 items: per id a label (n, id, taken_at, type, width/height of the returned JPEG) followed by the JPEG, at most max_px (≤1568) on the longest edge; no originals. A video gives its poster frame (video_poster: true).

photos_on_this_dayA

Photos and videos taken on this calendar day in earlier years ("on this day"), newest year first: {date, years: [{year, items, more}], years_checked}. more: that day holds more than shown (photos_list with from_date=to_date=that day lists them all). One Google request per year, so keep years modest.

photos_showA

Show photos to the person as a gallery: thumbnail, date, your note and a link that opens each one in Google Photos (claude.ai and ChatGPT draw it; other clients get the same data as JSON). Use it whenever you present photos you picked or found.

photos_album_createA

Create an album, with up to 50 items in it. Returns the album {id, url, title, count, shared} and how many items it holds. Do not repeat a call that failed with outcome_unknown: photos_albums shows whether the album exists.

photos_album_addA

Add up to 50 items (ids from search or list) to an album, also a shared one this account may add to. Items already in it stay once. Returns the album as Google shows it afterwards and added (from its counts before and after).

photos_album_removeA

Take up to 50 items out of an album; they stay in the library. Only ids the album's own listing holds are removed (not_in_album: the others). Ask the person first, showing which photos leave the album. Returns the album afterwards and removed. For conditional cleanup pass the connection_epoch from the original album listing as expected_connection. A changed or unsupported binding refuses before removal. An uncertain outcome must never be repeated automatically; counts alone do not prove exact-ID absence.

photos_album_deleteA

Delete one of the person's own albums; its photos stay in the library, but the album cannot be brought back. Ask the person first, naming the album and how many photos it holds. Returns the album and deleted (read back: the album no longer opens). Shared albums are deleted or left in the app.

photos_deleteA

Move up to 50 photos or videos to the trash, where Google keeps them 60 days (photos_restore brings them back). Ask the person first, showing them the photos (photos_show). Returns trashed, not_found (ids that are not items of this library) and, per id, in_trash (read back from the trash).

photos_restoreA

Bring up to 50 photos or videos back from the trash into the library. Returns restored, not_in_trash and, per id, restored (read back from the trash).

photos_uploadA

Add one photo or video to the library (and to an album): the file at a public https link (url), or one you have as base64 (data). A file the library already holds is not added again (already_in_library). Returns the item {id, url, type, filename, taken_at, tz_known, width, height, uploaded_at} and the album afterwards. For the person's own files, or a file on disk, use photos_upload_link.

photos_statusA

Session account and generation, snapshot age, breaker, daily budgets left, cache size and the last error. Never calls Google.

photos_canaryA

Monitoring: one real check of the path agents use (a library page of 1 item and its thumbnail); the verdict is cached 55 min (transient failures: 5 min) and calls in between return it (cached: true). {ok, code, checked_at, cached, snapshot_age_s, generation}; ok is false on any error code, or with code snapshot_stale when the snapshot is older than 3 h or dated in the future. Never fails.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
photos-viewA gallery of photos (thumbnail, date, your note, link to Google Photos) for photos_show.

TDQS

A3.9/5.0

Scored across 17 tools

Disambiguation4/5

Most tools target a distinct resource+action, and album operations, trash, upload and status are cleanly separated. The blurriest cluster is the three presentation tools (photos_view, photos_contact_sheet, photos_show) plus the details=true flag on list/search overlapping photos_get, but descriptions do enough to steer selection (agent-facing JPEGs vs person-facing gallery vs single-item details).

Naming Consistency4/5

All names share the photos_ prefix and follow a readable photos_<resource>[_<action>] shape (photos_album_create, photos_album_remove, photos_delete). Minor deviations: status/albums/contact_sheet/canary/on_this_day are noun-only with no verb, and upload vs album_add use different verbs for similar concepts, but nothing is genuinely confusing.

Tool Count4/5

17 tools is on the heavier side but each maps to a real capability in a broad domain (search, browse, albums, upload, trash/restore, presentation, health). Slightly over-scoped—photos_status and photos_canary are operational extras rather than core workflows—but nothing feels like filler.

Completeness3/5

Core lifecycle is well covered: search/list/get, upload, trash/restore, and full album create/add/remove/delete plus multiple presentation paths. However there are notable gaps: no album rename/metadata update, no favourite/unfavourite or item description update, no sharing controls beyond shared flags, and photos_upload's description directs agents to a photos_upload_link tool that is not in the surface—a real dead end.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues