apple-files-mcp 1.0.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Apple MCP Contributors
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.
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: apple-files-mcp
3
+ Version: 1.0.0
4
+ Summary: Local Apple Files MCP server for macOS
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/JonathanRReed/Apple-MCPs
7
+ Project-URL: Repository, https://github.com/JonathanRReed/Apple-MCPs
8
+ Project-URL: Changelog, https://github.com/JonathanRReed/Apple-MCPs/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/JonathanRReed/Apple-MCPs/issues
10
+ Keywords: mcp,model-context-protocol,macos,apple,ai-agent,automation
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: MacOS X
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: apple-mcp-common<2,>=1.0.0
24
+ Requires-Dist: mcp<3,>=2.0.0
25
+ Requires-Dist: pydantic>=2.12.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest<10,>=8; extra == "dev"
28
+ Requires-Dist: ruff<1,>=0.12; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ <!-- mcp-name: io.github.jonathanrreed/apple-files-mcp -->
32
+
33
+ # Apple Files MCP
34
+
35
+ Local MCP server for file, Finder-adjacent, and iCloud Drive workflows on macOS.
36
+
37
+ ## Capabilities
38
+
39
+ - list allowed file roots
40
+ - inspect directory contents
41
+ - search files and folders by name
42
+ - read UTF-8 text files
43
+ - inspect file metadata
44
+ - list recent files
45
+ - open a path in the default app
46
+ - reveal a path in Finder
47
+ - read and write Finder tags
48
+ - list recent locations
49
+ - report local iCloud Drive availability
50
+ - create folders
51
+ - move or rename paths
52
+ - delete files or empty folders
53
+ - resources: `files://allowed-roots`, `files://recent`, `files://recent-locations`, `files://icloud-status`
54
+ - prompts: `files_prepare_attachment`, `files_organize_workspace`
55
+ - tool discovery helpers `search_tools` and `get_tool_info` for context-constrained clients
56
+
57
+ ## Install On This Mac
58
+
59
+ <details>
60
+ <summary>Quick start (uvx, from PyPI)</summary>
61
+
62
+ With [uv](https://docs.astral.sh/uv/getting-started/installation/) installed:
63
+
64
+ ```bash
65
+ uvx apple-files-mcp
66
+ ```
67
+
68
+ No clone, no venv management.
69
+
70
+ </details>
71
+
72
+ <details>
73
+ <summary>From a clone</summary>
74
+
75
+ ```bash
76
+ git clone https://github.com/JonathanRReed/Apple-MCPs.git
77
+ cd Apple-MCPs
78
+ uv sync --all-packages
79
+ ```
80
+
81
+ This builds one workspace environment with every server's entry point in `.venv/bin` (for example `.venv/bin/apple-files-mcp`). You can also point an MCP client at `AppleFiles-MCP/start.sh`, which prefers `uv run` and falls back to a plain venv bootstrap (Python 3.11+ required).
82
+
83
+ </details>
84
+
85
+ ## Install In AI Agents
86
+
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "apple-files": {
91
+ "command": "uvx",
92
+ "args": ["apple-files-mcp"],
93
+ "env": {
94
+ "APPLE_FILES_MCP_ALLOWED_ROOTS": "/Users/you/Desktop,/Users/you/Documents,/Users/you/Downloads,/Users/you/Library/Mobile Documents/com~apple~CloudDocs",
95
+ "APPLE_FILES_MCP_SAFETY_MODE": "safe_manage"
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ Running from a clone instead? Use `/path/to/Apple-MCPs/AppleFiles-MCP/start.sh` as the command with empty `args`.
103
+
104
+ Claude Code:
105
+
106
+ ```bash
107
+ claude mcp add --transport stdio --scope project apple-files -- uvx apple-files-mcp
108
+ ```
109
+
110
+ ## Transport
111
+
112
+ `stdio` is the default and recommended transport. Set `APPLE_FILES_MCP_TRANSPORT=streamable-http` (with optional `APPLE_FILES_MCP_HOST` and `APPLE_FILES_MCP_PORT`) to serve Streamable HTTP instead.
113
+
114
+ ## Prompting Notes
115
+
116
+ - `tools/list` returns the full Files tool surface. Context-constrained clients can use `search_tools` first, then `get_tool_info` for the Files tool they need.
117
+ - Use this server before Mail, Messages, Notes, or Shortcuts when the user references a local file or attachment.
118
+ - Use this server for Finder-style workflows, iCloud Drive paths, and file tagging, not raw shell fallbacks.
119
+ - Confirm the exact path before sending or attaching a file.
120
+ - Keep `APPLE_FILES_MCP_ALLOWED_ROOTS` narrow for safety.
121
+ - Include the local iCloud Drive root when you want the assistant to work with iCloud documents.
122
+ - Use `APPLE_FILES_MCP_SAFETY_MODE=safe_manage` for assistant workflows that need create and move, and `full_access` only for delete workflows.
123
+
124
+ ## Health And Recovery
125
+
126
+ - `files_health`
127
+ - `files_permission_guide`
128
+ - `files_list_allowed_roots`
129
+ - `files_get_icloud_status`
130
+ - `files_list_recent_locations`
131
+ - `files_get_tags`
132
+
133
+ ## Launch Checklist
134
+
135
+ - Add `uvx apple-files-mcp` (or a clone's `AppleFiles-MCP/start.sh`) to your MCP client
136
+ - Reload or reconnect the client so the Files tool surface is loaded into context
137
+ - Call `files_health` first
138
+ - If access looks wrong, call `files_permission_guide`
139
+ - Confirm `APPLE_FILES_MCP_ALLOWED_ROOTS` before any file mutation workflow
@@ -0,0 +1,109 @@
1
+ <!-- mcp-name: io.github.jonathanrreed/apple-files-mcp -->
2
+
3
+ # Apple Files MCP
4
+
5
+ Local MCP server for file, Finder-adjacent, and iCloud Drive workflows on macOS.
6
+
7
+ ## Capabilities
8
+
9
+ - list allowed file roots
10
+ - inspect directory contents
11
+ - search files and folders by name
12
+ - read UTF-8 text files
13
+ - inspect file metadata
14
+ - list recent files
15
+ - open a path in the default app
16
+ - reveal a path in Finder
17
+ - read and write Finder tags
18
+ - list recent locations
19
+ - report local iCloud Drive availability
20
+ - create folders
21
+ - move or rename paths
22
+ - delete files or empty folders
23
+ - resources: `files://allowed-roots`, `files://recent`, `files://recent-locations`, `files://icloud-status`
24
+ - prompts: `files_prepare_attachment`, `files_organize_workspace`
25
+ - tool discovery helpers `search_tools` and `get_tool_info` for context-constrained clients
26
+
27
+ ## Install On This Mac
28
+
29
+ <details>
30
+ <summary>Quick start (uvx, from PyPI)</summary>
31
+
32
+ With [uv](https://docs.astral.sh/uv/getting-started/installation/) installed:
33
+
34
+ ```bash
35
+ uvx apple-files-mcp
36
+ ```
37
+
38
+ No clone, no venv management.
39
+
40
+ </details>
41
+
42
+ <details>
43
+ <summary>From a clone</summary>
44
+
45
+ ```bash
46
+ git clone https://github.com/JonathanRReed/Apple-MCPs.git
47
+ cd Apple-MCPs
48
+ uv sync --all-packages
49
+ ```
50
+
51
+ This builds one workspace environment with every server's entry point in `.venv/bin` (for example `.venv/bin/apple-files-mcp`). You can also point an MCP client at `AppleFiles-MCP/start.sh`, which prefers `uv run` and falls back to a plain venv bootstrap (Python 3.11+ required).
52
+
53
+ </details>
54
+
55
+ ## Install In AI Agents
56
+
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "apple-files": {
61
+ "command": "uvx",
62
+ "args": ["apple-files-mcp"],
63
+ "env": {
64
+ "APPLE_FILES_MCP_ALLOWED_ROOTS": "/Users/you/Desktop,/Users/you/Documents,/Users/you/Downloads,/Users/you/Library/Mobile Documents/com~apple~CloudDocs",
65
+ "APPLE_FILES_MCP_SAFETY_MODE": "safe_manage"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ Running from a clone instead? Use `/path/to/Apple-MCPs/AppleFiles-MCP/start.sh` as the command with empty `args`.
73
+
74
+ Claude Code:
75
+
76
+ ```bash
77
+ claude mcp add --transport stdio --scope project apple-files -- uvx apple-files-mcp
78
+ ```
79
+
80
+ ## Transport
81
+
82
+ `stdio` is the default and recommended transport. Set `APPLE_FILES_MCP_TRANSPORT=streamable-http` (with optional `APPLE_FILES_MCP_HOST` and `APPLE_FILES_MCP_PORT`) to serve Streamable HTTP instead.
83
+
84
+ ## Prompting Notes
85
+
86
+ - `tools/list` returns the full Files tool surface. Context-constrained clients can use `search_tools` first, then `get_tool_info` for the Files tool they need.
87
+ - Use this server before Mail, Messages, Notes, or Shortcuts when the user references a local file or attachment.
88
+ - Use this server for Finder-style workflows, iCloud Drive paths, and file tagging, not raw shell fallbacks.
89
+ - Confirm the exact path before sending or attaching a file.
90
+ - Keep `APPLE_FILES_MCP_ALLOWED_ROOTS` narrow for safety.
91
+ - Include the local iCloud Drive root when you want the assistant to work with iCloud documents.
92
+ - Use `APPLE_FILES_MCP_SAFETY_MODE=safe_manage` for assistant workflows that need create and move, and `full_access` only for delete workflows.
93
+
94
+ ## Health And Recovery
95
+
96
+ - `files_health`
97
+ - `files_permission_guide`
98
+ - `files_list_allowed_roots`
99
+ - `files_get_icloud_status`
100
+ - `files_list_recent_locations`
101
+ - `files_get_tags`
102
+
103
+ ## Launch Checklist
104
+
105
+ - Add `uvx apple-files-mcp` (or a clone's `AppleFiles-MCP/start.sh`) to your MCP client
106
+ - Reload or reconnect the client so the Files tool surface is loaded into context
107
+ - Call `files_health` first
108
+ - If access looks wrong, call `files_permission_guide`
109
+ - Confirm `APPLE_FILES_MCP_ALLOWED_ROOTS` before any file mutation workflow
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "apple-files-mcp"
7
+ version = "1.0.0"
8
+ description = "Local Apple Files MCP server for macOS"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.11"
13
+ keywords = ["mcp", "model-context-protocol", "macos", "apple", "ai-agent", "automation"]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Environment :: MacOS X",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: MacOS",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ ]
25
+ dependencies = [
26
+ "apple-mcp-common>=1.0.0,<2",
27
+ "mcp>=2.0.0,<3",
28
+ "pydantic>=2.12.0",
29
+ ]
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/JonathanRReed/Apple-MCPs"
33
+ Repository = "https://github.com/JonathanRReed/Apple-MCPs"
34
+ Changelog = "https://github.com/JonathanRReed/Apple-MCPs/blob/main/CHANGELOG.md"
35
+ Issues = "https://github.com/JonathanRReed/Apple-MCPs/issues"
36
+
37
+ [project.scripts]
38
+ apple-files-mcp = "apple_files_mcp.tools:main"
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest>=8,<10",
43
+ "ruff>=0.12,<1",
44
+ ]
45
+
46
+ [tool.setuptools]
47
+ package-dir = {"" = "src"}
48
+
49
+ [tool.setuptools.packages.find]
50
+ where = ["src"]
51
+
52
+ [tool.pytest.ini_options]
53
+ pythonpath = ["src"]
54
+ testpaths = ["tests"]
55
+
56
+ [tool.uv.sources]
57
+ apple-mcp-common = { workspace = true }
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ """Apple Files MCP package."""
@@ -0,0 +1,62 @@
1
+ import os
2
+ from dataclasses import dataclass
3
+ from functools import lru_cache
4
+ from pathlib import Path
5
+
6
+
7
+ @dataclass(frozen=True)
8
+ class Settings:
9
+ server_name: str
10
+ version: str
11
+ safety_mode: str
12
+ allowed_roots: tuple[Path, ...]
13
+ transport: str
14
+ host: str
15
+ port: int
16
+ log_level: str
17
+
18
+
19
+ def _parse_int(value: str | None, default: int) -> int:
20
+ if value is None:
21
+ return default
22
+ try:
23
+ return int(value)
24
+ except ValueError:
25
+ return default
26
+
27
+
28
+ def _default_roots() -> tuple[Path, ...]:
29
+ home = Path.home()
30
+ candidates = (
31
+ home / "Desktop",
32
+ home / "Documents",
33
+ home / "Downloads",
34
+ home / "Library" / "Mobile Documents" / "com~apple~CloudDocs",
35
+ )
36
+ existing = [path for path in candidates if path.exists()]
37
+ return tuple(existing or [home / "Downloads"])
38
+
39
+
40
+ def _parse_roots(value: str | None) -> tuple[Path, ...]:
41
+ if not value:
42
+ return _default_roots()
43
+ roots = []
44
+ for raw in value.split(","):
45
+ path = Path(raw.strip()).expanduser()
46
+ if raw.strip():
47
+ roots.append(path)
48
+ return tuple(roots) or _default_roots()
49
+
50
+
51
+ @lru_cache(maxsize=1)
52
+ def load_settings() -> Settings:
53
+ return Settings(
54
+ server_name="Apple Files MCP",
55
+ version="0.1.0",
56
+ safety_mode=os.environ.get("APPLE_FILES_MCP_SAFETY_MODE", "safe_manage").strip().lower() or "safe_manage",
57
+ allowed_roots=_parse_roots(os.environ.get("APPLE_FILES_MCP_ALLOWED_ROOTS")),
58
+ transport=os.environ.get("APPLE_FILES_MCP_TRANSPORT", "stdio").strip().lower() or "stdio",
59
+ host=os.environ.get("APPLE_FILES_MCP_HOST", "127.0.0.1"),
60
+ port=_parse_int(os.environ.get("APPLE_FILES_MCP_PORT"), 8000),
61
+ log_level=os.environ.get("APPLE_FILES_MCP_LOG_LEVEL", "INFO").strip().upper() or "INFO",
62
+ )