loading…
Search for a command to run...
loading…
Apple Documentation MCP Server. Search Apple developer docs, Swift Evolution proposals, and 600+ sample code projects with full-text search.
Apple Documentation MCP Server. Search Apple developer docs, Swift Evolution proposals, and 600+ sample code projects with full-text search.
🕯️ v1.0.0 'First Light' is in the making. A proper 1.0, not a point release. The current version stands steadfast in the meantime — follow the roadmap →.
Apple Documentation Crawler & MCP Server
A Swift-based tool to crawl, index, and serve Apple's developer documentation to AI agents via the Model Context Protocol (MCP).
Swift 6.2+ macOS 15+ License PulseMCP LobeHub

Cupertino is a local, structured, AI-ready documentation system for Apple platforms. It:
Note: When building from source, commands must be run from the
Packagesdirectory. The one-command install works from anywhere.
Building from source additionally requires Swift 6.2+ and Xcode 16.0+
One-command install (recommended):
bash <(curl -sSL https://raw.githubusercontent.com/mihaelamj/cupertino/main/install.sh)
This downloads a pre-built, signed, and notarized universal binary, installs it to /usr/local/bin, and downloads the documentation databases.
Or with Homebrew:
brew tap mihaelamj/tap
brew install cupertino
cupertino setup
Or build from source:
git clone https://github.com/mihaelamj/cupertino.git
cd cupertino
# Using Makefile (recommended)
make build # Build release binary
sudo make install # Install to /usr/local/bin
# Or using Swift Package Manager directly
cd Packages
swift build -c release
sudo ln -sf "$(pwd)/.build/release/cupertino" /usr/local/bin/cupertino
Demo Video: Watch on YouTube
# Quick Setup (Recommended) - download pre-built databases (~30 seconds)
cupertino setup # Download databases from GitHub
cupertino serve # Start MCP server
# Alternative: Build from GitHub (~45 minutes)
cupertino save --remote # Stream and build locally
# Or fetch documentation yourself
cupertino fetch --type docs # Apple Developer Documentation
cupertino fetch --type swift # Swift.org documentation
cupertino fetch --type evolution # Swift Evolution proposals
cupertino fetch --type packages # Swift package metadata
cupertino fetch --type package-docs # Swift package READMEs
cupertino fetch --type code # Sample code from Apple (requires auth)
cupertino fetch --type samples # Sample code from GitHub (recommended)
cupertino fetch --type archive # Apple Archive programming guides
cupertino fetch --type hig # Human Interface Guidelines
cupertino fetch --type availability # Platform availability data
cupertino fetch --type all # All types in parallel
# Build indexes
cupertino save # Build documentation search index (from local files)
cupertino save --remote # Build from GitHub (no local files needed)
cupertino index # Index sample code for search
# Start server
cupertino # Start MCP server (default command)
cupertino serve # Start MCP server (explicit)
# Download pre-built databases from GitHub (~30 seconds)
cupertino setup
# Start MCP server
cupertino serve
# Stream and build locally (~45 minutes)
# Use this if you want to build the database yourself
cupertino save --remote
# Start MCP server
cupertino serve
# Download Apple documentation (~12+ days for 301,000+ pages)
# Takes time due to 0.5s default delay between requests to respect Apple's servers
cupertino fetch --type docs --max-pages 15000
# Download Swift Evolution proposals (~2-5 minutes)
cupertino fetch --type evolution
# Download sample code from GitHub (~4 minutes, 606 projects)
cupertino fetch --type samples
# Build search index (~2-5 minutes)
cupertino save
~/Library/Application Support/Claude/claude_desktop_config.json:{
"mcpServers": {
"cupertino": {
"command": "/usr/local/bin/cupertino",
"args": ["serve"]
}
}
}
Note: Use
/opt/homebrew/bin/cupertinofor Homebrew on Apple Silicon,/usr/local/bin/cupertinofor Intel or manual install. Runwhich cupertinoto find your path.
Restart Claude Desktop
Ask Claude about Apple APIs:
If you're using Claude Code, you can add Cupertino as an MCP server with a single command:
claude mcp add cupertino --scope user -- $(which cupertino)
This registers Cupertino globally for all your projects. Claude Code will automatically have access to Apple documentation search.
If you're using OpenAI Codex, add Cupertino with:
codex mcp add cupertino -- $(which cupertino) serve
Or add directly to ~/.codex/config.toml:
[mcp_servers.cupertino]
command = "/opt/homebrew/bin/cupertino" # Homebrew on Apple Silicon
# command = "/usr/local/bin/cupertino" # Intel Mac or manual install
args = ["serve"]
Tip: Run
which cupertinoto find your installation path.
Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for global access):
{
"mcpServers": {
"cupertino": {
"command": "/opt/homebrew/bin/cupertino",
"args": ["serve"]
}
}
}
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"cupertino": {
"type": "stdio",
"command": "/opt/homebrew/bin/cupertino",
"args": ["serve"]
}
}
}
Add to your Zed settings.json:
{
"context_servers": {
"cupertino": {
"command": "/opt/homebrew/bin/cupertino",
"args": ["serve"]
}
}
}
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"cupertino": {
"command": "/opt/homebrew/bin/cupertino",
"args": ["serve"]
}
}
}
Add to opencode.jsonc:
{
"mcp": {
"cupertino": {
"type": "local",
"command": ["/opt/homebrew/bin/cupertino", "serve"]
}
}
}
Note: All examples use
/opt/homebrew/bin/cupertino(Homebrew on Apple Silicon). Use/usr/local/bin/cupertinofor Intel Macs or manual installs. Runwhich cupertinoto find your path.
Cupertino can also be used as a stateless CLI skill without running an MCP server. This is useful for agents that support the Agent Skills specification.
Prerequisites:
Install cupertino and download the databases first:
# Install via Homebrew or from source (see Installation above)
cupertino setup
Option A: Install with OpenSkills (Recommended)
OpenSkills is a universal skills loader that works with Claude Code, Cursor, Windsurf, Aider, and other AI coding agents.
# Install the cupertino skill from GitHub
npx openskills install mihaelamj/cupertino
# Sync to update AGENTS.md
npx openskills sync
For global installation (available in all projects):
npx openskills install mihaelamj/cupertino --global
For multi-agent setups (installs to .agent/skills/ instead of .claude/skills/):
npx openskills install mihaelamj/cupertino --universal
Option B: Install as a Claude Code Plugin
Add the cupertino marketplace to Claude Code:
claude /plugin marketplace add https://github.com/mihaelamj/cupertino.git
Then enable the plugin from the marketplace.
Option C: Manual Installation
Copy the skill definition to your project or global skills directory:
# Clone this repo
git clone https://github.com/mihaelamj/cupertino.git
# For a single project
mkdir -p .claude/skills/cupertino
cp cupertino/skills/cupertino/SKILL.md .claude/skills/cupertino/
# Or for global use with Claude Code
mkdir -p ~/.claude/skills/cupertino
cp cupertino/skills/cupertino/SKILL.md ~/.claude/skills/cupertino/
How It Works:
The skill uses the CLI directly with JSON output, no server process needed:
# Search documentation
cupertino search "SwiftUI View" --format json
# Filter by source
cupertino search "NavigationStack" --source apple-docs --format json
cupertino search "button styles" --source samples --format json
# Read a document
cupertino read "apple-docs://swiftui/documentation_swiftui_view" --format json
# List frameworks
cupertino list-frameworks --format json
# List sample projects
cupertino list-samples --framework swiftui --format json
All commands support --format json for structured output that agents can parse.
Available Sources:
apple-docs - Official Apple documentation (301,000+ pages)samples - Apple sample code projectshig - Human Interface Guidelinesswift-evolution - Swift Evolution proposalsswift-org - Swift.org documentationswift-book - The Swift Programming Language bookapple-archive - Legacy programming guidespackages - Swift package documentationOnce configured, Claude Desktop can search your local documentation:
Search Results Example:
# Search Results for "SwiftUI"
Found **20** results:
## 1. NSHostingView | Apple Developer Documentation
- **Framework:** `swiftui`
- **URI:** `apple-docs://swiftui/documentation_swiftui_nshostingview`
- **Score:** 1.82
An AppKit view that hosts a SwiftUI view hierarchy.
## 2. UIHostingController | Apple Developer Documentation
- **Framework:** `swiftui`
- **URI:** `apple-docs://swiftui/documentation_swiftui_uihostingcontroller`
A UIKit view controller that manages a SwiftUI view hierarchy.
...
Framework Statistics:
| Framework | Documents |
|---|---|
| Kernel | 39,396 |
| Matter | 24,320 |
| Swift | 17,466 |
| AppKit | 12,443 |
| Foundation | 12,423 |
| UIKit | 11,158 |
| Accelerate | 9,114 |
| SwiftUI | 7,062 |
| ... | ... |
| 307 Frameworks | 302,424 |
Apple Developer Documentation (301,000+ pages)
Swift Evolution Proposals (~400 proposals)
Swift.org Documentation
Swift Package Metadata
Apple Sample Code (606 projects)
Apple Archive Legacy Guides (~75 pages)
--include-archive)Human Interface Guidelines
Cupertino includes pre-indexed catalog data bundled directly into the application:
Swift Packages Catalog (9,699 packages)
Sample Code Catalog (606 entries)
Priority Packages (36 curated packages)
These catalogs are indexed during cupertino save and enable instant search without requiring multi-hour downloads. You can still fetch package READMEs and sample code separately via cupertino fetch if needed.
apple-docs://{framework}/{page}swift-evolution://{proposal-id}hig://{category}/{page}cupertino save):search_docs - Full-text search across all documentationquery (required), source, framework, min_ios, min_macos, include_archive, limit (all optional)search_hig - Search Human Interface Guidelinesquery (required), platform (optional), category (optional), limit (optional)list_frameworks - List available frameworksread_document - Read document by URI with format optionuri (required), format (optional: json or markdown, default: json)cupertino index):search_samples - Search sample code projects and fileslist_samples - List all indexed sample projectsread_sample - Read sample project README and metadataread_sample_file - Read specific source file from a sample| Command | Description |
|---|---|
cupertino |
Start MCP server (default) |
cupertino setup |
Download pre-built databases from GitHub |
cupertino serve |
Start MCP server |
cupertino fetch |
Download documentation |
cupertino save |
Build search index |
cupertino search |
Search documentation from CLI |
cupertino read |
Read full document by URI |
cupertino doctor |
Check server health |
cupertino index |
Index sample code for search |
cupertino cleanup |
Clean up sample code archives |
See docs/commands/ for detailed usage and options.
Cupertino uses an ExtremePackaging architecture with 9 consolidated packages:
Foundation Layer:
├─ MCP # Consolidated MCP framework (Protocol + Transport + Server)
├─ Logging # os.log infrastructure
└─ Shared # Configuration & models
Infrastructure Layer:
├─ Core # Crawler & downloaders
└─ Search # SQLite FTS5 search
Application Layer:
├─ MCPSupport # Resource providers
├─ SearchToolProvider # Search tool implementations
└─ Resources # Embedded resources
Executables:
├─ CLI # Unified cupertino binary
├─ TUI # Terminal UI (cupertino-tui)
└─ MockAIAgent # Testing tool (mock-ai-agent)
1. Fetch: cupertino fetch --type docs
↓
WKWebView → HTML → Markdown → disk (~/.cupertino/docs/)
2. Save: cupertino save
↓
Markdown files → SQLite FTS5 index (~/.cupertino/search.db)
3. Serve: cupertino serve
↓
MCP Server (stdio) ← JSON-RPC ← Claude Desktop
↓
DocsResourceProvider + CupertinoSearchToolProvider
# Show all available commands
make help
# Common tasks
make build # Build release binaries
sudo make install # Install to /usr/local/bin
sudo make update # Rebuild and reinstall
make test # Run all tests
make clean # Clean build artifacts
# Development workflow
make test-unit # Fast unit tests only
make test-integration # All tests (includes network calls)
make format # Format code with SwiftFormat
make lint # Lint with SwiftLint
Test Suite:
Test Categories:
Cupertino uses os.log for structured logging:
# View all logs
log show --predicate 'subsystem == "com.cupertino"' --last 1h
# View specific category
log show --predicate 'subsystem == "com.cupertino" AND category == "crawler"' --last 1h
# Stream live logs
log stream --predicate 'subsystem == "com.cupertino"'
Categories: crawler, mcp, search, cli, transport, pdf, evolution, samples
| Operation | Time | Size |
|---|---|---|
| Build CLI | 10-15s | 4.3MB |
| Crawl 301,000+ pages | 12+ days | 2-3GB |
| Swift Evolution | 2-5 min | 429 proposals |
| Swift.org docs | 5-10 min | 501 pages |
| Build search index | 2-5 min | ~160MB |
| Search query | <100ms | - |
The crawler respects Apple's servers with a 0.5 second default delay between each request (configurable):
Use cupertino setup to download pre-built databases instead (~30 seconds).
This is a one-time operation. Incremental updates use change detection to skip unchanged pages and complete much faster.
# Download everything for offline access
cupertino fetch --type docs --max-pages 15000
cupertino fetch --type evolution
cupertino save
# Just SwiftUI documentation
cupertino fetch --type docs \
--start-url "https://developer.apple.com/documentation/swiftui" \
--max-pages 500
# Serve documentation to Claude
cupertino serve
# Then ask Claude: "How do I use @Observable in SwiftUI?"
# Multiple sources with custom paths
cupertino fetch --type docs --output-dir ~/docs/apple
cupertino fetch --type evolution --output-dir ~/docs/evolution
cupertino save --base-dir ~/docs --search-db ~/docs/search.db
cupertino serve --docs-dir ~/docs/apple --search-db ~/docs/search.db
Each command has detailed documentation:
Issues and pull requests are welcome! I'd love to hear how you're using Cupertino with your AI workflow.
For questions and discussion, use GitHub Discussions.
I prefer collaboration over competition — if you're working on something similar, let's find ways to work together.
Don't hesitate to submit a PR because of code style. I'd rather have your contribution than perfect formatting.
By participating in this project you agree to abide by the Contributor Covenant Code of Conduct.
For development setup, see DEVELOPMENT.md.
Version: 0.10.0 Status: 🚧 Active Development
MIT License - see LICENSE for details
The docs and sample-code repositories will be used by the planned make install (full) command (see #52), providing pre-built documentation and sample code to avoid the initial 20+ hour crawl.
Note: This tool is for educational and development purposes. Respect Apple's Terms of Service when using their documentation.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mihaelamj-cupertino": {
"command": "npx",
"args": []
}
}
}