@mgcrea/mcp-apple-maps 1.31.0 → 1.35.0
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.
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as MAPS_SURFACE, N as BUILD_INFO, a as loadConfig, r as createServer } from "./server-
|
|
2
|
+
import { C as MAPS_SURFACE, N as BUILD_INFO, a as loadConfig, r as createServer } from "./server-DvEH0yB1.js";
|
|
3
3
|
import { runStdioServer } from "@mgcrea/mcp-apple-core";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
const LOG_PREFIX = "apple-maps-mcp";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppleAutomationError, AppleAutomationError as AppleMapsError, BuildInfo, CORE_DATA_EPOCH_OFFSET, Epoch, FileFacts, IndexUnavailableError, InterferenceWatch, Logger, ReadOnlyMode, SchemaDriftError, StoreFacts, SurfaceContext } from "@mgcrea/mcp-apple-core";
|
|
2
2
|
import { DatabaseSync } from "node:sqlite";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
4
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
5
5
|
//#region src/build-info.d.ts
|
|
6
6
|
declare const BUILD_INFO: BuildInfo;
|
|
7
7
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as fromStoreTime, C as MAPS_SURFACE, D as UndatableStoreError, E as SchemaDriftError, M as resolveEpoch, N as BUILD_INFO, O as APPLE_SECONDS, S as MAPS_BUNDLE_ID, T as PlaceNotFoundError, _ as defaultDirectory, a as loadConfig, b as AppleMapsError, c as introspect, d as InvalidMapsRefError, f as PLACE_REF_VERSION, g as encodePlaceRef, h as encodeCollectionRef, i as registerTools, j as renderInstant, k as CORE_DATA_EPOCH_OFFSET, l as openStore, m as decodePlaceRef, n as SERVER_VERSION, o as AppleMapsClient, p as decodeCollectionRef, r as createServer, s as MapsStore, t as SERVER_NAME, u as COLLECTION_REF_VERSION, v as defaultStorePath, w as MapsStoreUnavailableError, x as IndexUnavailableError, y as locateStore } from "./server-
|
|
1
|
+
import { A as fromStoreTime, C as MAPS_SURFACE, D as UndatableStoreError, E as SchemaDriftError, M as resolveEpoch, N as BUILD_INFO, O as APPLE_SECONDS, S as MAPS_BUNDLE_ID, T as PlaceNotFoundError, _ as defaultDirectory, a as loadConfig, b as AppleMapsError, c as introspect, d as InvalidMapsRefError, f as PLACE_REF_VERSION, g as encodePlaceRef, h as encodeCollectionRef, i as registerTools, j as renderInstant, k as CORE_DATA_EPOCH_OFFSET, l as openStore, m as decodePlaceRef, n as SERVER_VERSION, o as AppleMapsClient, p as decodeCollectionRef, r as createServer, s as MapsStore, t as SERVER_NAME, u as COLLECTION_REF_VERSION, v as defaultStorePath, w as MapsStoreUnavailableError, x as IndexUnavailableError, y as locateStore } from "./server-DvEH0yB1.js";
|
|
2
2
|
export { APPLE_SECONDS, AppleMapsClient, AppleMapsError, BUILD_INFO, COLLECTION_REF_VERSION, CORE_DATA_EPOCH_OFFSET, IndexUnavailableError, InvalidMapsRefError, MAPS_BUNDLE_ID, MAPS_SURFACE, MapsStore, MapsStoreUnavailableError, PLACE_REF_VERSION, PlaceNotFoundError, SERVER_NAME, SERVER_VERSION, SchemaDriftError, UndatableStoreError, createServer, decodeCollectionRef, decodePlaceRef, defaultDirectory, defaultStorePath, encodeCollectionRef, encodePlaceRef, fromStoreTime, introspect, loadConfig, locateStore, openStore, registerTools, renderInstant, resolveEpoch };
|
|
@@ -7,7 +7,7 @@ import { randomUUID } from "node:crypto";
|
|
|
7
7
|
import { DatabaseSync } from "node:sqlite";
|
|
8
8
|
import { promisify } from "node:util";
|
|
9
9
|
import { z } from "zod";
|
|
10
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
10
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
11
11
|
//#region src/build-info.ts
|
|
12
12
|
const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
|
|
13
13
|
name: "@mgcrea/mcp-apple-maps",
|
|
@@ -16,8 +16,8 @@ const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
|
|
|
16
16
|
const BUILD_INFO = {
|
|
17
17
|
name: pkg.name,
|
|
18
18
|
version: pkg.version,
|
|
19
|
-
gitCommit: "
|
|
20
|
-
gitCommitDate: "2026-10-
|
|
19
|
+
gitCommit: "c832367",
|
|
20
|
+
gitCommitDate: "2026-10-30T14:15:32+01:00"
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/client/dates.ts
|
|
@@ -2114,7 +2114,7 @@ const buildDiagnostics = async (client) => {
|
|
|
2114
2114
|
const registerDiagnosticsTools = (server, client) => {
|
|
2115
2115
|
server.registerTool("apple_maps_diagnostics", {
|
|
2116
2116
|
description: "Report whether Maps' store can be read, which columns were resolved for each entity, and what this server deliberately cannot do. Start here when a read returns nothing — this surface has no second lane, so a missing grant means no data at all rather than slower data.",
|
|
2117
|
-
inputSchema: {},
|
|
2117
|
+
inputSchema: z.object({}),
|
|
2118
2118
|
annotations: { readOnlyHint: true }
|
|
2119
2119
|
}, async () => wrap(() => buildDiagnostics(client)));
|
|
2120
2120
|
};
|
|
@@ -2161,7 +2161,7 @@ const registerAxWriteTools = (server, lane) => {
|
|
|
2161
2161
|
});
|
|
2162
2162
|
server.registerTool("apple_maps_save_place", {
|
|
2163
2163
|
description: "Save a place into Maps' Places library, by pressing Add on its card. This is NOT a favourite: the Pinned list is a different set, written by apple_maps_add_favorite. Maps performs the write itself, so it cannot produce a malformed record. SIDE EFFECTS: opens Maps, brings its window forward, and leaves the place in the user's Recents. Syncs to the user's other Apple devices. Needs Accessibility for Cupertino.",
|
|
2164
|
-
inputSchema: place,
|
|
2164
|
+
inputSchema: z.object(place),
|
|
2165
2165
|
annotations: {
|
|
2166
2166
|
readOnlyHint: false,
|
|
2167
2167
|
destructiveHint: false,
|
|
@@ -2189,10 +2189,10 @@ const registerAxWriteTools = (server, lane) => {
|
|
|
2189
2189
|
}));
|
|
2190
2190
|
server.registerTool("apple_maps_remove_saved_place", {
|
|
2191
2191
|
description: "Remove a place from Maps' Places library, through the card's overflow menu. This does NOT touch favourites — use apple_maps_remove_favorite for those. SIDE EFFECTS: opens Maps, brings its window forward, and leaves the place in the user's Recents. Syncs to the user's other Apple devices. Needs Accessibility for Cupertino, and an explicit confirm: the removal is not undoable from here.",
|
|
2192
|
-
inputSchema: {
|
|
2192
|
+
inputSchema: z.object({
|
|
2193
2193
|
...place,
|
|
2194
2194
|
confirm: confirmArg
|
|
2195
|
-
},
|
|
2195
|
+
}),
|
|
2196
2196
|
annotations: {
|
|
2197
2197
|
readOnlyHint: false,
|
|
2198
2198
|
destructiveHint: true,
|
|
@@ -2221,10 +2221,10 @@ const registerAxWriteTools = (server, lane) => {
|
|
|
2221
2221
|
}));
|
|
2222
2222
|
server.registerTool("apple_maps_add_place_to_guide", {
|
|
2223
2223
|
description: "File a place into one of Maps' Guides, through the card's Add to Guides picker. This is the write apple_maps_list_collections has no counterpart for. IT CANNOT CONFIRM ITSELF: Maps does not expose whether the place ended up in the guide, so the result says filed: \"unverified\" and it must not be reported as done. The guide must already exist; when the name does not match, the refusal lists every guide Maps offers, which is the authoritative list and can differ from what apple_maps_list_collections returns. SIDE EFFECTS: opens Maps, brings its window forward, and leaves the place in the user's Recents. Syncs to the user's other Apple devices. Needs Accessibility for Cupertino.",
|
|
2224
|
-
inputSchema: {
|
|
2224
|
+
inputSchema: z.object({
|
|
2225
2225
|
...place,
|
|
2226
2226
|
guide: z.string().min(1).describe("Name of the guide to file it into, as Maps shows it.")
|
|
2227
|
-
},
|
|
2227
|
+
}),
|
|
2228
2228
|
annotations: {
|
|
2229
2229
|
readOnlyHint: false,
|
|
2230
2230
|
destructiveHint: false,
|
|
@@ -2267,7 +2267,7 @@ const compactGuides = (guides) => guides.map((g) => g.places === null ? { name:
|
|
|
2267
2267
|
const registerPlaceTools = (server, client) => {
|
|
2268
2268
|
server.registerTool("apple_maps_list_favorites", {
|
|
2269
2269
|
description: "List the places saved as favourites in Maps, with coordinates, address and the label the user gave them. Needs Full Disk Access — Maps is not scriptable, so without the grant this returns an error rather than an empty list. Some entries have no linked place (`linked: false`); those are the unconfigured Home/Work/School slots, not broken rows. This is everything SAVED: Maps' own Pinned panel applies display rules that are not in the store and can show fewer.",
|
|
2270
|
-
inputSchema: { limit: limitArg },
|
|
2270
|
+
inputSchema: z.object({ limit: limitArg }),
|
|
2271
2271
|
annotations: {
|
|
2272
2272
|
readOnlyHint: true,
|
|
2273
2273
|
idempotentHint: true
|
|
@@ -2303,7 +2303,7 @@ const registerPlaceTools = (server, client) => {
|
|
|
2303
2303
|
}));
|
|
2304
2304
|
server.registerTool("apple_maps_list_collections", {
|
|
2305
2305
|
description: "List the collections (Guides) in Maps. Each carries Maps' own count of the places in it. Use apple_maps_list_collection_places to enumerate one. Needs Full Disk Access.",
|
|
2306
|
-
inputSchema: { limit: limitArg },
|
|
2306
|
+
inputSchema: z.object({ limit: limitArg }),
|
|
2307
2307
|
annotations: {
|
|
2308
2308
|
readOnlyHint: true,
|
|
2309
2309
|
idempotentHint: true
|
|
@@ -2321,10 +2321,10 @@ const registerPlaceTools = (server, client) => {
|
|
|
2321
2321
|
}));
|
|
2322
2322
|
server.registerTool("apple_maps_list_collection_places", {
|
|
2323
2323
|
description: "List the places filed in one collection, by its ref. Needs Full Disk Access. Returns nothing when this store does not expose collection membership — check apple_maps_diagnostics, which reports whether the key was resolved.",
|
|
2324
|
-
inputSchema: {
|
|
2324
|
+
inputSchema: z.object({
|
|
2325
2325
|
ref: collectionRefArg,
|
|
2326
2326
|
limit: limitArg
|
|
2327
|
-
},
|
|
2327
|
+
}),
|
|
2328
2328
|
annotations: {
|
|
2329
2329
|
readOnlyHint: true,
|
|
2330
2330
|
idempotentHint: true
|
|
@@ -2346,7 +2346,7 @@ const registerPlaceTools = (server, client) => {
|
|
|
2346
2346
|
}));
|
|
2347
2347
|
server.registerTool("apple_maps_list_unfiled_places", {
|
|
2348
2348
|
description: "List saved places that are in no collection. Maps files a saved place into a Guide through a join table, and a place can exist with no row there — 12 of 30 on the probed machine, 7 of which appear nowhere else in the store: not as a favourite, not in another Guide, not in recents. Those are reachable through no other tool. Needs Full Disk Access. Returns nothing when collection membership could not be resolved, which apple_maps_diagnostics reports.",
|
|
2349
|
-
inputSchema: { limit: limitArg },
|
|
2349
|
+
inputSchema: z.object({ limit: limitArg }),
|
|
2350
2350
|
annotations: {
|
|
2351
2351
|
readOnlyHint: true,
|
|
2352
2352
|
idempotentHint: true
|
|
@@ -2366,7 +2366,7 @@ const registerPlaceTools = (server, client) => {
|
|
|
2366
2366
|
}));
|
|
2367
2367
|
server.registerTool("apple_maps_list_recents", {
|
|
2368
2368
|
description: "List the places recently looked at in Maps, newest first. This is Maps' Recents list, not a search history: it holds places, directions and searches the user actually opened. Needs Full Disk Access.",
|
|
2369
|
-
inputSchema: { limit: limitArg },
|
|
2369
|
+
inputSchema: z.object({ limit: limitArg }),
|
|
2370
2370
|
annotations: {
|
|
2371
2371
|
readOnlyHint: true,
|
|
2372
2372
|
idempotentHint: true
|
|
@@ -2385,10 +2385,10 @@ const registerPlaceTools = (server, client) => {
|
|
|
2385
2385
|
}));
|
|
2386
2386
|
server.registerTool("apple_maps_search_places", {
|
|
2387
2387
|
description: "Search every saved place — favourites, collection entries and recents — by name, by the label the user gave it, or by address. Returns each match with the kind of entry it came from. Needs Full Disk Access. This searches what is SAVED on this Mac; it does not search Apple's map of the world.",
|
|
2388
|
-
inputSchema: {
|
|
2388
|
+
inputSchema: z.object({
|
|
2389
2389
|
query: queryArg,
|
|
2390
2390
|
limit: limitArg
|
|
2391
|
-
},
|
|
2391
|
+
}),
|
|
2392
2392
|
annotations: {
|
|
2393
2393
|
readOnlyHint: true,
|
|
2394
2394
|
idempotentHint: true
|
|
@@ -2407,7 +2407,7 @@ const registerPlaceTools = (server, client) => {
|
|
|
2407
2407
|
}));
|
|
2408
2408
|
server.registerTool("apple_maps_get_place", {
|
|
2409
2409
|
description: "Get one saved place by its ref, with coordinates, address and dates. Needs Full Disk Access.",
|
|
2410
|
-
inputSchema: { ref: placeRefArg },
|
|
2410
|
+
inputSchema: z.object({ ref: placeRefArg }),
|
|
2411
2411
|
annotations: {
|
|
2412
2412
|
readOnlyHint: true,
|
|
2413
2413
|
idempotentHint: true
|
|
@@ -2446,12 +2446,12 @@ const registerPlaceTools = (server, client) => {
|
|
|
2446
2446
|
const registerWriteTools = (server, client) => {
|
|
2447
2447
|
server.registerTool("apple_maps_add_favorite", {
|
|
2448
2448
|
description: "Save a place to Maps' favourites (the Pinned list). Give the place NAME as `query` — a bare coordinate does not identify a place to Maps — and latitude/longitude when known, which makes the match exact and skips the lookup. SIDE EFFECT: unless the place is already in the store, Maps is asked to resolve it and the place also appears in the user's Recents; there is no way to add a favourite without that. The favourite syncs to the user's other Apple devices through iCloud. Idempotent: asking twice for the same place returns the existing favourite rather than creating a second. Needs Full Disk Access.",
|
|
2449
|
-
inputSchema: {
|
|
2449
|
+
inputSchema: z.object({
|
|
2450
2450
|
query: z.string().min(1).describe("The place's name, as you would type it into Maps' search field."),
|
|
2451
2451
|
latitude: z.number().min(-90).max(90).optional().describe("Latitude, when known."),
|
|
2452
2452
|
longitude: z.number().min(-180).max(180).optional().describe("Longitude, when known."),
|
|
2453
2453
|
name: z.string().min(1).optional().describe("Label to save it under. Defaults to `query`.")
|
|
2454
|
-
},
|
|
2454
|
+
}),
|
|
2455
2455
|
annotations: {
|
|
2456
2456
|
readOnlyHint: false,
|
|
2457
2457
|
idempotentHint: true
|
|
@@ -2478,10 +2478,10 @@ const registerWriteTools = (server, client) => {
|
|
|
2478
2478
|
}));
|
|
2479
2479
|
server.registerTool("apple_maps_remove_favorite", {
|
|
2480
2480
|
description: "Remove a place from Maps' favourites, by a ref from apple_maps_list_favorites. This deletes the favourite on the user's other Apple devices too, through iCloud. It does not affect Guides, Recents, or anything else that references the same place. Needs Full Disk Access, and an explicit confirm: the deletion is not undoable from here.",
|
|
2481
|
-
inputSchema: {
|
|
2481
|
+
inputSchema: z.object({
|
|
2482
2482
|
ref: placeRefArg,
|
|
2483
2483
|
confirm: confirmArg
|
|
2484
|
-
},
|
|
2484
|
+
}),
|
|
2485
2485
|
annotations: {
|
|
2486
2486
|
readOnlyHint: false,
|
|
2487
2487
|
idempotentHint: true,
|
|
@@ -2563,4 +2563,4 @@ const createServer = (opts) => {
|
|
|
2563
2563
|
//#endregion
|
|
2564
2564
|
export { fromStoreTime as A, MAPS_SURFACE as C, UndatableStoreError as D, SchemaDriftError$1 as E, resolveEpoch as M, BUILD_INFO as N, APPLE_SECONDS as O, MAPS_BUNDLE_ID as S, PlaceNotFoundError as T, defaultDirectory as _, loadConfig as a, AppleMapsError as b, introspect as c, InvalidMapsRefError as d, PLACE_REF_VERSION as f, encodePlaceRef as g, encodeCollectionRef as h, registerTools as i, renderInstant as j, CORE_DATA_EPOCH_OFFSET as k, openStore as l, decodePlaceRef as m, SERVER_VERSION as n, AppleMapsClient as o, decodeCollectionRef as p, createServer as r, MapsStore as s, SERVER_NAME as t, COLLECTION_REF_VERSION as u, defaultStorePath as v, MapsStoreUnavailableError as w, IndexUnavailableError as x, locateStore as y };
|
|
2565
2565
|
|
|
2566
|
-
//# sourceMappingURL=server-
|
|
2566
|
+
//# sourceMappingURL=server-DvEH0yB1.js.map
|