apple-photos-mcp 2.1.3 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +17 -2
  2. package/build/index.js +29 -17
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -81,9 +81,24 @@ The Codex plugin runs the published `apple-photos-mcp` server through `npx` and
81
81
 
82
82
  ### Other Hosts (Hermes, Antigravity)
83
83
 
84
- Configuration for two more hosts is included — each registers the same `apple-photos` MCP server (`npx -y apple-photos-mcp`). As a Python-sidecar (osxphotos) server it also needs Full Disk Access; see [Requirements](#requirements).
84
+ Two more hosts can run the same `apple-photos` MCP server (`npx -y apple-photos-mcp`). As a Python-sidecar (osxphotos) server it also needs Full Disk Access; see [Requirements](#requirements).
85
85
 
86
- - **[Hermes Agent](https://hermes-agent.nousresearch.com/)** (NousResearch) — Hermes has no plugin/marketplace drop-in. Add the server with `hermes mcp add apple-photos --command npx --args -y apple-photos-mcp`, or merge [`.hermes-plugin/config.yaml`](https://github.com/sweetrb/apple-photos-mcp/blob/main/.hermes-plugin/config.yaml) into `~/.hermes/config.yaml`. Details: [`.hermes-plugin/README.md`](https://github.com/sweetrb/apple-photos-mcp/blob/main/.hermes-plugin/README.md).
86
+ - **[Hermes Agent](https://hermes-agent.nousresearch.com/)** (NousResearch) — Hermes has no plugin/marketplace drop-in, so there is nothing in this repo to install from. Register the server with the CLI:
87
+
88
+ ```bash
89
+ hermes mcp add apple-photos --command npx --args -y apple-photos-mcp
90
+ ```
91
+
92
+ Or add it to `~/.hermes/config.yaml` by hand:
93
+
94
+ ```yaml
95
+ mcp_servers:
96
+ apple-photos:
97
+ command: npx
98
+ args: ["-y", "apple-photos-mcp"]
99
+ ```
100
+
101
+ Restart your Hermes session afterward so the tools load.
87
102
  - **[Antigravity](https://antigravity.google/)** (Google) — add the server entry from [`.antigravity-plugin/mcp_config.json`](https://github.com/sweetrb/apple-photos-mcp/blob/main/.antigravity-plugin/mcp_config.json) to `~/.gemini/config/mcp_config.json` (or via Antigravity's MCP settings).
88
103
 
89
104
  ### Manual Installation
package/build/index.js CHANGED
@@ -3104,9 +3104,9 @@ var require_data = __commonJS({
3104
3104
  }
3105
3105
  });
3106
3106
 
3107
- // node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js
3107
+ // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
3108
3108
  var require_utils = __commonJS({
3109
- "node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js"(exports, module) {
3109
+ "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js"(exports, module) {
3110
3110
  "use strict";
3111
3111
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3112
3112
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3417,9 +3417,9 @@ var require_utils = __commonJS({
3417
3417
  }
3418
3418
  });
3419
3419
 
3420
- // node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js
3420
+ // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
3421
3421
  var require_schemes = __commonJS({
3422
- "node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3422
+ "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3423
3423
  "use strict";
3424
3424
  var { isUUID } = require_utils();
3425
3425
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -3627,9 +3627,9 @@ var require_schemes = __commonJS({
3627
3627
  }
3628
3628
  });
3629
3629
 
3630
- // node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js
3630
+ // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
3631
3631
  var require_fast_uri = __commonJS({
3632
- "node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js"(exports, module) {
3632
+ "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js"(exports, module) {
3633
3633
  "use strict";
3634
3634
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3635
3635
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -3770,6 +3770,7 @@ var require_fast_uri = __commonJS({
3770
3770
  return uriTokens.join("");
3771
3771
  }
3772
3772
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3773
+ var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3773
3774
  function getParseError(parsed, matches) {
3774
3775
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3775
3776
  return 'URI path must start with "/" when authority is present.';
@@ -3799,6 +3800,11 @@ var require_fast_uri = __commonJS({
3799
3800
  uri = "//" + uri;
3800
3801
  }
3801
3802
  }
3803
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
3804
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
3805
+ parsed.error = "URI authority must not contain a literal backslash.";
3806
+ malformedAuthorityOrPort = true;
3807
+ }
3802
3808
  const matches = uri.match(URI_PARSE);
3803
3809
  if (matches) {
3804
3810
  parsed.scheme = matches[1];
@@ -3842,7 +3848,7 @@ var require_fast_uri = __commonJS({
3842
3848
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3843
3849
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3844
3850
  try {
3845
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
3851
+ parsed.host = new URL("http://" + parsed.host).hostname;
3846
3852
  } catch (e) {
3847
3853
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3848
3854
  }
@@ -23510,17 +23516,20 @@ server.registerTool(
23510
23516
  },
23511
23517
  withErrorHandling(async ({ library, uuid: uuid2, dest, edited, live, raw, overwrite }, extra) => {
23512
23518
  const progressToken = extra?._meta?.progressToken;
23519
+ const inFlight = [];
23513
23520
  const onProgress = progressToken === void 0 ? void 0 : (p) => {
23514
- void extra.sendNotification({
23515
- method: "notifications/progress",
23516
- params: {
23517
- progressToken,
23518
- progress: p.done,
23519
- total: p.total,
23520
- message: p.current ? `Exporting ${p.current} (${p.done + 1}/${p.total})` : `Exported ${p.done}/${p.total}`
23521
- }
23522
- }).catch(() => {
23523
- });
23521
+ inFlight.push(
23522
+ extra.sendNotification({
23523
+ method: "notifications/progress",
23524
+ params: {
23525
+ progressToken,
23526
+ progress: p.done,
23527
+ total: p.total,
23528
+ message: p.current ? `Exporting ${p.current} (${p.done + 1}/${p.total})` : `Exported ${p.done}/${p.total}`
23529
+ }
23530
+ }).catch(() => {
23531
+ })
23532
+ );
23524
23533
  };
23525
23534
  const result = await manager.exportPhotos(uuid2, dest, {
23526
23535
  edited,
@@ -23530,6 +23539,9 @@ server.registerTool(
23530
23539
  library,
23531
23540
  onProgress
23532
23541
  });
23542
+ if (inFlight.length) {
23543
+ await Promise.all(inFlight);
23544
+ }
23533
23545
  const lines = [
23534
23546
  `Destination: ${result.destination}`,
23535
23547
  `Exported: ${result.exportedCount} file(s)`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-photos-mcp",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "MCP server for Apple Photos - query, search, export, and inspect the macOS Photos library via Claude and other AI assistants, plus opt-in album/metadata write tools (read-only by default)",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -87,7 +87,7 @@
87
87
  "test:coverage": "vitest run --coverage",
88
88
  "test:integration": "vitest run --config vitest.integration.config.ts",
89
89
  "test:all": "vitest run && vitest run --config vitest.integration.config.ts",
90
- "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin .agents/plugins codex .hermes-plugin .antigravity-plugin",
90
+ "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin .agents/plugins codex .antigravity-plugin",
91
91
  "preinstall": "node -e \"const fs=require('fs');const ua=process.env.npm_config_user_agent||'';if(fs.existsSync('.git')&&!ua.startsWith('pnpm')){console.error('\\nThis repo uses pnpm. npm/yarn resolve dependencies off-lockfile and the committed bundle will mismatch CI.\\n\\n corepack enable && pnpm install --frozen-lockfile\\n');process.exit(1)}\""
92
92
  }
93
93
  }