/ 目录 / 演练场 / cupertino
● 社区 mihaelamj ⚡ 即开即用

cupertino

作者 mihaelamj · mihaelamj/cupertino

Local Apple documentation at your agent's fingertips — 302k+ pages, HIG, sample code, all in SQLite FTS5 with sub-100ms search.

cupertino (mihaelamj) crawls Apple developer documentation and serves it to MCP clients from a local SQLite FTS5 index. Stops Claude from making up UIKit/SwiftUI APIs. ~2.4GB for the full corpus; covers 307 frameworks, HIG, sample projects, Swift Evolution.

为什么要用

核心特性

实时演示

实际使用效果

cupertino.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "cupertino": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/mihaelamj/cupertino"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "cupertino": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/mihaelamj/cupertino"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "cupertino": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/mihaelamj/cupertino"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "cupertino": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/mihaelamj/cupertino"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "cupertino",
      "command": "TODO",
      "args": [
        "See README: https://github.com/mihaelamj/cupertino"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "cupertino": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/mihaelamj/cupertino"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add cupertino -- TODO 'See README: https://github.com/mihaelamj/cupertino'

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: cupertino

Stop API hallucinations with cupertino for Apple docs

👤 iOS / macOS / visionOS developers ⏱ ~10 min beginner

何时使用: Claude keeps inventing API signatures; you want it grounded in real docs.

前置条件
  • cupertino installed — Download Swift 6.2+ binary; run cupertino setup to pull the index
步骤
  1. Setup index
    Run cupertino setup then cupertino serve. Confirm MCP server is listening.✓ 已复制
    → Server online
  2. Force agent to cite
    Before writing any SwiftUI code, search cupertino docs for the exact API. Quote the signature.✓ 已复制
    → Verified API with URI
  3. Use it
    Now write the code using only the APIs you quoted.✓ 已复制
    → Compiles first try

结果: Dramatically fewer API hallucinations.

Review a design against Apple's Human Interface Guidelines

👤 iOS designers, PMs ⏱ ~20 min intermediate

何时使用: Before shipping, you want to check a flow against HIG.

步骤
  1. Describe the screen
    I'm building a settings screen with a destructive 'Delete account' button. Use search_hig for iOS to find relevant guidance.✓ 已复制
    → HIG passages about destructive actions
  2. Apply
    Given those guidelines, critique my mockup [paste]. What violates HIG?✓ 已复制
    → Specific violations + fixes

结果: HIG-compliant UI without reading the whole doc yourself.

搭配使用: claude-talk-to-figma

Learn from Apple's sample projects via cupertino

👤 Developers learning new frameworks ⏱ ~15 min beginner

何时使用: You need to know 'how does Apple actually use this API'.

步骤
  1. Find relevant samples
    search_samples for 'SwiftData relationships'. List matching projects.✓ 已复制
    → Project names + descriptions
  2. Read the source
    In project X, read ContentView.swift and explain the relationship setup.✓ 已复制
    → Annotated walkthrough

结果: Real, Apple-endorsed patterns instead of forum guesses.

组合

与其他 MCP 搭配,撬动十倍杠杆

Design in Figma, validate against HIG via cupertino

For the selected Figma screen, search HIG for relevant rules and flag inconsistencies.✓ 已复制
cupertino + filesystem

Compare your SwiftUI code against Apple's sample for the same pattern

Read my ./Sources/ContentView.swift and diff against Apple's SwiftData sample structure.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
search_docs query, framework? Reference API lookup 0
search_hig query, platform? Design guidance 0
list_frameworks Discover what's indexed 0
read_document uri Expand a search hit 0
search_samples query Sample code discovery 0
list_samples Browse 0
read_sample_file sample, path Read a specific file 0

成本与限制

运行它的成本

API 配额
None — local FTS5
每次调用 Token 数
Doc pages: 500-5000 each
费用
Free
提示
Use search_docs + read_document on only the top hit rather than dumping multiple pages

安全

权限、密钥、影响范围

凭据存储: None
数据出站: None at runtime; cupertino setup fetches from developer.apple.com once

故障排查

常见错误与修复

Search returns nothing after install

cupertino setup didn't complete — re-run and watch for network errors

验证: Database file size should be ~2.4GB
Stale docs after an OS release

Re-run cupertino setup to refresh the crawl

Index DB too large for machine

Use framework-scoped setup to index only what you need (e.g. only SwiftUI)

替代方案

cupertino 对比其他方案

替代方案何时用它替代权衡
DuckDuckGo / web search MCPYou don't mind hallucination risk and need latestNot authoritative; can return third-party blogs
Apple Developer website directlyHuman-driven readingNo agent automation

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills