kimsungwhee/apple-docs-mcp · 上手攻略

  • 仓库:kimsungwhee/apple-docs-mcp
  • 链接:https://github.com/kimsungwhee/apple-docs-mcp
  • 分类:skill(MCP Server / 开发者文档检索)
  • 作者:Jay
  • 更新:2026-08-15

是什么

apple-docs-mcp 是一个 MCP 服务器,为 AI 助手提供 Apple 官方开发者文档的实时查询能力。接入后,可以在 Claude、Cursor、VS Code(Copilot MCP)、Windsurf、Zed、Cline、Amazon Q 等主流 AI 开发工具中,直接用自然语言搜索 iOS / macOS / watchOS / tvOS / visionOS 的框架文档、API 参考、SwiftUI 示例、WWDC 视频等。

底层调用 Apple 官方 JSON Documentation API,不依赖网页抓取,数据权威且更新及时。


解决什么问题

  • 找文档费时:不用在 developer.apple.com 上层层导航,直接问 AI「SwiftUI withAnimation 怎么用」
  • 跨平台文档对比:同时查询 UIKit 和 SwiftUI 的相同功能实现差异
  • WWDC 视频检索:按年份、主题、session ID 搜索 WWDC 内容
  • Beta API 追踪:跟踪 iOS / macOS 最新 Beta 框架和已废弃 API
  • 代码示例即时获取:不只是文档,还有可直接复制的 Swift / Objective-C 示例代码

快速安装

通用配置(npx 方式)

无需全局安装,直接在 MCP 配置中引用:

# 安装最新版本
npx -y @kimsungwhee/apple-docs-mcp@latest

Claude Desktop

配置文件路径: - macOS:~/Library/Application Support/Claude/claude_desktop_config.json - Windows:%APPDATA%\Claude\claude_desktop_config.json - Linux:~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "apple-docs": {
      "command": "npx",
      "args": ["-y", "@kimsungwhee/apple-docs-mcp@latest"]
    }
  }
}

Claude Code

claude mcp add apple-docs -- npx -y @kimsungwhee/apple-docs-mcp@latest

Cursor

~/.cursor/mcp.json 或通过 Settings → Cursor Settings → MCP → Add 添加:

{
  "mcpServers": {
    "apple-docs": {
      "command": "npx",
      "args": ["-y", "@kimsungwhee/apple-docs-mcp@latest"]
    }
  }
}

VS Code(Cline 等 MCP 兼容插件)

{
  "mcp": {
    "servers": {
      "apple-docs": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@kimsungwhee/apple-docs-mcp@latest"]
      }
    }
  }
}

Windsurf

{
  "mcpServers": {
    "apple-docs": {
      "command": "npx",
      "args": ["-y", "@kimsungwhee/apple-docs-mcp@latest"]
    }
  }
}

Zed

settings.json

{
  "context_servers": {
    "Apple Docs": {
      "command": {
        "path": "npx",
        "args": ["-y", "@kimsungwhee/apple-docs-mcp@latest"]
      },
      "settings": {}
    }
  }
}

Amazon Q Developer CLI

~/.aws/amazonq/mcp.json

{
  "mcpServers": {
    "apple-docs": {
      "command": "npx",
      "args": ["-y", "@kimsungwhee/apple-docs-mcp@latest"]
    }
  }
}

Windows 用户

{
  "mcpServers": {
    "apple-docs": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@kimsungwhee/apple-docs-mcp@latest"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

核心用法(示例 prompt)

安装成功后,在 AI 助手中直接提问:

智能搜索

"Search for SwiftUI animations"
"Find withAnimation API documentation"
"Look up async/await patterns in Swift"
"Show me UITableView delegate methods"
"Search Core Data NSPersistentContainer examples"

获取 API 详情

"Get detailed information about the SwiftUI framework"
"Show me withAnimation API with related APIs"
"Get platform compatibility for SwiftData"
"Access UIViewController documentation with similar APIs"

框架索引浏览

"Show me SwiftUI framework API index"
"List all UIKit classes and methods"
"Browse ARKit framework structure"

WWDC 视频检索

"Search WWDC videos about SwiftUI"
"Find WWDC sessions on machine learning"
"Show me WWDC 2024 videos"
"Get details for WWDC session 10176"

示例代码获取

"Show SwiftUI sample code projects"
"Find sample code for machine learning"
"Get UIKit example projects"

Beta / 更新追踪

"List all Beta frameworks in iOS 26"
"What's new in SwiftUI?"
"Show me release notes for Xcode"
"Find beta features in the latest updates"

支持的平台与框架

平台:iOS、iPadOS、macOS、watchOS、tvOS、visionOS

主要框架(部分): SwiftUI、UIKit、Foundation、CoreData、ARKit、Core ML、Vision、AVFoundation、Metal、Swift Concurrency(async/await)、SwiftData、WeatherKit 等

文档类型: API 参考、代码示例(Swift / Objective-C)、技术概述、WWDC Session 视频与文字稿、平台兼容性分析、Beta API 追踪、废弃 API 标注


典型适用场景

  1. SwiftUI / UIKit 混用项目:对比两个框架的相同功能实现差异
  2. AI 结对编程:在 Cursor / Claude Code 中边写代码边查 Apple API 用法
  3. WWDC 视频学习:按主题搜索相关 Session,附带代码示例
  4. Beta 版 API 尝鲜:追踪 iOS 最新 Beta 框架,提前准备适配
  5. 跨平台 Apple 开发:同时了解多个平台的同一框架 API 差异

坑与注意

问题 说明
平台版本标注存疑 README 提到 iOS 26 / macOS 26(当前时间 2026-08-15 距 WWDC 2025 仅约 14 个月,Apple 官方尚未宣布此版本号),建议以 Apple 官方实际发布为准
WWDC 视频实际可用范围 README 称支持 WWDC 2014–2025,实际支持范围建议以 GitHub 最新文档为准
UserAgent 池机制 工具内置 UserAgent 轮换池用于访问 Apple API,若遇到限流可等待自动恢复
全局安装推荐 pnpm 文档推荐 pnpm add -g,实测 npm 全局安装亦可

与同类对比

工具 特点 与 apple-docs-mcp 的区别
Apple 官方 developer.apple.com 网页浏览,手动导航 手动 vs AI 自然语言查询
Dash(macOS 文档阅读器) 本地索引,离线可用 离线 vs AI 集成对话
kimsungwhee/apple-docs-mcp MCP 协议,AI 助手直查 自然语言 + 多工具集成
Cursor / Copilot 内置搜索 通用 Web 搜索 通用 vs Apple 官方文档权威数据

一句话:对于任何涉及 Apple 开发者文档的场景,apple-docs-mcp 让 AI 助手直接查询权威 API 参考,是目前最实用的 Apple 平台 MCP 工具。


一句话结论

apple-docs-mcp 把 Apple 官方开发者文档接入主流 AI 开发助手,支持自然语言查询、代码示例、Beta API 追踪和 WWDC 视频检索——WWDC 和平台版本号以 Apple 官方为准(README 中版本信息未经独立核验)。