facenest-mcp
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., "@facenest-mcp find photos of Emma from our beach trip and show the best smiles"
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.
facenest-mcp
Let Claude / Cursor / Codex / DSH / OpenCode read the photo library on your own computer.
28 tools · zero dependencies · photos never leave your machine · writes are off by default
facenest.net · Free download · 简体中文
This is the MCP adapter for FaceNest — a local-first photo manager: faces, tags, AI captions and the semantic index all run on your own machine. Only the adapter is open source (MIT); the app itself is closed source. Photos, videos and the index never leave your computer.
Why it is worth a try
1. It reads answers that are already computed — it does not look at your pictures.
The expensive part of your library already exists: AI captions, auto tags, face clusters, capture times, GPS.
Without MCP an agent can only "look at pictures" (slow, expensive, it guesses); with it the agent gets
material cards carrying an image_id.
2. There is a "show me first, I say yes, then you act" loop.
pick_best_photos picks candidates → make_contact_sheet lays them out as a numbered preview wall →
you reply "keep #2 and #5" → only then is an album created or files copied.
That is the biggest difference from every other photo MCP: the assistant does not dump 200 pictures into your project folder.
3. Writes are the minority, and the irreversible ones are not offered. Of the 28 tools, 22 are read-only and 6 write. Writing needs a separate switch in the app; no tool can delete or move your photo files — the only delete removes an album definition, the photos stay where they are, and the reply contains a snapshot you can rebuild the album from.
4. Zero dependencies, auditable protocol. Python 3.9+ standard library only (stdio JSON-RPC written by hand, no SDK). The whole protocol is two files you can read end to end. Not for style points — so it runs on a machine that only has Python installed.
Related MCP server: semantic-image-search-mcp
Install in 30 seconds
Prerequisite: install FaceNest first (the free tier is enough: 500 photos in the library, 200 semantic queries). 👉 facenest.net/download · Windows today; the current macOS status is stated on the website.
# 1) In the app: Settings → AI agent (MCP) → turn on "Expose the MCP service", copy the endpoint file path
# 2) Install the adapter
git clone https://github.com/eclgo/facenest-mcp.git
cd facenest-mcp
python -m pip install -e .
# 3) Self-test (no client needed)
facenest-mcp --selftest
# → OK http://127.0.0.1:<port> api=1 images=1234 write_allowed=falseOK means it is connected. Next, paste the absolute path of the endpoint file into your client config (below).
The full install page — the uvx one-liner, the editable install, the four paste-ready client
configs and the verification commands — is docs/QUICKSTART.md.
🔒
mcp_endpoint.jsonholds a plaintext token — treat it like a password. It is in.gitignore. ⚠️ The port is chosen at runtime by the app;1992in an example file is just an example — trust--selftest. ⚠️ Use an absolute path in client configs: auto-detection depends on the process working directory and is unreliable under GUI clients.
Works today, no PyPI needed:
uvx --from git+https://github.com/eclgo/facenest-mcp facenest-mcp --selftest—uv/uvxpulls it straight from GitHub; nogit clone, nopip install -e ..Or use the editable install above, and put the clone on
PYTHONPATH.Publishing on PyPI is on the roadmap: once published, configs shrink to
uvx facenest-mcp.
Five things people actually use
Every line below can be pasted straight into your assistant. The tool chain is folded away for integrators. Counts and seconds depend on your own library — they are not benchmarks.
① Find a person in your videos, keep the frames where they smile
You: "Find every clip where Xiaoyu appears in my videos, and save the 3 frames where she smiles best as photos."
The assistant: lists videos → locates the timestamps where that person appears → picks 3 frames smiling-first → collects them in batch
You get: 3 new photos (you can then build an album from them); the video is not touched, byte for byte
Limits: batch collection is ≤10 frames per call, 40 frames per session (counted per frame); the single-frame tool is also 40 per session; time accuracy is ± one frame interval (default 2 s); a face too small to measure returns smile:null, which is not "not smiling"
facenest_list_videos → facenest_list_people → facenest_find_person_in_videos → facenest_pick_best_video_frames {cluster_id, video_id?, preset:"face", prefer_smiling:true, top:3} → facenest_collect_video_frames {frame_ids:[…]}
② Pick PPT material from your library, and deliver only after you confirm
You: "From my asset folders, find large landscape 16:9 shots that could be an autumn-campaign cover, give me a numbered preview, then copy my picks into
D:\Deck\assets."
The assistant: semantic search / tag filters → ranks by sharpness, keeps 16:9 → lays out a numbered preview wall → you say "keep #2 and #7" → it copies the original bytes into your folder
You get: files sitting in your project folder, names following {index:02d}-{name}{ext}; a HEIC stays a HEIC, not the internal preview
Limits: ≤200 files per call, ≤2000 per session; the target folder must already exist and cannot be the library or the app's own folders; no overwrite by default ( (2) appended); sharpness is a relative ranking inside the batch — glance at the thumbnails before you ship
facenest_semantic_search or facenest_query_photos → facenest_pick_best_photos {scope:{kind:"image_ids", image_ids:[…]}, mode:"sharpness", aspect:"16:9", top:8} → facenest_make_contact_sheet {image_ids} → facenest_copy_photos {target_dir, rename_pattern}
③ Turn 10 picks from a trip album into a shareable album
You: "From the 'Okinawa 2025' album, pick the 10 best smiles and build a smart album called 'Okinawa picks'."
The assistant: reads the album → measures each face's smile → takes the top 10 → creates the album from those 10 ids
You get: a 10-photo album you can see right in the app, ready to share or export
Limits: faces under 64 px are not scored (smile:null); the album stores the fixed ids — later changes to the source album do not follow automatically
facenest_list_albums → facenest_pick_best_photos {scope:{kind:"album", album_id:…}, mode:"smile", top:10} → facenest_create_smart_album {name:"Okinawa picks", rules:[{type:"photos", op:"in", ids:[…]}]}
④ Collect single-person reference shots for AI video / ComfyUI
You: "In People, find A-Ming's front-facing solo photos, pick the 5 sharpest, copy them to
D:\ComfyUI\input\refs."
The assistant: finds the person → takes his photos → ranks exactly those ids by sharpness → previews for confirmation → copies them over
You get: a refs folder of originals (not compressed previews), ready to feed a workflow
Limits: sharpness mode does not accept a whole person as the scope — you must take ids first, which is deliberate: no scanning tens of thousands; originals are read and written locally, never uploaded
facenest_list_people → facenest_person_photos → facenest_pick_best_photos {scope:{kind:"image_ids", image_ids:[…]}, mode:"sharpness", top:5} → facenest_make_contact_sheet → facenest_copy_photos {target_dir:"D:\\ComfyUI\\input\\refs"}
⑤ Split an AI-generated folder into "with people" and "everything else"
You: "Split the AI-generated images in this folder into two albums: ones with a person, ones with none."
The assistant: builds two rules on face count: person_count ≥ 1 and person_count = 0
You get: two smart albums; new files in that folder land in the right album automatically (provided the folder is watched by auto-import)
Why this way: origin only has photo / video_frame — there is no "AI" value; AI output usually has no EXIF (shot_at is null), but taken_at falls back to the file time, so date rules still work. Classification goes by "is there a face", not by guessing the source
Two facenest_query_photos calls: first {rules:[{type:"person_count",op:"gte",n:1}]} → facenest_create_smart_album {name:"With people", rules:[…]}; second {rules:[{type:"person_count",op:"eq",n:0}]} → facenest_create_smart_album {name:"The rest", rules:[…]}
Want more?
docs/TESTING.mdholds 73 numbered requests (with the expected tool chain and the failure signals to judge); these showcase demos, with their prompts, chains and limits, are indocs/DEMOS.md. Chinese mirrors: TESTING.zh-CN.md · DEMOS.zh-CN.md.
How this differs from "let the AI look at the pictures"
Feeding the assistant screenshots | This adapter | |
Input | A few pictures you paste by hand | Existing metadata of the whole library |
Locating | "looks like a beach" |
|
Cost | Vision tokens per picture | Text cards: cheap and repeatable |
Combining conditions | The model has to judge on its own | A closed rule grammar (date / place / person / face count / camera / lens / tag / caption) |
Delivery | You screenshot and save elsewhere | Build albums, copy originals, collect video frames |
Privacy | Uploaded to a model vendor | Only |
The 28 tools
Every parameter, the required ones, and the per-tool quotas are in docs/TOOLS.md — a generated page (built from the tool schema, kept word-for-word with the code; a stale page fails the suite). The table below is the human-speed view by group.
Only going to use one line? Remember this one: ask facenest_ping first. It returns ok / api_version / images / write_allowed, and its failure paths are the clearest in the project.
Group | Count | What it does |
Connection | 1 | Reachability, API version, write permission |
Finding | 5 | Tag / caption / file name, natural language, one material card, read-only rule query |
People | 4 | Who is in the library, one person's photos, similar faces, find photos that look like a picture |
Albums | 6 | List, read contents, create / update / delete definitions |
Places | 2 | Country → state → city (photos with GPS only) |
Video | 6 | Who appears at what second, frame timeline, best frames, collect frames |
Picking & delivery | 3 | Top-N by smile/sharpness, numbered preview wall, copy originals |
Tidying | 1 | Duplicate / burst groups (deletes nothing) |
Tool | Permission | Group | Description |
| read | Connection | Reachability, API version, photo count, whether writes are allowed |
| read | Finding | Search by tag / caption text / file name (no date, no place) |
| read | Finding | Runs the smart-album rule set once, read-only, nothing saved |
| read | Finding | Natural-language search ("a dog on a beach"), spends semantic queries |
| read | Finding | One photo's card: captions, tags, people, EXIF, every date field |
| read | Finding | Tags that really exist in the library, with counts (auto tags are often Chinese) |
| read | People | Image-to-image: |
| read | People | People in the library and their photo counts |
| read | People | One person's photos (an id list you can feed to the pickers) |
| read | People | Similar faces; the reference can be a face in the library or a local image (HEIC included) |
| read | Albums | Normal albums (incl. collected video frames) with counts, offset paging |
| read | Albums | Smart albums and their current counts |
| read | Albums | Photos inside one smart album |
| write | Albums | Create an album from rules (max 30 rules) |
| write | Albums | Change an album in place (name/rules/sort/group), |
| write | Albums | Delete an album definition (photos untouched; ≤20/session; returns a rebuild snapshot) |
| read | Places | Country → state → city tree with counts |
| read | Places | Photos of one place node |
| read | Video | Videos and how many frame faces are indexed |
| read | Video | Which videos a person appears in, at what second |
| read | Video | A video's frame timeline (timestamps + faces), writes nothing |
| read | Video | Best N frames by mode (portrait / largest face / sharpest; smiling first), plus the other modes as alternatives |
| write | Video | Collect one frame (≤40/session; an out-of-range timestamp is an error; prefer the batch tool) |
| write | Video | Collect ≤10 frames in one call (40 frames per session, counted per frame) |
| read | Picking | Top-N by smile or sharpness (album / folder / person / favorites / tag / date / smart album / ids; resumable) |
| read | Picking | Numbered thumbnail wall of 1–60 photos (URL valid 1 hour), so the user can answer "keep #2 and #5" |
| write | Picking | Copy original bytes into a folder the user names (≤200/call, ≤2000/session, no overwrite by default) |
| read | Tidying | Duplicate / burst groups with reclaimable bytes, deletes nothing |
Rules are structured JSON, not prose. The full closed value set (the ops of person / tag / date / place, source, date formats,
match_mode / sort / group_by) is in docs/AGENT_GUIDE.md §3; anything outside it comes back as ERR_SMART_*.
{"type":"tag","op":"has","name":"beach"}
{"type":"date","op":"between","from":"2025-06-01","to":"2025-08-31"}
{"type":"person","op":"is","cluster_id":12}
{"type":"place","op":"is","city":"Mong Kok"}
{"type":"person_count","op":"eq","n":0}
{"type":"photos","op":"in","ids":["7cd7…","88ab…"]}Full parameters, return shapes and quotas:
docs/TOOLS.md(generated from the tool schema) anddocs/AGENT_GUIDE.md§3–§4. The tool list is generated byfacenest-mcp --list-tools(scripts/_dump_tools.py→docs/_generated/_tools.txt), and a test guards it: drop a tool or an error code and the suite goes red.
Safety boundaries
127.0.0.1only — no telemetry, no cloud relay, no account.The adapter never opens your database or photo files. The only two file-touching operations run in the app: the
image_pathreference image (read once, not imported) andcopy_photos(copies original bytes).Flip the switch off in the app → every call fails with 403 immediately; reset the token → the next call 401.
Write tools are authorised separately and accept structured rules only; a caption is never passed through as a parameter.
Text extracted from images is labelled
untrusted_text, never treated as an instruction.Every call is written to the app's local audit log, visible in the app.
Connect a client
Any client that speaks stdio MCP works. Only two things matter: the command
python -m facenest_mcp and the argument --endpoint <absolute path>.
The four paste-ready blocks (Claude Desktop / Cursor / OpenCode / Codex CLI) are in docs/QUICKSTART.md — config examples are maintained on that page only, so the same instructions do not live in two places.
On Windows, write JSON / TOML paths as
\\. Without--endpointthe adapter tries the usual locations;FACENEST_ENDPOINTworks too. System prompt for agents:facenest-mcp --agent-prompt(paste it into Cursor Rules / a Claude Project as well).
Troubleshooting
Symptom | Do this first |
| Endpoint file not found → re-open MCP in the app, or pass |
Exit code 3 | Nothing is listening on that port → the app is closed, or the switch is off |
Exit code 1 | Reached and refused → the token was reset, or the switch was turned off |
Everything else — the write switch, an assistant inventing ids, which reference the app uses when several are given at once, the port changing after an app restart, a search that comes back empty — is in docs/TROUBLESHOOTING.md. Troubleshooting detail is maintained on that page only, not here.
Every error reads the same way: ERR_XXX (HTTP n): meaning / Do next: … / Retry: YES|NO.
All 36 error codes in full, with the "what to do / retry" column: docs/AGENT_GUIDE.md §5.
For AI agents and integrators
If you are writing an agent or an integration layer, skip the README and read this: docs/AGENT_GUIDE.md — return fields, the closed rule-value table, the error codes (what to do / whether to retry), and a copy-paste system prompt. For the shape of the whole thing (client ↔ adapter ↔ app), where each number's single source lives, and which page owns which fact: docs/ARCHITECTURE.md.
Development
python -m unittest discover -s tests -v # unit tests: protocol / error text / doc gates, no app needed
python tests/e2e_stdio.py <mcp_endpoint.json> # end-to-end, against the sandbox fixtures
facenest-mcp --list-tools # prints the JSON schema of the 28 tools
facenest-mcp --call facenest_ping # call once without a clienttests/e2e_stdio.py assumes fixture data (image_id=m1, tag beach matching 1 photo). Running it against a real library
will disagree in expected ways — that does not mean the adapter is broken.
Doc gates: tests/test_docs.py checks that the README lists every tool, that AGENT_GUIDE covers every error code,
that both guides carry the system prompt verbatim, and that the tool and scenario counts quoted in the README equal the
real numbers in the code. Documentation drift is a failing test here, not a "we'll fix it later".
CI (GitHub Actions — continuous integration: every push runs this suite) is configured in .github/workflows/test.yml.
What is open source
✅ Open source (MIT) | This adapter: protocol implementation, tool wrappers, error contract, documentation |
❌ Not open source | The FaceNest app itself, its models, index and database formats |
📄 License | |
🚫 Not in this repo | App code, models, any user data or photos |
If this adapter saved you some time, a ⭐ helps more people on Claude / Cursor find it. It is also a signal for us: local-first + an auditable protocol is a road worth keeping.
Website · Download · Quick start · Docs · Architecture · Tool reference · Troubleshooting · Changelog · Issues · Contributing · Security
Available Tools
28 toolsfacenest_collect_video_frameA
WRITE. Saves the frame at timestamp_sec as a new photo. timestamp_sec must be within 0..duration_sec (from facenest_list_videos); an out-of-range value is rejected with ERR_MCP_TIMESTAMP_RANGE (the text includes the real duration) — it is never silently clamped. Checks run in this order: write permission (403 ERR_MCP_WRITE_OFF) -> timestamp range (400) -> session limit 40 (429 ERR_MCP_SESSION_LIMIT). Returns {ok, requested_sec, duration_sec, usage:'1/40', collected, deduplicated, image_ids}. The saved photo goes through the normal pipeline (dedup / quota / tagging) and shows up in People later.
Inputs: video_id (required), timestamp_sec (required).
facenest_collect_video_framesA
WRITE. Save up to 10 video frames in ONE call (40 frames per session, counted per frame). Pass frame_ids (from list/pick results — no re-encoding) or items:[{video_id, timestamp_sec}] for an exact moment. dry_run=true reports what would happen without writing. Returns {ok, dry_run, requested, collected, deduplicated, failed, limited, usage:'n/40', items:[{frame_id, video_id, timestamp_sec, ok, status:'collected|duplicate|failed|quota|would_collect', image_id, error}], image_ids, album_id, album_name, folder, tag_job_id}. One bad frame never aborts the batch; the free edition's 500-photo budget still applies.
Inputs: items, dry_run, frame_ids, album_name.
facenest_copy_photosA
Copy the ORIGINAL bytes of selected photos into a folder the user names — the step after picking photos for a deck/video project. Requires 'Allow writes'. The target must be an EXISTING absolute folder outside the FaceNest library and program directories (ask the user for it; do not guess or create folders). Up to 200 photos per call and 2,000 per session. Existing files are kept and a new name gets ' (2)' unless overwrite=true. rename_pattern is optional and uses {name} {ext} {id} {index} {date}; {ext} INCLUDES the leading dot ('.jpg'), so both '{name}{ext}' and '{name}.{ext}' work (example: '{index:02d}-{name}{ext}' -> '01-city.jpg'). A name with no image extension gets the original one appended. Default keeps the original name. Original files are copied byte-for-byte: HEIC stays HEIC, never the internal webp. Returns {ok, target_dir, requested, copied, failed, total_bytes, items:[{image_id, display_name, target_path, bytes, overwrote}], errors, usage}. A single failed file does not abort the rest — read errors.
Inputs: image_ids (required), target_dir (required), overwrite, rename_pattern.
facenest_create_smart_albumA
WRITE TOOL (needs 'Allow writes'). Max 30 rules — the same closed set as facenest_query_photos. {type:'person', op:'is'|'is_not', cluster_id:int} (unknown id -> ERR_SMART_PERSON_NOT_FOUND); {type:'tag', op:'has'|'not_has', name:str, source:'any'|'auto'|'manual'} — call facenest_list_tags first; matching ignores case; {type:'date', op:'between'|'on'|'before'|'after'|'this_year'|'this_month'|'last_days', from:'YYYY-MM-DD', to:'YYYY-MM-DD', days:1..3650, sources:['exif'|'ctime'|'mtime'|'upload'] (optional)}; {type:'place', op:'is'|'is_not', country/admin1/city} — is_not only counts photos that have GPS; {type:'photos', op:'in', ids:[…]} pins exact ids (max 2000; unknown ids -> ERR_SMART_PHOTOS_UNKNOWN); {type:'person_count', op:'eq'|'lte'|'gte', n:0..50} where 0 means no faces; {type:'favorite', op:'is'|'is_not'} for the user's favorites; {type:'camera'|'lens', op:'is', value:str} — camera accepts model, make+model or just the make, case-insensitive; lens matches by tokens (a shortened lens string works); {type:'origin', op:'is', value:'photo'|'video_frame'}; {type:'caption', op:'has'|'not_has', text:str, lang:'en'|'zh' (optional)}. Also match_mode 'all'|'any', sort 'taken_at'|'uploaded'|'name', sort_dir 'asc'|'desc', group_by 'none'|'year'|'month'|'place', cover_image_id. Returns {smart_id, name, photo_count, preview:[{image_id, display_name, thumb_url, thumb_url_abs, taken_at}] (first 8 photos), preview_count, app_url}; when photo_count is 0 it also returns rule_counts / zero_rules so you can see which rule emptied it. Album names are unique — a duplicate name is rejected with ERR_SMART_NAME_DUP.
Inputs: name (required), rules (required), sort, group_by, +4 more.
facenest_delete_smart_albumA
WRITE TOOL (needs 'Allow writes'), max 20 deletes per session. Deletes ONE smart album DEFINITION by smart_id — photos, tags, faces and files are never touched. Only smart_id is accepted (never a name: legacy duplicates would be ambiguous). Returns {ok, deleted:{smart_id, name, description, rules, match_mode, sort, sort_dir, group_by, cover_image_id}, usage:'1/20', note}. Keep the snapshot: passing it back to facenest_create_smart_album restores the album. Unknown id -> ERR_SMART_NOT_FOUND. Use this to discard an album you just created with wrong rules instead of renaming it (a rename keeps the name occupied and a new album with that name is rejected).
Inputs: smart_id (required).
facenest_find_duplicatesA
Find duplicate / look-alike photos. mode:'exact' (default) groups photos whose perceptual hash is IDENTICAL (zero false positives — this is what import-time dedup already blocks). mode:'similar' adds burst look-alikes: hash distance <= threshold (default 12), shot within time_window seconds (default 10), plus a 32x32 pixel check so different photos of the same scene are not grouped. Returns {groups:[{reason, count, members:[{image_id, file_size, source_path}]}], group_count, image_count, reclaimable_bytes}. READ-ONLY: nothing is deleted and no original file is touched — the user decides what to remove inside the app.
Inputs: mode, threshold, time_window, pixel_verify.
facenest_find_person_in_videosA
Which videos a person appears in, and at what second. Give ONE of: cluster_id (from facenest_list_people), face_id (a library face OR a video face returned by this tool / facenest_image_context.faces), or a still of the person. Optional video_id limits the search to one video. Returns {person:{cluster_id, reference_face, reference_source, video_id}, threshold, total_faces, max_similarity, below_threshold_count, order, match_state, total_matches, no_comparable_faces, matches_found, frames:[{video_id, video_name, frame_id, face_id, timestamp_sec, timecode, similarity, bbox, det_score, frame_path, frame_url}]}. face_id in a frame can be fed straight back as face_id (no need to save the frame first). Results use the same same-person-across-frames grouping as the video page. max_similarity is the best score even when it is below threshold; if matches_found is 0 and max_similarity > 0, say the best candidate is BELOW the user's threshold (ask to lower it) — never claim the person does not appear. Time accuracy = ± one frame interval (default 2 s).
Inputs: limit, order, face_id, video_id, +2 more.
facenest_find_similar_facesA
Find photos with a face similar to a reference. Three reference kinds (any ONE): image_id (a library photo; add face_id or face_index to pick one face), face_id (a face id from image_context.faces / a previous result — library OR video face), image_path (absolute path to an image on this machine; read locally, NOT uploaded, NOT added to the library; jpg/png/webp/bmp/heic/heif/avif, <=20 MB). Returns {query, reference:{face_id, face_id_source, strategy, ambiguous, candidates:[{face_id, index, bbox, area_ratio, det_score, cluster_id, person_name, thumb_url, thumb_url_abs}]}, threshold, count, returned, offset, has_more, total_at_least, matches:[{image_id, display_name, similarity, matched_face_id, thumb_url, thumb_url_abs, source_path, taken_at}], source:'face-embedding'}. matches[].thumb_url is the matched FACE crop, not the whole photo; use image_id / display_name when showing the photo itself. count is the returned page, not the total; page with offset. ambiguous:true means the reference contains 2+ real faces and none was chosen explicitly — ask the user which one, then pass face_id/face_index (or person when the face is named in People). Default threshold 0.40; scores are affected by face size and angle, so treat 0.40+ as a higher chance rather than proof. No face in the reference -> ERR_MCP_NO_FACE.
Inputs: limit, offset, person, face_id, +4 more.
facenest_image_contextA
Full card of one photo. Returns {image:{image_id, file_name, display_name, thumb_url, thumb_url_abs, source_path, taken_at, date_source, shot_at, file_mtime, file_ctime, uploaded_at, camera, camera_make, camera_model, lens, favorite, place}, captions:[{lang, source, text, kind:'untrusted_text'}], tags:[{name, name_en, source, confidence}], people:[name], faces:[{face_id, index, bbox, area_ratio, det_score, cluster_id, person_name, thumb_url, thumb_url_abs}]}. faces is ordered left to right: pass face_id (or face_index) to facenest_find_similar_faces / facenest_find_person_in_videos when the photo contains more than one person — never assume the largest face is the right one. taken_at is the date the app shows (EXIF first, else file time; date_source says which); shot_at is RAW EXIF only and may be null. data_warning carries the untrusted-caption warning; the whole response is valid JSON.
Inputs: image_id (required).
facenest_list_albumsA
Normal albums (the ones under Albums, including albums created by facenest_collect_video_frames). Returns {albums:[{album_id, name, desc, created_at, photo_count, kind:'normal'}], total, returned, offset}. total is the real album count; page with offset. This is NOT smart albums — use facenest_list_smart_albums for those. album_id / name feed facenest_pick_best_photos scope {kind:'album'}. With {album_id, photos:true} it returns {album_id, name, total, returned, offset, has_more, image_ids} — id-only pages (max 200/call) for enumerating a normal album.
Inputs: limit, offset, photos, album_id.
facenest_list_peopleA
People (face clusters). Returns {people:[{cluster_id, name, named, photo_count, face_count, cover_image_id, thumb_url, thumb_url_abs}], total, returned, offset}. Unnamed clusters are hidden unless include_unnamed=true. total is the real cluster count; use offset to page. cluster_id feeds facenest_person_photos and facenest_find_person_in_videos.
Inputs: limit, offset, include_unnamed.
facenest_list_placesA
Geographic tree of the library: country -> state/province -> city, with photo counts. Only photos carrying GPS data appear (usually phone photos with location on). Returns {total, countries:[{name, count, admins:[{name, count, cities:[{name, count}]}]}]}. Pass the names to facenest_photos_in_place to fetch the photos of a node.
Inputs: no named parameters.
facenest_list_smart_albumsA
Saved smart albums (rule sets, evaluated live). Returns {albums:[{smart_id, name, photo_count, match_mode, duplicate_name, same_name_ids}], max_rules:30}. New/renamed albums must have a unique name (a collision is rejected with ERR_SMART_NAME_DUP); legacy duplicates created before 2026-10-25 may still be listed — always address an album by smart_id. smart_id is NOT stable across sessions: albums can be deleted or re-created, so re-list every session and never reuse an id from an earlier turn. Smart albums never delete or move photos.
Inputs: no named parameters.
facenest_list_tagsA
Tags that actually exist in the library, with photo counts — call this before writing a tag rule. Auto tags are often Chinese in name and English in name_en (e.g. name:'狗', name_en:'Dog'); tag matching ignores case. Optional q filters both names, source picks any | auto | manual. Returns {tags:[{tag_id, name, name_en, source, count}], total}. Pass the exact name or name_en to a tag rule.
Inputs: q, limit, source.
facenest_list_video_framesA
Timeline of one video's extracted frames — browse before picking, with no writes. Use it when the user asks what is at a timecode, or when you need a face id from the video without saving a frame. Returns {video_id, name, duration_sec, interval_sec, total_frames, offset, limit, returned, frames:[{frame_id, frame_index, timestamp_sec, timecode, frame_path, frame_url, frame_url_abs, faces:[{face_id, index, bbox, area_ratio, det_score, cluster_id, person_name}]}]}. frame_id is the file name and is accepted by facenest_pick_best_video_frames / facenest_collect_video_frames. limit max 200; use offset to page.
Inputs: video_id (required), limit, offset, to_sec, +2 more.
facenest_list_videosB
Videos in the library and how many of their frames are face-indexed. Returns {videos:[{video_id, name, duration_sec, faces_indexed}], total}. Only frames indexed in FaceNest are searchable.
Inputs: limit.
facenest_make_contact_sheetA
Build a READ-ONLY HTML contact sheet (thumbnail wall) for 1–60 photos and Returns {url, count, expires_in, hint}. Send url in chat: the user sees every candidate at once, numbered #1…#N, and answers 'keep #2 and #5'. Then use those ids with facenest_copy_photos / facenest_create_smart_album. The URL is a short-lived (1 hour) unguessable token — no MCP token needed in the browser; do not post it publicly. Nothing is written, moved or created.
Inputs: image_ids (required), title.
facenest_person_photosA
Photos containing one person. Returns {cluster_id, name, total, images:[{image_id, display_name, thumb_url_abs, app_url, taken_at, …}], returned, offset, compact}. total is the real photo count (not the returned count); page with offset. compact:true returns only image_id/display_name/taken_at/thumb_url_abs/app_url/source_path. cluster_id comes from facenest_list_people; unknown id -> ERR_MCP_PERSON_NOT_FOUND.
Inputs: cluster_id (required), limit, offset, compact.
facenest_photos_in_placeA
Photos of one place node (exact match). Pass at least one of country / admin1 / city — names come from facenest_list_places (e.g. country:'Spain', admin1:'Catalonia', city:'Girona'). Returns {total, images:[{image_id, display_name, source_path, thumb_url, thumb_url_abs, taken_at, date_source, shot_at, width, height}]}. limit max 1000; use offset to page.
Inputs: city, limit, admin1, offset, +1 more.
facenest_pick_best_photosA
Pick the Top-N photos from ONE scope (read-only; nothing is written to the library). mode:'smile' (default) ranks faces by measured smile; mode:'sharpness' ranks whole-image sharpness and needs NO face — use it for landscape / food / architecture / PPT material. Smile mode: optional scope.person (cluster_id, exact person_name, or object {cluster_id|person_name|name}) intersects ANY scope with that person and measures only their face, e.g. an album ∩ one person. cluster_id wins if both are given (person_note says so); unknown keys inside person return 400. scope.kind: album / folder / person / favorites / tag / date / smart_album / image_ids; for semantic results, call facenest_semantic_search first and pass its ids as image_ids (the picker does not run the semantic model). Sharpness mode is measured exactly like the album UI's 'Sort by sharpness' (Laplacian variance, longest edge 800 px); it rejects scope.person and accepts aspect ('any'|'16:9'|'4:3'|'3:2'|'1:1'|'9:16'|'4:5', ±8% of width/height) to filter PPT-friendly framing before scoring. Sharpness is only a RELATIVE ranking within this batch and does NOT detect a photo that is rotated 90° in its pixels; photos without EXIF Orientation cannot be auto-uprighted. Before delivery, inspect the returned thumb_url_abs visually (or tell the user to). There is NO aesthetic mode — beauty is subjective and has no reliable local score. quality is accepted as an ALIAS for sharpness (it is the video picker's word); on photos it is exactly the same Laplacian metric, NOT a third algorithm. top 1..20; wait_sec 0..60 bounds one call; sharpness is capped at 1,200 photos per scope (smile at 3,000) and the reply's truncated/note says so. Returns {status:'done'|'partial', mode, best:[{image_id, display_name, smile|sharpness, smile_bucket?, face_id?, face_px?, thumb_url, thumb_url_abs, source_path, taken_at, width, height, aspect_ratio, source}], total, total_scope, measured_cap, truncated, scored, pending, cached, computed, empty_reason, job_id, eta_sec, note}. If status is 'partial', call again with the same job_id (and a larger wait_sec) to finish; the work is cached, so a second call over the same scope is a read (see cached). smile=null means 'not measurable' (face smaller than 64 px), not 'not smiling'. refresh=true ignores the cache and recomputes (sharpness cache too).
Inputs: scope (required), top, mode, aspect, +4 more.
facenest_pick_best_video_framesA
Pick the best N frames of a person in ONE call (read-only, no collection). Give ONE reference: cluster_id, face_id (library OR video face), image_id, image_path, frame_id, or frame_ids to rank an explicit set. Modes match the video page: preset='face' (portrait: frontality + sharpness), 'size' (largest face), 'quality' (sharpest whole frame). Use prefer_smiling=true only with preset='face' — wording guide: 'best smile' -> face+smile; 'best portrait' -> face; 'biggest face/close-up' -> size; 'sharpest/cleanest' -> quality; a vague 'best photos' -> face and SAY which mode you used. top comes from the user's number (1..12). Returns {status:'ok'|'needs_face_choice', reference:{face_id, face_id_source, strategy, ambiguous, candidates:[…]}, ranking:{preset, prefer_smiling, mode_label, order, weights, note}, best:[{rank, frame_id, face_id, video_id, video_name, timestamp_sec, timecode, similarity, score, smile, smile_bucket, face_px, face_ratio, bbox, det, marks, frame_path, frame_url, frame_url_abs}], alternatives:{size:[…], quality:[…]}, person_match:{max_similarity, threshold, below_threshold_count}, scored, candidates}. reference.verified is false when the face was picked geometrically (a video face has no cluster) — say so before asserting who it is. status='needs_face_choice' means the reference has 2+ real faces: show candidates to the user, then call again with select_face_id. Adjacent frames closer than min_gap_sec are never both picked. A 400 with ERR_BAD_ARGS lists the three modes when preset/prefer_smiling contradict each other.
Inputs: top, person, preset, explain, +15 more.
facenest_pingA
Call this FIRST in every session. Returns {ok, api_version, images, write_allowed, mcp_version, base_url}. base_url is the live origin (http://127.0.0.1:); photo results also carry ready-made thumb_url_abs links. If mcp_version is older than the app expects, restart the MCP process. ms on every JSON response is the adapter↔app round trip (RPC included), not pure compute. If ok is not true (or the call fails), stop and tell the user that FaceNest is not running or the MCP service is off — do not call other tools.
Inputs: no named parameters.
facenest_query_photosA
READ-ONLY rule query — the same rule engine as a smart album, but NOTHING is saved (no album is created, no 'Allow writes' needed). Use it for every filtered search: a date range, a place, camera/lens, origin, a person, how many people, a tag, caption text, or a pinned id set — and combine rules with match_mode 'all' (AND) / 'any' (OR). Rule shapes (exactly the set the album UI offers): {type:'album', op:'is'|'is_not', album_id:int}; {type:'folder', op:'is'|'is_not'|'under', value:str} (value is the LEAF folder name in original_folder, e.g. '171109', not an absolute/UNC path; under = prefix); {type:'person', op:'is'|'is_not', cluster_id:int} — an unknown cluster_id is rejected with ERR_SMART_PERSON_NOT_FOUND; {type:'tag', op:'has'|'not_has', name:str, source:'any'|'auto'|'manual'} — matching ignores case; call facenest_list_tags first to get real names (auto tags are often Chinese in name, e.g. 狗 / Dog); {type:'date', op:'between'|'on'|'before'|'after'|'this_year'|'this_month'|'last_days', from:'YYYY-MM-DD', to:'YYYY-MM-DD', days:1..3650, sources:['exif'|'ctime'|'mtime'|'upload'] (optional: restrict which date source counts); {type:'place', op:'is'|'is_not', country/admin1/city} — is_not only matches photos that DO have GPS (no location ≠ 'not in Girona'); {type:'photos', op:'in', ids:[…]} to keep a previous result set (e.g. semantic hits) — unknown ids are rejected with ERR_SMART_PHOTOS_UNKNOWN, never silently dropped; {type:'person_count', op:'eq'|'lte'|'gte', n:0..50} — eq/lte 0 means 'no faces at all'; {type:'favorite', op:'is'|'is_not'} — the user's favorite flag; {type:'camera'|'lens', op:'is', value:str} — camera accepts model alone ('iPhone 12 Pro'), make+model ('Apple iPhone 12 Pro') OR just the make ('Apple'), case-insensitive; lens matches by tokens, so 'OnePlus Ace 3' finds 'OnePlus Ace 3 back camera 2147483647mm f/1.8'; {type:'origin', op:'is', value:'photo'|'video_frame'}; {type:'caption', op:'has'|'not_has', text:str, lang:'en'|'zh' (optional)}. Date rules use taken_at (EXIF first, else file time — the date the Dates page shows); add sources:['exif'] when the user means 'actually shot in', not 'dated'. Returns {match_mode, rules, total, images:[{image_id, display_name, thumb_url, thumb_url_abs, taken_at, date_source, shot_at, file_mtime, camera, camera_make, camera_model, lens, …}], groups, group_by, limit, offset, rule_counts, zero_rules, prefix_counts, empty_at}. rule_counts (per-rule counts) and prefix_counts (running AND/OR count) are included automatically when total is 0 — empty_at is the rule index that first drove the intersection to zero, so read them instead of bisecting; pass explain:true to always get them. 1–30 rules; limit max 200; use offset to page; sort 'taken_at'|'uploaded'|'name'; group_by 'none'|'year'|'month'|'place'. Nothing is deleted, moved or created. Every image also has app_url (facenest://photo/<id>). compact:true returns only image_id/display_name/taken_at/thumb_url_abs/app_url/source_path.
Inputs: rules (required), sort, limit, offset, +5 more.
facenest_searchA
Search the library by tag / caption / file name. mode: 'all' (default) | 'tag' | 'text' (captions + file names). Returns {query, mode, count, images:[{image_id, file_name, display_name, thumb_url, thumb_url_abs, taken_at, date_source, shot_at, file_mtime, file_ctime, uploaded_at, camera, camera_make, camera_model, lens, favorite, source_path}]}. display_name is the original file name (use it in UI text); thumb_url is a local path, thumb_url_abs is the clickable URL — use the absolute one. lens is cleaned of absurd EXIF focal values (lens rules still match the raw string by tokens). image_id is the ONLY valid input for the other tools — never invent ids. limit max 200. Every image also has app_url (facenest://photo/<id>). compact:true returns only image_id/display_name/taken_at/thumb_url_abs/app_url/source_path (no file_name/camera/lens). This tool has no offset: when hits exceed 200, use facenest_query_photos (it pages). This tool has NO date/place/people filters: for those (or any combination) use facenest_query_photos, which is read-only and saves nothing. For tag vocabulary use facenest_list_tags (auto tags are often Chinese; matching ignores case). Dates: taken_at = the date the app shows (EXIF first, else file ctime/mtime, else upload); date_source = 'exif'|'ctime'|'mtime'|'upload'; shot_at = RAW EXIF only and may be null; file_mtime = the file's modified time.
Inputs: q (required), mode, limit, compact.
facenest_semantic_searchA
Semantic (natural-language) search: 'photos with a dog on a beach'. Needs the semantic model downloaded and consumes one free-tier query (Pro: unlimited). Returns {text, count, images:[{image_id, similarity, display_name, thumb_url_abs, app_url, taken_at, date_source, shot_at, file_mtime}], index_total, library_total, unindexed, coverage_note, rewritten, threshold_used, sensitivity, max_similarity, below_threshold_count, threshold_note}. If the model is cold, the reply is {warming:true, count:0, note, retry_after_sec} instead of blocking; tell the user and retry the same query after ~10–20 s. compact:true returns only image_id/display_name/taken_at/similarity/thumb_url_abs/app_url/source_path. Results are cut by the user's Settings → Search sensitivity (sensitivity). When count is 0 or below_threshold_count > 0, max_similarity is the best candidate's score: report that it is below the user's threshold and offer to raise the sensitivity — do NOT say the library has no such photo. unindexed > 0 means some photos have no semantic vector yet and CANNOT appear in these results — say so instead of concluding 'no such photo'. rewritten is only a bare-word→phrase fallback, not translation. For image-to-image use facenest_similar_photos. Semantic results are NOT a live album rule — to filter them by date/place/camera pass the returned ids to facenest_query_photos {type:'photos', op:'in', ids:[…]} (read-only); to keep them, pass the same ids to facenest_create_smart_album / facenest_update_smart_album.
Inputs: text (required), limit, compact.
facenest_similar_photosA
Image-to-image semantic search — 'find photos that look like this picture'. Reference is either image_id (a library photo) or image_path (absolute path to a local image; read in place, NOT uploaded, NOT added to the library; jpg/png/webp/bmp/heic/heif/avif, <=20 MB). Unlike facenest_find_similar_faces (faces only) this compares the WHOLE picture's meaning/style, so it works for cities, bridges, objects and scenes. Needs the semantic model and consumes one semantic query (Pro: unlimited). Returns {query, count, images:[{image_id, similarity, display_name, thumb_url, thumb_url_abs, file_name, taken_at, date_source, shot_at, file_mtime, lens}], index_total, library_total, unindexed, coverage_note, threshold_used}. display_name is the original file name (use it in UI text) and thumb_url_abs can be shown directly. unindexed > 0 means some photos cannot appear in these results yet. Pass the ids to facenest_query_photos {type:'photos', op:'in', ids:[…]} to filter them further, or to facenest_create_smart_album to keep them.
Inputs: limit, image_id, image_path.
facenest_smart_album_imagesA
Photos currently inside one smart album. Returns {smart_id, total, returned, offset, compact, images:[{image_id, display_name, thumb_url_abs, app_url, taken_at, …}]}. total is the real count; page with offset (limit max 200). compact:true returns only image_id/display_name/taken_at/thumb_url_abs/app_url/source_path. For a group >200 prefer facenest_query_photos with a person rule.
Inputs: smart_id (required), limit, offset, compact.
facenest_update_smart_albumA
WRITE TOOL (needs 'Allow writes'). Change an existing smart album IN PLACE: name, description, rules, match_mode, sort, sort_dir, group_by, cover_image_id. Only the fields you pass are changed; the smart_id stays the same. Rules use the same closed set as facenest_create_smart_album. Returns {smart_id, name, photo_count} (plus rule_counts/zero_rules when the result is empty). Album names are unique: renaming to an existing name is rejected with ERR_SMART_NAME_DUP (legacy duplicates may still exist; address albums by smart_id). Unknown id -> ERR_SMART_NOT_FOUND (call facenest_list_smart_albums for a fresh id).
Inputs: smart_id (required), name, sort, rules, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Most tools map to distinct resource+action pairs, and the descriptions actively disambiguate the risky pairs: facenest_search explicitly says to use facenest_query_photos for date/place/people filters, facenest_similar_photos is explicitly contrasted with facenest_find_similar_faces and facenest_semantic_search, and single vs batch video-frame collection (collect_video_frame vs collect_video_frames) is clear. The remaining overlap — three search entry points and place filtering available via both facenest_photos_in_place and a query_photos place rule — is well signposted, though a first-time agent must read long descriptions to choose correctly.
Nearly every tool uses the same facenest_ prefix with snake_case, and most follow verb_noun (list_people, create_smart_album, find_duplicates, copy_photos). Minor deviations exist: facenest_image_context and facenest_ping are noun-only, facenest_semantic_search reverses to noun_verb, and facenest_similar_photos is adjective_noun rather than find_similar_photos.
At 28 tools this is past the practical ceiling for a single MCP surface, and several clusters (search, query, semantic_search, similar_photos, find_similar_faces) add cognitive load. The breadth is genuinely driven by a full photo app (albums, smart albums, people, faces, video, places, duplicates, export), but the count still forces the agent to scan a large menu before acting.
Coverage is strong: discovery (ping/search/query/semantic/similar), rich browsing (image context, tags, people, places, video frames), full smart-album CRUD (list/create/update/delete/images), plus picks, dedupe, copy-out and contact sheets. Gaps are mostly deliberate safety choices (no photo or file deletion, no import/upload, no normal-album create/delete, no tag or people rename/write), which agents can work around by directing the user to the app.
Maintenance
Related MCP Connectors
Search photos and video moments by visual meaning, people, dates, and folders across local libraries, Apple Photos, and OneDrive. Manage collections, groups, favorites, people, and duplicate review. Synced metadata remains searchable while the desktop is offline; local and Apple Photos media access needs the owning device online with remote access enabled. OneDrive media can be accessed directly from the cloud. OAuth or Bearer API keys. Paid Cloud Access required; hosted visual search uses prepaid credits. Text-in-image search is semantic matching, not guaranteed exact OCR. Setup: https://organizewith.ai/en/guides/connect-ai-assistants
Read and search folders on your own computer with explicit consent. Files are never uploaded.
Search photos/videos; manage collections, people and duplicates. Requires paid OwAI Cloud Access.
Your personal library, readable by AI agents: durable snapshots, hybrid search, 46 MCP tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to browse and search local photo galleries without uploading photos, using metadata-only indexing and local thumbnail serving.44 PyPI8MIT
- AlicenseAqualityCmaintenanceEnables natural language search of local photo archives using AI-powered semantic understanding, with integration into Claude Desktop via the Model Context Protocol.42MIT
- AlicenseAqualityBmaintenanceA local, read-only MCP server that lets AI agents inspect and analyze photo libraries by scanning files, aggregating EXIF stats, finding duplicates, scoring blur, and generating cull reports without uploading any data.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to search, filter, and manage a private local photo library with CLIP-based text and similarity search, EXIF/GPS metadata, duplicate detection, albums, and folder indexing, returning ranked results and optional contact sheets.MIT