@mweinbach/apple-docs-mcp 1.0.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.
Files changed (267) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +560 -0
  3. package/dist/constants/browser-headers.d.ts +48 -0
  4. package/dist/constants/browser-headers.d.ts.map +1 -0
  5. package/dist/constants/browser-headers.js +166 -0
  6. package/dist/constants/browser-headers.js.map +1 -0
  7. package/dist/index.d.ts +83 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +215 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/schemas/analyze-api.schema.d.ts +42 -0
  12. package/dist/schemas/analyze-api.schema.d.ts.map +1 -0
  13. package/dist/schemas/analyze-api.schema.js +23 -0
  14. package/dist/schemas/analyze-api.schema.js.map +1 -0
  15. package/dist/schemas/apple-docs.schema.d.ts +18 -0
  16. package/dist/schemas/apple-docs.schema.d.ts.map +1 -0
  17. package/dist/schemas/apple-docs.schema.js +10 -0
  18. package/dist/schemas/apple-docs.schema.js.map +1 -0
  19. package/dist/schemas/doc-content.schema.d.ts +24 -0
  20. package/dist/schemas/doc-content.schema.d.ts.map +1 -0
  21. package/dist/schemas/doc-content.schema.js +10 -0
  22. package/dist/schemas/doc-content.schema.js.map +1 -0
  23. package/dist/schemas/documentation-updates.schema.d.ts +27 -0
  24. package/dist/schemas/documentation-updates.schema.d.ts.map +1 -0
  25. package/dist/schemas/documentation-updates.schema.js +12 -0
  26. package/dist/schemas/documentation-updates.schema.js.map +1 -0
  27. package/dist/schemas/framework-symbols.schema.d.ts +24 -0
  28. package/dist/schemas/framework-symbols.schema.d.ts.map +1 -0
  29. package/dist/schemas/framework-symbols.schema.js +11 -0
  30. package/dist/schemas/framework-symbols.schema.js.map +1 -0
  31. package/dist/schemas/index.d.ts +15 -0
  32. package/dist/schemas/index.d.ts.map +1 -0
  33. package/dist/schemas/index.js +15 -0
  34. package/dist/schemas/index.js.map +1 -0
  35. package/dist/schemas/platform-compatibility.schema.d.ts +18 -0
  36. package/dist/schemas/platform-compatibility.schema.d.ts.map +1 -0
  37. package/dist/schemas/platform-compatibility.schema.js +8 -0
  38. package/dist/schemas/platform-compatibility.schema.js.map +1 -0
  39. package/dist/schemas/references.schema.d.ts +18 -0
  40. package/dist/schemas/references.schema.d.ts.map +1 -0
  41. package/dist/schemas/references.schema.js +9 -0
  42. package/dist/schemas/references.schema.js.map +1 -0
  43. package/dist/schemas/related-apis.schema.d.ts +21 -0
  44. package/dist/schemas/related-apis.schema.d.ts.map +1 -0
  45. package/dist/schemas/related-apis.schema.js +9 -0
  46. package/dist/schemas/related-apis.schema.js.map +1 -0
  47. package/dist/schemas/sample-code.schema.d.ts +21 -0
  48. package/dist/schemas/sample-code.schema.d.ts.map +1 -0
  49. package/dist/schemas/sample-code.schema.js +10 -0
  50. package/dist/schemas/sample-code.schema.js.map +1 -0
  51. package/dist/schemas/search.schema.d.ts +15 -0
  52. package/dist/schemas/search.schema.d.ts.map +1 -0
  53. package/dist/schemas/search.schema.js +8 -0
  54. package/dist/schemas/search.schema.js.map +1 -0
  55. package/dist/schemas/similar-apis.schema.d.ts +21 -0
  56. package/dist/schemas/similar-apis.schema.d.ts.map +1 -0
  57. package/dist/schemas/similar-apis.schema.js +9 -0
  58. package/dist/schemas/similar-apis.schema.js.map +1 -0
  59. package/dist/schemas/technologies.schema.d.ts +21 -0
  60. package/dist/schemas/technologies.schema.d.ts.map +1 -0
  61. package/dist/schemas/technologies.schema.js +10 -0
  62. package/dist/schemas/technologies.schema.js.map +1 -0
  63. package/dist/schemas/technology-overviews.schema.d.ts +24 -0
  64. package/dist/schemas/technology-overviews.schema.d.ts.map +1 -0
  65. package/dist/schemas/technology-overviews.schema.js +11 -0
  66. package/dist/schemas/technology-overviews.schema.js.map +1 -0
  67. package/dist/schemas/wwdc.schemas.d.ts +208 -0
  68. package/dist/schemas/wwdc.schemas.d.ts.map +1 -0
  69. package/dist/schemas/wwdc.schemas.js +97 -0
  70. package/dist/schemas/wwdc.schemas.js.map +1 -0
  71. package/dist/tools/definitions.d.ts +10 -0
  72. package/dist/tools/definitions.d.ts.map +1 -0
  73. package/dist/tools/definitions.js +690 -0
  74. package/dist/tools/definitions.js.map +1 -0
  75. package/dist/tools/doc-fetcher.d.ts +19 -0
  76. package/dist/tools/doc-fetcher.d.ts.map +1 -0
  77. package/dist/tools/doc-fetcher.js +487 -0
  78. package/dist/tools/doc-fetcher.js.map +1 -0
  79. package/dist/tools/doc-formatter.d.ts +69 -0
  80. package/dist/tools/doc-formatter.d.ts.map +1 -0
  81. package/dist/tools/doc-formatter.js +208 -0
  82. package/dist/tools/doc-formatter.js.map +1 -0
  83. package/dist/tools/find-similar-apis.d.ts +5 -0
  84. package/dist/tools/find-similar-apis.d.ts.map +1 -0
  85. package/dist/tools/find-similar-apis.js +275 -0
  86. package/dist/tools/find-similar-apis.js.map +1 -0
  87. package/dist/tools/get-documentation-updates.d.ts +5 -0
  88. package/dist/tools/get-documentation-updates.d.ts.map +1 -0
  89. package/dist/tools/get-documentation-updates.js +244 -0
  90. package/dist/tools/get-documentation-updates.js.map +1 -0
  91. package/dist/tools/get-platform-compatibility.d.ts +5 -0
  92. package/dist/tools/get-platform-compatibility.d.ts.map +1 -0
  93. package/dist/tools/get-platform-compatibility.js +205 -0
  94. package/dist/tools/get-platform-compatibility.js.map +1 -0
  95. package/dist/tools/get-related-apis.d.ts +5 -0
  96. package/dist/tools/get-related-apis.d.ts.map +1 -0
  97. package/dist/tools/get-related-apis.js +155 -0
  98. package/dist/tools/get-related-apis.js.map +1 -0
  99. package/dist/tools/get-sample-code.d.ts +5 -0
  100. package/dist/tools/get-sample-code.d.ts.map +1 -0
  101. package/dist/tools/get-sample-code.js +375 -0
  102. package/dist/tools/get-sample-code.js.map +1 -0
  103. package/dist/tools/get-technology-overviews.d.ts +5 -0
  104. package/dist/tools/get-technology-overviews.d.ts.map +1 -0
  105. package/dist/tools/get-technology-overviews.js +306 -0
  106. package/dist/tools/get-technology-overviews.js.map +1 -0
  107. package/dist/tools/handlers.d.ts +29 -0
  108. package/dist/tools/handlers.d.ts.map +1 -0
  109. package/dist/tools/handlers.js +350 -0
  110. package/dist/tools/handlers.js.map +1 -0
  111. package/dist/tools/list-technologies.d.ts +5 -0
  112. package/dist/tools/list-technologies.d.ts.map +1 -0
  113. package/dist/tools/list-technologies.js +165 -0
  114. package/dist/tools/list-technologies.js.map +1 -0
  115. package/dist/tools/resolve-references-batch.d.ts +5 -0
  116. package/dist/tools/resolve-references-batch.d.ts.map +1 -0
  117. package/dist/tools/resolve-references-batch.js +199 -0
  118. package/dist/tools/resolve-references-batch.js.map +1 -0
  119. package/dist/tools/search-framework-symbols.d.ts +7 -0
  120. package/dist/tools/search-framework-symbols.d.ts.map +1 -0
  121. package/dist/tools/search-framework-symbols.js +235 -0
  122. package/dist/tools/search-framework-symbols.js.map +1 -0
  123. package/dist/tools/search-parser.d.ts +15 -0
  124. package/dist/tools/search-parser.d.ts.map +1 -0
  125. package/dist/tools/search-parser.js +188 -0
  126. package/dist/tools/search-parser.js.map +1 -0
  127. package/dist/tools/search-result-parser.d.ts +52 -0
  128. package/dist/tools/search-result-parser.d.ts.map +1 -0
  129. package/dist/tools/search-result-parser.js +137 -0
  130. package/dist/tools/search-result-parser.js.map +1 -0
  131. package/dist/tools/tools-guide.d.ts +124 -0
  132. package/dist/tools/tools-guide.d.ts.map +1 -0
  133. package/dist/tools/tools-guide.js +389 -0
  134. package/dist/tools/tools-guide.js.map +1 -0
  135. package/dist/tools/wwdc/content-extractor.d.ts +9 -0
  136. package/dist/tools/wwdc/content-extractor.d.ts.map +1 -0
  137. package/dist/tools/wwdc/content-extractor.js +520 -0
  138. package/dist/tools/wwdc/content-extractor.js.map +1 -0
  139. package/dist/tools/wwdc/topics-extractor.d.ts +32 -0
  140. package/dist/tools/wwdc/topics-extractor.d.ts.map +1 -0
  141. package/dist/tools/wwdc/topics-extractor.js +146 -0
  142. package/dist/tools/wwdc/topics-extractor.js.map +1 -0
  143. package/dist/tools/wwdc/video-list-extractor.d.ts +13 -0
  144. package/dist/tools/wwdc/video-list-extractor.d.ts.map +1 -0
  145. package/dist/tools/wwdc/video-list-extractor.js +238 -0
  146. package/dist/tools/wwdc/video-list-extractor.js.map +1 -0
  147. package/dist/tools/wwdc/wwdc-handlers.d.ts +32 -0
  148. package/dist/tools/wwdc/wwdc-handlers.d.ts.map +1 -0
  149. package/dist/tools/wwdc/wwdc-handlers.js +791 -0
  150. package/dist/tools/wwdc/wwdc-handlers.js.map +1 -0
  151. package/dist/types/apple-docs.d.ts +112 -0
  152. package/dist/types/apple-docs.d.ts.map +1 -0
  153. package/dist/types/apple-docs.js +5 -0
  154. package/dist/types/apple-docs.js.map +1 -0
  155. package/dist/types/cache.d.ts +28 -0
  156. package/dist/types/cache.d.ts.map +1 -0
  157. package/dist/types/cache.js +5 -0
  158. package/dist/types/cache.js.map +1 -0
  159. package/dist/types/content-sections.d.ts +37 -0
  160. package/dist/types/content-sections.d.ts.map +1 -0
  161. package/dist/types/content-sections.js +5 -0
  162. package/dist/types/content-sections.js.map +1 -0
  163. package/dist/types/error.d.ts +39 -0
  164. package/dist/types/error.d.ts.map +1 -0
  165. package/dist/types/error.js +21 -0
  166. package/dist/types/error.js.map +1 -0
  167. package/dist/types/headers.d.ts +95 -0
  168. package/dist/types/headers.d.ts.map +1 -0
  169. package/dist/types/headers.js +5 -0
  170. package/dist/types/headers.js.map +1 -0
  171. package/dist/types/http.d.ts +31 -0
  172. package/dist/types/http.d.ts.map +1 -0
  173. package/dist/types/http.js +5 -0
  174. package/dist/types/http.js.map +1 -0
  175. package/dist/types/index.d.ts +11 -0
  176. package/dist/types/index.d.ts.map +1 -0
  177. package/dist/types/index.js +12 -0
  178. package/dist/types/index.js.map +1 -0
  179. package/dist/types/search.d.ts +62 -0
  180. package/dist/types/search.d.ts.map +1 -0
  181. package/dist/types/search.js +5 -0
  182. package/dist/types/search.js.map +1 -0
  183. package/dist/types/sections.d.ts +64 -0
  184. package/dist/types/sections.d.ts.map +1 -0
  185. package/dist/types/sections.js +5 -0
  186. package/dist/types/sections.js.map +1 -0
  187. package/dist/types/tools/platform.d.ts +33 -0
  188. package/dist/types/tools/platform.d.ts.map +1 -0
  189. package/dist/types/tools/platform.js +5 -0
  190. package/dist/types/tools/platform.js.map +1 -0
  191. package/dist/types/tools/sample-code.d.ts +23 -0
  192. package/dist/types/tools/sample-code.d.ts.map +1 -0
  193. package/dist/types/tools/sample-code.js +5 -0
  194. package/dist/types/tools/sample-code.js.map +1 -0
  195. package/dist/types/tools/technology.d.ts +18 -0
  196. package/dist/types/tools/technology.d.ts.map +1 -0
  197. package/dist/types/tools/technology.js +5 -0
  198. package/dist/types/tools/technology.js.map +1 -0
  199. package/dist/types/tools/updates.d.ts +23 -0
  200. package/dist/types/tools/updates.d.ts.map +1 -0
  201. package/dist/types/tools/updates.js +5 -0
  202. package/dist/types/tools/updates.js.map +1 -0
  203. package/dist/types/wwdc.d.ts +200 -0
  204. package/dist/types/wwdc.d.ts.map +1 -0
  205. package/dist/types/wwdc.js +5 -0
  206. package/dist/types/wwdc.js.map +1 -0
  207. package/dist/utils/cache-warmer.d.ts +22 -0
  208. package/dist/utils/cache-warmer.d.ts.map +1 -0
  209. package/dist/utils/cache-warmer.js +115 -0
  210. package/dist/utils/cache-warmer.js.map +1 -0
  211. package/dist/utils/cache.d.ts +109 -0
  212. package/dist/utils/cache.d.ts.map +1 -0
  213. package/dist/utils/cache.js +302 -0
  214. package/dist/utils/cache.js.map +1 -0
  215. package/dist/utils/constants.d.ts +178 -0
  216. package/dist/utils/constants.d.ts.map +1 -0
  217. package/dist/utils/constants.js +266 -0
  218. package/dist/utils/constants.js.map +1 -0
  219. package/dist/utils/error-handler.d.ts +80 -0
  220. package/dist/utils/error-handler.d.ts.map +1 -0
  221. package/dist/utils/error-handler.js +437 -0
  222. package/dist/utils/error-handler.js.map +1 -0
  223. package/dist/utils/framework-mapper.d.ts +84 -0
  224. package/dist/utils/framework-mapper.d.ts.map +1 -0
  225. package/dist/utils/framework-mapper.js +534 -0
  226. package/dist/utils/framework-mapper.js.map +1 -0
  227. package/dist/utils/http-client.d.ts +130 -0
  228. package/dist/utils/http-client.d.ts.map +1 -0
  229. package/dist/utils/http-client.js +464 -0
  230. package/dist/utils/http-client.js.map +1 -0
  231. package/dist/utils/http-headers-generator.d.ts +151 -0
  232. package/dist/utils/http-headers-generator.d.ts.map +1 -0
  233. package/dist/utils/http-headers-generator.js +407 -0
  234. package/dist/utils/http-headers-generator.js.map +1 -0
  235. package/dist/utils/logger.d.ts +44 -0
  236. package/dist/utils/logger.d.ts.map +1 -0
  237. package/dist/utils/logger.js +73 -0
  238. package/dist/utils/logger.js.map +1 -0
  239. package/dist/utils/preloader.d.ts +20 -0
  240. package/dist/utils/preloader.d.ts.map +1 -0
  241. package/dist/utils/preloader.js +82 -0
  242. package/dist/utils/preloader.js.map +1 -0
  243. package/dist/utils/rate-limiter.d.ts +28 -0
  244. package/dist/utils/rate-limiter.d.ts.map +1 -0
  245. package/dist/utils/rate-limiter.js +48 -0
  246. package/dist/utils/rate-limiter.js.map +1 -0
  247. package/dist/utils/topic-mapper.d.ts +18 -0
  248. package/dist/utils/topic-mapper.d.ts.map +1 -0
  249. package/dist/utils/topic-mapper.js +182 -0
  250. package/dist/utils/topic-mapper.js.map +1 -0
  251. package/dist/utils/url-converter.d.ts +22 -0
  252. package/dist/utils/url-converter.d.ts.map +1 -0
  253. package/dist/utils/url-converter.js +70 -0
  254. package/dist/utils/url-converter.js.map +1 -0
  255. package/dist/utils/user-agent-pool.d.ts +241 -0
  256. package/dist/utils/user-agent-pool.d.ts.map +1 -0
  257. package/dist/utils/user-agent-pool.js +557 -0
  258. package/dist/utils/user-agent-pool.js.map +1 -0
  259. package/dist/utils/wwdc-data-source-path.d.ts +9 -0
  260. package/dist/utils/wwdc-data-source-path.d.ts.map +1 -0
  261. package/dist/utils/wwdc-data-source-path.js +22 -0
  262. package/dist/utils/wwdc-data-source-path.js.map +1 -0
  263. package/dist/utils/wwdc-data-source.d.ts +36 -0
  264. package/dist/utils/wwdc-data-source.d.ts.map +1 -0
  265. package/dist/utils/wwdc-data-source.js +133 -0
  266. package/dist/utils/wwdc-data-source.js.map +1 -0
  267. package/package.json +83 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 kimsungwhee
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,560 @@
1
+ # Apple Docs MCP - Apple Developer Documentation Model Context Protocol Server
2
+
3
+ [![npm version](https://badge.fury.io/js/@mweinbach%2Fapple-docs-mcp.svg)](https://badge.fury.io/js/@mweinbach%2Fapple-docs-mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ > **Acknowledgement**: This is a fork of [@mweinbach/apple-docs-mcp](https://github.com/kimsungwhee/apple-docs-mcp). Full credit to [kimsungwhee](https://github.com/kimsungwhee) for the original implementation.
7
+
8
+ Apple Developer Documentation MCP Server - Access Apple's official developer docs, frameworks, APIs, SwiftUI, UIKit, and WWDC videos through Model Context Protocol. Search iOS, macOS, watchOS, tvOS, and visionOS documentation with AI-powered natural language queries. Get instant access to Swift/Objective-C code examples, API references, and technical guides directly in Claude, Cursor, or any MCP-compatible AI assistant.
9
+
10
+ **English** | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh-CN.md)
11
+
12
+ ## ✨ Features
13
+
14
+ - 🔍 **Smart Search**: Intelligent search across Apple Developer Documentation for SwiftUI, UIKit, Foundation, CoreData, ARKit, and more
15
+ - 📚 **Complete Documentation Access**: Full access to Apple's JSON API for Swift, Objective-C, and framework documentation
16
+ - 🔧 **Framework Index**: Browse hierarchical API structures for iOS, macOS, watchOS, tvOS, visionOS frameworks
17
+ - 📋 **Technology Catalog**: Explore Apple technologies including SwiftUI, UIKit, Metal, Core ML, Vision, and ARKit
18
+ - 📰 **Documentation Updates**: Track WWDC 2024/2025 announcements, iOS 26, macOS 26, and latest SDK releases
19
+ - 🎯 **Technology Overviews**: Comprehensive guides for Swift, SwiftUI, UIKit, and all Apple development platforms
20
+ - 💻 **Sample Code Library**: Swift and Objective-C code examples for iOS, macOS, and cross-platform development
21
+ - 🎥 **WWDC Video Library**: Search WWDC 2014-2025 sessions with transcripts, Swift/SwiftUI code examples, and resources
22
+ - 🔗 **Related APIs Discovery**: Find SwiftUI views, UIKit controllers, and framework-specific API relationships
23
+ - 📊 **Platform Compatibility**: iOS 13+, macOS 10.15+, watchOS 6+, tvOS 13+, visionOS compatibility analysis
24
+ - ⚡ **High Performance**: Optimized for Xcode, Swift Playgrounds, and AI-powered development environments
25
+ - 🔄 **Smart UserAgent Pool**: Intelligent UserAgent rotation system with automatic failure recovery and performance monitoring
26
+ - 🌐 **Multi-Platform**: Complete iOS, iPadOS, macOS, watchOS, tvOS, and visionOS documentation support
27
+ - 🏷️ **Beta & Status Tracking**: iOS 26 beta APIs, deprecated UIKit methods, new SwiftUI features tracking
28
+
29
+ ## 🚀 Quick Start
30
+
31
+ ### Claude Desktop (Recommended)
32
+
33
+ Add this to your Claude Desktop configuration:
34
+
35
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
36
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "apple-docs": {
42
+ "command": "npx",
43
+ "args": ["-y", "@mweinbach/apple-docs-mcp"]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ > **Note**: If you encounter issues with an old version being used, add `@latest` to force the latest version:
50
+ > ```json
51
+ > "args": ["-y", "@mweinbach/apple-docs-mcp@latest"]
52
+ > ```
53
+
54
+ Restart Claude Desktop and start asking about Apple APIs!
55
+
56
+ ## 📦 Installation
57
+
58
+ <details>
59
+ <summary><strong>📱 Claude Code</strong></summary>
60
+
61
+ ```bash
62
+ claude mcp add apple-docs -- npx -y @mweinbach/apple-docs-mcp@latest
63
+ ```
64
+
65
+ [📖 Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp)
66
+
67
+ </details>
68
+
69
+ <details>
70
+ <summary><strong>🖱️ Cursor</strong></summary>
71
+
72
+ **Via Settings**: Settings → Cursor Settings → MCP → Add new global MCP server
73
+
74
+ **Via Config File**: Add to `~/.cursor/mcp.json`:
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "apple-docs": {
80
+ "command": "npx",
81
+ "args": ["-y", "@mweinbach/apple-docs-mcp"]
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ [📖 Cursor MCP docs](https://docs.cursor.com/context/mcp)
88
+
89
+ </details>
90
+
91
+ <details>
92
+ <summary><strong>🔷 VS Code</strong></summary>
93
+
94
+ Add to your VS Code MCP config:
95
+
96
+ ```json
97
+ {
98
+ "mcp": {
99
+ "servers": {
100
+ "apple-docs": {
101
+ "type": "stdio",
102
+ "command": "npx",
103
+ "args": ["-y", "@mweinbach/apple-docs-mcp"]
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ [📖 VS Code MCP docs](https://code.visualstudio.com/docs/editor/mcp)
111
+
112
+ </details>
113
+
114
+ <details>
115
+ <summary><strong>🌊 Windsurf</strong></summary>
116
+
117
+ Add to your Windsurf MCP config:
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "apple-docs": {
123
+ "command": "npx",
124
+ "args": ["-y", "@mweinbach/apple-docs-mcp"]
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ [📖 Windsurf MCP docs](https://docs.codeium.com/windsurf/mcp)
131
+
132
+ </details>
133
+
134
+ <details>
135
+ <summary><strong>⚡ Zed</strong></summary>
136
+
137
+ Add to your Zed `settings.json`:
138
+
139
+ ```json
140
+ {
141
+ "context_servers": {
142
+ "Apple Docs": {
143
+ "command": {
144
+ "path": "npx",
145
+ "args": ["-y", "@mweinbach/apple-docs-mcp"]
146
+ },
147
+ "settings": {}
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
153
+ [📖 Zed Context Server docs](https://zed.dev/docs/context-servers)
154
+
155
+ </details>
156
+
157
+ <details>
158
+ <summary><strong>🔧 Cline</strong></summary>
159
+
160
+ **Via Marketplace**:
161
+ 1. Open Cline → Menu (☰) → MCP Servers → Marketplace
162
+ 2. Search "Apple Docs MCP" → Install
163
+
164
+ **Via Config**: Add to `cline_mcp_settings.json`:
165
+
166
+ ```json
167
+ {
168
+ "mcpServers": {
169
+ "apple-docs": {
170
+ "command": "npx",
171
+ "args": ["-y", "@mweinbach/apple-docs-mcp"],
172
+ "disabled": false,
173
+ "autoApprove": []
174
+ }
175
+ }
176
+ }
177
+ ```
178
+
179
+ </details>
180
+
181
+ <details>
182
+ <summary><strong> Amazon A Developer CLI</strong></summary>
183
+
184
+ **Via Config File**: Add to `~/.aws/amazonq/mcp.json`:
185
+
186
+ ```json
187
+ {
188
+ "mcpServers": {
189
+ "apple-docs": {
190
+ "command": "npx",
191
+ "args": ["-y", "@mweinbach/apple-docs-mcp"]
192
+ }
193
+ }
194
+ }
195
+ ```
196
+
197
+ [📖 Amazon A Developer CLI MCP docs](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html)
198
+
199
+ </details>
200
+
201
+ <details>
202
+ <summary><strong>🪟 Windows</strong></summary>
203
+
204
+ For Windows systems, use:
205
+
206
+ ```json
207
+ {
208
+ "mcpServers": {
209
+ "apple-docs": {
210
+ "command": "cmd",
211
+ "args": ["/c", "npx", "-y", "@mweinbach/apple-docs-mcp"],
212
+ "disabled": false,
213
+ "autoApprove": []
214
+ }
215
+ }
216
+ }
217
+ ```
218
+
219
+ </details>
220
+
221
+ <details>
222
+ <summary><strong>⚙️ Advanced Installation</strong></summary>
223
+
224
+ **Global Installation**:
225
+ ```bash
226
+ # Using pnpm (recommended)
227
+ pnpm add -g @mweinbach/apple-docs-mcp
228
+
229
+ # Using npm
230
+ npm install -g @mweinbach/apple-docs-mcp
231
+ ```
232
+
233
+ **Direct Usage**:
234
+ ```bash
235
+ npx @mweinbach/apple-docs-mcp --help
236
+ ```
237
+
238
+ **Development Setup**:
239
+ ```bash
240
+ git clone https://github.com/mweinbach/apple-docs-mcp.git
241
+ cd apple-docs-mcp
242
+
243
+ # Using pnpm (recommended)
244
+ pnpm install && pnpm run build
245
+
246
+ # Using npm
247
+ npm install && npm run build
248
+ ```
249
+
250
+ </details>
251
+
252
+ ## 💬 Usage Examples
253
+
254
+ ### 🔍 Smart Search
255
+ ```
256
+ "Search for SwiftUI animations"
257
+ "Find withAnimation API documentation"
258
+ "Look up async/await patterns in Swift"
259
+ "Show me UITableView delegate methods"
260
+ "Search Core Data NSPersistentContainer examples"
261
+ "Find AVFoundation video playback APIs"
262
+ ```
263
+
264
+ ### 📚 Documentation Access
265
+ ```
266
+ "Get detailed information about the SwiftUI framework"
267
+ "Show me withAnimation API with related APIs"
268
+ "Get platform compatibility for SwiftData"
269
+ "Access UIViewController documentation with similar APIs"
270
+ "Show me NSManagedObjectContext documentation"
271
+ "Get URLSession async/await methods"
272
+ ```
273
+
274
+ ### 🔧 Framework Exploration
275
+ ```
276
+ "Show me SwiftUI framework API index"
277
+ "List all UIKit classes and methods"
278
+ "Browse ARKit framework structure"
279
+ "Get WeatherKit API hierarchy"
280
+ "Explore Core ML model loading APIs"
281
+ "Show Vision framework image analysis APIs"
282
+ ```
283
+
284
+ ### 🔗 API Discovery
285
+ ```
286
+ "Find APIs related to UIViewController"
287
+ "Show me similar APIs to withAnimation"
288
+ "Get all references from SwiftData documentation"
289
+ "Discover alternatives to Core Data NSManagedObject"
290
+ ```
291
+
292
+ ### 📋 Technology & Platform Analysis
293
+ ```
294
+ "List all Beta frameworks in iOS 26"
295
+ "Show me Graphics & Games technologies"
296
+ "What machine learning frameworks are available?"
297
+ "Analyze platform compatibility for Vision framework"
298
+ ```
299
+
300
+ ### 📰 Documentation Updates
301
+ ```
302
+ "Show me the latest WWDC updates"
303
+ "What's new in SwiftUI?"
304
+ "Get technology updates for iOS"
305
+ "Show me release notes for Xcode"
306
+ "Find beta features in the latest updates"
307
+ ```
308
+
309
+ ### 🎯 Technology Overviews
310
+ ```
311
+ "Show me technology overviews for app design and UI"
312
+ "Get comprehensive guides for games development"
313
+ "Explore AI and machine learning overviews"
314
+ "Show me iOS-specific technology guides"
315
+ "Get data management technology overviews"
316
+ ```
317
+
318
+ ### 💻 Sample Code Library
319
+ ```
320
+ "Show SwiftUI sample code projects"
321
+ "Find sample code for machine learning"
322
+ "Get UIKit example projects"
323
+ "Show featured WWDC sample code"
324
+ "Find Core Data sample implementations"
325
+ "Show only beta sample code projects"
326
+ ```
327
+
328
+ ### 🎥 WWDC Video Search
329
+ ```
330
+ "Search WWDC videos about SwiftUI"
331
+ "Find WWDC sessions on machine learning"
332
+ "Show me WWDC 2024 videos"
333
+ "Search for async/await WWDC talks"
334
+ "Find WWDC videos about Swift concurrency"
335
+ "Show accessibility-focused WWDC sessions"
336
+ ```
337
+
338
+ ### 📺 WWDC Video Details
339
+ ```
340
+ "Get details for WWDC session 10176"
341
+ "Show me the transcript for WWDC23 session on SwiftData"
342
+ "Get code examples from WWDC video 10019"
343
+ "Show resources from Vision Pro WWDC session"
344
+ "Get transcript for 'Meet async/await in Swift' session"
345
+ ```
346
+
347
+ ### 📋 WWDC Topics & Years
348
+ ```
349
+ "List all WWDC topics"
350
+ "Show me Swift topic WWDC videos"
351
+ "Get WWDC videos about developer tools"
352
+ "List WWDC videos from 2023"
353
+ "Show all SwiftUI and UI frameworks sessions"
354
+ "Get machine learning WWDC content"
355
+ ```
356
+
357
+ ### 🛠️ Advanced Usage
358
+ ```
359
+ "Find related APIs for @State with platform analysis"
360
+ "Resolve all references from SwiftUI documentation"
361
+ "Get platform compatibility analysis for Vision framework"
362
+ "Find similar APIs to UIViewController with deep search"
363
+ ```
364
+
365
+ ## 🛠️ Available Tools
366
+
367
+ | Tool | Description | Key Features |
368
+ |------|-------------|--------------|
369
+ | `search_apple_docs` | Search Apple Developer Documentation | Official search API, find specific APIs, classes, methods |
370
+ | `get_apple_doc_content` | Get detailed documentation content | JSON API access, optional enhanced analysis (related/similar APIs, platform compatibility) |
371
+ | `list_technologies` | Browse all Apple technologies | Category filtering, language support, beta status |
372
+ | `search_framework_symbols` | Search symbols in specific framework | Classes, structs, protocols, wildcard patterns, type filtering |
373
+ | `get_related_apis` | Find related APIs | Inheritance, conformance, "See Also" relationships |
374
+ | `resolve_references_batch` | Batch resolve API references | Extract and resolve all references from documentation |
375
+ | `get_platform_compatibility` | Platform compatibility analysis | Version support, beta status, deprecation info |
376
+ | `find_similar_apis` | Discover similar APIs | Apple's official recommendations, topic groupings |
377
+ | `get_documentation_updates` | Track Apple documentation updates | WWDC announcements, technology updates, release notes |
378
+ | `get_technology_overviews` | Get technology overviews and guides | Comprehensive guides, hierarchical navigation, platform filtering |
379
+ | `get_sample_code` | Browse Apple sample code projects | Framework filtering (with limitations), keyword search, beta status |
380
+ | `search_wwdc_videos` | Search WWDC video sessions | Keyword search, topic/year filtering, session metadata |
381
+ | `get_wwdc_video_details` | Get WWDC video details with transcript | Full transcripts, code examples, resources, platform info |
382
+ | `list_wwdc_topics` | List all available WWDC topics | 19 topic categories from Swift to Spatial Computing |
383
+ | `list_wwdc_years` | List all available WWDC years | Conference years with video counts |
384
+
385
+ ## 🏗️ Technical Architecture for Apple Developer Documentation Access
386
+
387
+ ```
388
+ apple-docs-mcp/
389
+ ├── 🔧 src/
390
+ │ ├── index.ts # MCP server entry point with all tools
391
+ │ ├── tools/ # MCP tool implementations
392
+ │ │ ├── search-parser.ts # HTML search result parsing
393
+ │ │ ├── doc-fetcher.ts # JSON API documentation fetching
394
+ │ │ ├── list-technologies.ts # Technology catalog handling
395
+ │ │ ├── get-documentation-updates.ts # Documentation updates tracking
396
+ │ │ ├── get-technology-overviews.ts # Technology overviews and guides
397
+ │ │ ├── get-sample-code.ts # Sample code library browser
398
+ │ │ ├── get-framework-index.ts # Framework structure indexing
399
+ │ │ ├── get-related-apis.ts # Related API discovery
400
+ │ │ ├── resolve-references-batch.ts # Batch reference resolution
401
+ │ │ ├── get-platform-compatibility.ts # Platform analysis
402
+ │ │ ├── find-similar-apis.ts # Similar API recommendations
403
+ │ │ └── wwdc/ # WWDC video tools
404
+ │ │ ├── wwdc-handlers.ts # WWDC tool handlers
405
+ │ │ ├── content-extractor.ts # Video content extraction
406
+ │ │ ├── topics-extractor.ts # Topic listing
407
+ │ │ └── video-list-extractor.ts # Video list parsing
408
+ │ └── utils/ # Utility functions and helpers
409
+ │ ├── cache.ts # Memory cache with TTL support
410
+ │ ├── constants.ts # Application constants and URLs
411
+ │ ├── error-handler.ts # Error handling and validation
412
+ │ ├── http-client.ts # HTTP client with performance tracking
413
+ │ ├── user-agent-pool.ts # Smart UserAgent rotation system
414
+ │ ├── http-headers-generator.ts # Dynamic browser headers generation
415
+ │ └── url-converter.ts # URL conversion utilities
416
+ ├── 📦 dist/ # Compiled JavaScript
417
+ ├── 📄 package.json # Package configuration
418
+ └── 📖 README.md # This file
419
+ ```
420
+
421
+ ### 🚀 Performance Features
422
+
423
+ - **Memory-Based Caching**: Custom cache implementation with automatic cleanup and TTL support
424
+ - **Smart UserAgent Pool**: Intelligent rotation system with automatic failure recovery and performance monitoring
425
+ - **Dynamic Headers**: Realistic browser headers generation (Accept, Accept-Language, User-Agent)
426
+ - **Smart Search**: Official Apple search API with enhanced result formatting
427
+ - **Enhanced Analysis**: Optional related APIs, platform compatibility, and similarity analysis
428
+ - **Error Resilience**: Graceful degradation with comprehensive error handling
429
+ - **Type Safety**: Full TypeScript with Zod v4.0.5 runtime validation
430
+ - **Latest Dependencies**: MCP SDK v1.15.1, optimized package footprint
431
+
432
+ ### 💾 Caching Strategy
433
+
434
+ | Content Type | Cache Duration | Cache Size | Reason |
435
+ |--------------|----------------|------------|--------|
436
+ | API Documentation | 30 minutes | 500 entries | Frequently accessed, moderate updates |
437
+ | Search Results | 10 minutes | 200 entries | Dynamic content, user-specific |
438
+ | Framework Indexes | 1 hour | 100 entries | Stable structure, less frequent changes |
439
+ | Technologies List | 2 hours | 50 entries | Rarely changes, large content |
440
+ | Documentation Updates | 30 minutes | 100 entries | Regular updates, WWDC announcements |
441
+
442
+ ## 📦 WWDC Data
443
+
444
+ All WWDC video data (2014-2025) is **bundled directly in the npm package**, providing:
445
+
446
+ - ✅ **Zero network latency** - No API calls needed for WWDC content
447
+ - ✅ **100% offline access** - Works without internet connection
448
+ - ✅ **No rate limits** - Unlimited WWDC searches and browsing
449
+ - ✅ **Instant responses** - All data is locally available
450
+
451
+ The package includes:
452
+ - 📹 **1,260+ WWDC session videos** with full transcripts
453
+ - 🏷️ **20 topic categories** for organized browsing
454
+ - 📅 **13 years of content** (2012-2025)
455
+ - 💾 **35MB of optimized JSON data**
456
+
457
+ > **Note**: Keep your package updated to get the latest WWDC content additions.
458
+
459
+ ## ⚙️ Configuration
460
+
461
+ ### 🔄 UserAgent Pool Configuration
462
+
463
+ The MCP server includes an intelligent UserAgent rotation system to improve API reliability:
464
+
465
+ #### Environment Variables
466
+
467
+ | Variable | Description | Default | Example |
468
+ |----------|-------------|---------|---------|
469
+ | `USER_AGENT_ROTATION_ENABLED` | Enable/disable rotation | `true` | `true` |
470
+ | `USER_AGENT_POOL_STRATEGY` | Rotation strategy | `random` | `smart` |
471
+ | `USER_AGENT_MAX_RETRIES` | Max retry attempts | `3` | `5` |
472
+ | `USER_AGENT_POOL_CONFIG` | Custom pool config (JSON) | Built-in agents | See below |
473
+
474
+ #### Custom Pool Configuration
475
+
476
+ ```bash
477
+ # Configure custom UserAgent pool
478
+ export USER_AGENT_POOL_CONFIG='[
479
+ {"userAgent": "MyApp/1.0 (compatible)", "weight": 3, "maxUsageCount": 1000},
480
+ {"userAgent": "MyApp/2.0 (advanced)", "weight": 2, "maxUsageCount": 800}
481
+ ]'
482
+
483
+ # Set rotation strategy (random/sequential/smart)
484
+ export USER_AGENT_POOL_STRATEGY=smart
485
+
486
+ # Enable debugging
487
+ export NODE_ENV=development
488
+ ```
489
+
490
+ #### Available Strategies
491
+
492
+ - **`random`**: Fast random selection (best performance)
493
+ - **`sequential`**: Round-robin rotation (predictable order)
494
+ - **`smart`**: Success rate optimization (best reliability)
495
+
496
+ #### Built-in UserAgents
497
+
498
+ The server includes 12+ pre-configured UserAgent strings covering:
499
+ - Chrome (Mac Intel/Apple Silicon, Windows, Linux)
500
+ - Firefox (Mac Intel/Apple Silicon, Windows, Linux)
501
+ - Safari (Mac Intel/Apple Silicon, latest versions)
502
+ - Edge (Windows, Mac Intel/Apple Silicon)
503
+
504
+ ## 🧪 Development
505
+
506
+ ### Quick Commands
507
+
508
+ ```bash
509
+ # Development with auto-reload
510
+ pnpm run dev # or: npm run dev
511
+
512
+ # Build for production
513
+ pnpm run build # or: npm run build
514
+
515
+ # Type checking
516
+ pnpm exec tsc --noEmit # or: npx tsc --noEmit
517
+
518
+ # Clean build artifacts
519
+ pnpm run clean # or: npm run clean
520
+ ```
521
+
522
+ ### Testing Locally
523
+
524
+ ```bash
525
+ # Test the MCP server directly
526
+ node dist/index.js
527
+
528
+ # Test with sample queries
529
+ npx @mweinbach/apple-docs-mcp --test
530
+ ```
531
+
532
+ ## 🤝 Contributing
533
+
534
+ Contributions are welcome! Here's how to get started:
535
+
536
+ 1. **Fork** the repository
537
+ 2. **Create** a feature branch: `git checkout -b feature/amazing-feature`
538
+ 3. **Commit** your changes: `git commit -m 'Add amazing feature'`
539
+ 4. **Push** to the branch: `git push origin feature/amazing-feature`
540
+ 5. **Open** a Pull Request
541
+
542
+ ## 📄 License
543
+
544
+ MIT License - see [LICENSE](LICENSE) for details.
545
+
546
+ ## ⚠️ Disclaimer
547
+
548
+ This project is not affiliated with or endorsed by Apple Inc. It uses publicly available Apple Developer Documentation APIs for educational and development purposes.
549
+
550
+ ---
551
+
552
+ <div align="center">
553
+
554
+ **Made with ❤️ for the Apple Developer Community**
555
+
556
+ Search Apple Developer Documentation | iOS Development | macOS Development | Swift Programming | SwiftUI | UIKit | Xcode | WWDC Videos | Model Context Protocol | MCP Server
557
+
558
+ [Report Issues](https://github.com/mweinbach/apple-docs-mcp/issues) • [Request Features](https://github.com/mweinbach/apple-docs-mcp/issues/new) • [Documentation](https://github.com/mweinbach/apple-docs-mcp)
559
+
560
+ </div>
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Browser-specific HTTP header templates for authentic browser simulation
3
+ *
4
+ * Based on real browser behavior analysis for different browser types.
5
+ * These templates ensure requests look authentic and reduce detection risk.
6
+ */
7
+ import type { BrowserType, HeaderTemplate, LanguagePreference } from '../types/headers.js';
8
+ /**
9
+ * Browser-specific header templates
10
+ *
11
+ * Each template is crafted to match real browser behavior:
12
+ * - Accept headers reflect browser's format support
13
+ * - Sec-Fetch-* headers match browser security policies
14
+ * - Language preferences follow browser defaults
15
+ */
16
+ export declare const BROWSER_HEADERS: Record<BrowserType, HeaderTemplate>;
17
+ /**
18
+ * Simplified header templates for basic compatibility mode
19
+ */
20
+ export declare const SIMPLE_BROWSER_HEADERS: Record<BrowserType, HeaderTemplate>;
21
+ /**
22
+ * Language preference pools for rotation
23
+ */
24
+ export declare const LANGUAGE_PREFERENCES: LanguagePreference[][];
25
+ /**
26
+ * Platform-specific Sec-CH-UA-Platform values
27
+ */
28
+ export declare const PLATFORM_VALUES: {
29
+ readonly macOS: readonly ["\"macOS\""];
30
+ readonly windows: readonly ["\"Windows\""];
31
+ readonly linux: readonly ["\"Linux\""];
32
+ };
33
+ /**
34
+ * Browser version strings for Sec-CH-UA headers
35
+ */
36
+ export declare const BROWSER_VERSIONS: {
37
+ readonly chrome: readonly ["\"Not A(Brand\";v=\"99\", \"Google Chrome\";v=\"121\", \"Chromium\";v=\"121\"", "\"Not A(Brand\";v=\"99\", \"Google Chrome\";v=\"120\", \"Chromium\";v=\"120\"", "\"Not A(Brand\";v=\"99\", \"Google Chrome\";v=\"119\", \"Chromium\";v=\"119\""];
38
+ readonly edge: readonly ["\"Not A(Brand\";v=\"99\", \"Microsoft Edge\";v=\"121\", \"Chromium\";v=\"121\"", "\"Not A(Brand\";v=\"99\", \"Microsoft Edge\";v=\"120\", \"Chromium\";v=\"120\"", "\"Not A(Brand\";v=\"99\", \"Microsoft Edge\";v=\"119\", \"Chromium\";v=\"119\""];
39
+ };
40
+ /**
41
+ * DNT (Do Not Track) values for privacy preference simulation
42
+ */
43
+ export declare const DNT_VALUES: readonly ["1", "0"];
44
+ /**
45
+ * Cache-Control values for different request types
46
+ */
47
+ export declare const CACHE_CONTROL_VALUES: readonly ["max-age=0", "no-cache", "max-age=0, no-cache"];
48
+ //# sourceMappingURL=browser-headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-headers.d.ts","sourceRoot":"","sources":["../../src/constants/browser-headers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE3F;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,cAAc,CAiD/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,WAAW,EAAE,cAAc,CAwBtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,EAAE,EAyCtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;CAYnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,qBAAsB,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,oBAAoB,2DAIvB,CAAC"}