@mgcrea/mcp-apple-maps 0.0.0-bootstrap

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Olivier Louvignes <olivier@mgcrea.io>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @mgcrea/mcp-apple-maps
2
+
3
+ MCP server for the macOS **Maps** app: the places you have saved.
4
+
5
+ ```json
6
+ {
7
+ "mcpServers": {
8
+ "apple-maps": { "command": "npx", "args": ["-y", "@mgcrea/mcp-apple-maps"] }
9
+ }
10
+ }
11
+ ```
12
+
13
+ ## What it reads
14
+
15
+ Favourites, collections (Guides) and recents, with names, addresses and **real coordinates**,
16
+ from Maps' Core Data store.
17
+
18
+ | Tool | What |
19
+ | ----------------------------------- | ------------------------------------------------------ |
20
+ | `apple_maps_list_favorites` | the places saved as favourites |
21
+ | `apple_maps_list_collections` | the Guides |
22
+ | `apple_maps_list_collection_places` | what is filed in one Guide |
23
+ | `apple_maps_list_recents` | where you have looked recently |
24
+ | `apple_maps_search_places` | all three at once, by name, label or address |
25
+ | `apple_maps_get_place` | one place, by ref |
26
+ | `apple_maps_diagnostics` | what opened, which columns resolved, what it cannot do |
27
+
28
+ ## What it does not do
29
+
30
+ It reads what is **saved on this Mac**. It does not search Apple's map of the world, geocode an
31
+ address, give directions or compute a travel time. Those are network calls to Apple's services,
32
+ not data on your disk.
33
+
34
+ It is also **read-only**, and that is a decision rather than a gap. The store is mirrored to iCloud
35
+ by `NSPersistentCloudKitContainer`, so writing means editing one replica of a synchronising object
36
+ graph underneath an app that is also editing it. That needs measuring before it needs shipping.
37
+
38
+ ## Full Disk Access is mandatory
39
+
40
+ Not an optimisation. Maps ships no scripting dictionary, so there is no Apple Events lane to fall
41
+ back to — without the grant this server returns an **error**, never an empty list. Grant it to the
42
+ app running the server, not to Maps.
43
+
44
+ If a listing comes back empty, that means you have saved nothing of that kind. Run
45
+ `apple_maps_diagnostics` to tell the two apart.
46
+
47
+ ## Configuration
48
+
49
+ | Variable | Default | What |
50
+ | --------------------------- | ---------- | ------------------------------------------------------ |
51
+ | `APPLE_MAPS_STORE` | discovered | explicit store path, for tests and forensic copies |
52
+ | `APPLE_MAPS_INDEX_MODE` | `auto` | `auto` / `ro` / `immutable` / `off` |
53
+ | `APPLE_MAPS_MAX_RESULTS` | 50 | default result ceiling |
54
+ | `APPLE_MAPS_EXPOSE_PROMPTS` | on | register the prompt and `cupertino://maps/*` resources |
55
+ | `APPLE_MAPS_DEBUG` | off | verbose logging on stderr |
56
+
57
+ `APPLE_MAPS_ALLOW_WRITES` is accepted and ignored: there is no mutating tool for it to gate.
58
+
59
+ See [docs/maps.md](../../docs/maps.md) for the phase-0 measurements, including the three separate
60
+ occasions on which this store was declared not to exist.
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/cli.js ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import { C as MAPS_SURFACE, N as BUILD_INFO, a as loadConfig, r as createServer } from "./server-DgIy0w0S.js";
3
+ import { runStdioServer } from "@mgcrea/mcp-apple-core";
4
+ //#region src/cli.ts
5
+ const LOG_PREFIX = "apple-maps-mcp";
6
+ runStdioServer({
7
+ build: BUILD_INFO,
8
+ surface: MAPS_SURFACE,
9
+ logPrefix: LOG_PREFIX,
10
+ start: async (logger) => {
11
+ const config = loadConfig();
12
+ const { server, client } = createServer({
13
+ config,
14
+ logger
15
+ });
16
+ const status = client.status();
17
+ const caps = status.capabilities;
18
+ const rows = (k) => caps?.entities?.[k]?.rows ?? 0;
19
+ return {
20
+ server,
21
+ banner: `read-only, store=${status.store.opened ? status.store.mode ?? "open" : "UNREADABLE"}, favorites=${rows("favorites")}, collections=${rows("collections")}, recents=${rows("history")}, index=${config.indexMode}`
22
+ };
23
+ }
24
+ }).catch((err) => {
25
+ console.error(`[${LOG_PREFIX}] fatal:`, err);
26
+ process.exit(1);
27
+ });
28
+ //#endregion
29
+ export {};
30
+
31
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runStdioServer } from \"@mgcrea/mcp-apple-core\";\n\nimport { BUILD_INFO } from \"./build-info.js\";\nimport { MAPS_SURFACE } from \"./client/errors.js\";\nimport { loadConfig } from \"./config.js\";\nimport { createServer } from \"./server.js\";\n\nconst LOG_PREFIX = \"apple-maps-mcp\";\n\nrunStdioServer({\n build: BUILD_INFO,\n surface: MAPS_SURFACE,\n logPrefix: LOG_PREFIX,\n start: async (logger) => {\n const config = loadConfig();\n const { server, client } = createServer({ config, logger });\n const status = client.status();\n const caps = status.capabilities as { entities?: Record<string, { rows?: number }> } | null;\n const rows = (k: string): number => caps?.entities?.[k]?.rows ?? 0;\n return {\n server,\n // No writes= line: this surface has no mutating tool, and printing a flag\n // that gates nothing would imply one exists. The counts are named because\n // \"store=open\" alone cannot distinguish a working server from one pointed\n // at an empty replica — which is exactly what the device-local cache is.\n banner:\n `read-only, ` +\n `store=${status.store.opened ? (status.store.mode ?? \"open\") : \"UNREADABLE\"}, ` +\n `favorites=${rows(\"favorites\")}, ` +\n `collections=${rows(\"collections\")}, ` +\n `recents=${rows(\"history\")}, ` +\n `index=${config.indexMode}`,\n };\n },\n}).catch((err: unknown) => {\n console.error(`[${LOG_PREFIX}] fatal:`, err);\n process.exit(1);\n});\n"],"mappings":";;;;AAQA,MAAM,aAAa;AAEnB,eAAe;CACb,OAAO;CACP,SAAS;CACT,WAAW;CACX,OAAO,OAAO,WAAW;EACvB,MAAM,SAAS,WAAW;EAC1B,MAAM,EAAE,QAAQ,WAAW,aAAa;GAAE;GAAQ;EAAO,CAAC;EAC1D,MAAM,SAAS,OAAO,OAAO;EAC7B,MAAM,OAAO,OAAO;EACpB,MAAM,QAAQ,MAAsB,MAAM,WAAW,EAAE,EAAE,QAAQ;EACjE,OAAO;GACL;GAKA,QACE,oBACS,OAAO,MAAM,SAAU,OAAO,MAAM,QAAQ,SAAU,aAAa,cAC/D,KAAK,WAAW,EAAE,gBAChB,KAAK,aAAa,EAAE,YACxB,KAAK,SAAS,EAAE,UAClB,OAAO;EACpB;CACF;AACF,CAAC,CAAC,CAAC,OAAO,QAAiB;CACzB,QAAQ,MAAM,IAAI,WAAW,WAAW,GAAG;CAC3C,QAAQ,KAAK,CAAC;AAChB,CAAC"}