Skip to main content
Glama
README.md
# Emasoft Apple Documentation Plugin

<!--BADGES-START-->
[![Version](https://img.shields.io/badge/version-5.1.0-blue)](https://github.com/Emasoft/emasoft-apple-documentation-plugin/releases)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
<!--BADGES-END-->

Apple Developer Documentation for Claude Code: search iOS, macOS, watchOS, tvOS and visionOS documentation, frameworks, APIs, SwiftUI, UIKit and WWDC videos, and get Swift/Objective-C code examples, API references and technical guides directly in your Claude Code session. The plugin bundles an MCP (Model Context Protocol) server, so installing the plugin is all it takes.

The plugin also ships 13 skills (`/emasoft-apple-documentation-plugin:eadp-<name>`): Apple documentation search, Apple SDK release notes per platform, and Claude Code docs search and changelog (see [Skills](#skills)).

This plugin (`emasoft-apple-documentation-plugin`) is based on [kimsungwhee/apple-docs-mcp](https://github.com/kimsungwhee/apple-docs-mcp) by kimsungwhee (MIT license). It is an independent fork, repackaged as a Claude Code plugin; it is not published to npm.

**English** | [日本語](README.ja.md) | [한국어](README.ko.md) | [简体中文](README.zh-CN.md)

**Table of contents**

- [Quick start](#quick-start)
  - [Requirements](#requirements)
  - [From a Claude Code session](#from-a-claude-code-session)
  - [From a terminal](#from-a-terminal)
  - [Update and uninstall](#update-and-uninstall)
  - [Troubleshooting](#troubleshooting)
- [Features](#features)
- [Usage examples](#usage-examples)
  - [Search and documentation access](#search-and-documentation-access)
  - [Apple Design and HIG](#apple-design-and-hig)
  - [Frameworks, APIs and platforms](#frameworks-apis-and-platforms)
  - [Updates, overviews and sample code](#updates-overviews-and-sample-code)
  - [WWDC videos](#wwdc-videos)
  - [Advanced usage](#advanced-usage)
- [Skills](#skills)
  - [Release-notes skills](#release-notes-skills)
- [Tools](#tools)
- [Technical architecture](#technical-architecture)
  - [Performance features](#performance-features)
  - [Caching strategy](#caching-strategy)
- [WWDC data](#wwdc-data)
- [Configuration](#configuration)
  - [Jev semantic selection (on by default when a key is set, paid)](#jev-semantic-selection-on-by-default-when-a-key-is-set-paid)
- [Claude Code docs search (requires Jev)](#claude-code-docs-search-requires-jev)
- [Development](#development)
- [Contributing](#contributing)
- [License](#license)
- [Disclaimer](#disclaimer)

## Quick start

### Requirements

- [Claude Code](https://code.claude.com/docs/en/overview)
- `node` (Node.js 22 or later) on your `PATH`. Claude Code runs the bundled server with `node`, and its native installer does not ship Node.js. Check with `node --version`.
- About 11 MB of disk space for the WWDC data, downloaded once the first time a WWDC tool is used (see [WWDC Data](#wwdc-data)).

### From a Claude Code session

```text
/plugin marketplace add Emasoft/emasoft-plugins
/plugin install emasoft-apple-documentation-plugin@emasoft-plugins
```

### From a terminal

```bash
claude plugin marketplace add Emasoft/emasoft-plugins
claude plugin install emasoft-apple-documentation-plugin@emasoft-plugins --scope user
```

Restart Claude Code (or run `/reload-plugins`) to activate the plugin, then run `/mcp` to check that the `apple-docs` server of this plugin is connected.

### Update and uninstall

```bash
claude plugin update emasoft-apple-documentation-plugin@emasoft-plugins
claude plugin uninstall emasoft-apple-documentation-plugin
```

### Troubleshooting

- **The server fails to start, or `/mcp` shows it as failed?** Claude Code launches the server with the command `node`. GUI apps do not always inherit the `PATH` of your shell: run `which node` in a terminal, and make sure that directory is on the `PATH` of the process that starts Claude Code. The plugin needs Node.js 22 or later.
- **`search_apple_docs` returning nothing, or erroring?** It depends on an undocumented Apple search backend (`devintserv.msc.sbz.apple.com`) that the search page of developer.apple.com uses internally. If Apple changes its response shape, `search_apple_docs` can break until this plugin catches up. `get_apple_doc_content`, `search_framework_symbols` and the WWDC tools do not depend on that endpoint and keep working.
- **`search_apple_docs` feels slow?** Apple streams the full result set, so a search typically takes 5 to 25 seconds (median about 10). Repeating the same query within 10 minutes is answered from a local cache.

## Features

- **Smart Search**: Intelligent search across Apple Developer Documentation for SwiftUI, UIKit, Foundation, CoreData, ARKit, and more
- **Complete Documentation Access**: Full access to the Apple JSON API for Swift, Objective-C, and framework documentation
- **Apple Design and HIG Access**: Read Human Interface Guidelines JSON, Apple Design pages, and Design Resources catalog entries
- **Design Resource Previews**: Return Apple-provided HIG images and resource thumbnails as MCP image content blocks
- **Downloadable Design Resources**: Download direct Apple-hosted templates, fonts, tools, and archives into a local MCP resource cache
- **Framework Index**: Browse hierarchical API structures for iOS, macOS, watchOS, tvOS, visionOS frameworks
- **Technology Catalog**: Explore Apple technologies including SwiftUI, UIKit, Metal, Core ML, Vision, and ARKit
- **Documentation Updates**: Track WWDC 2025/2026 announcements, iOS 27, macOS 27, and latest SDK releases
- **Technology Overviews**: Comprehensive guides for Swift, SwiftUI, UIKit, and all Apple development platforms
- **Sample Code Library**: Swift and Objective-C code examples for iOS, macOS, and cross-platform development
- **WWDC Video Library**: Search WWDC 2014-2026 sessions with transcripts, Swift/SwiftUI code examples, and resources (the data is downloaded once, on first use)
- **Related APIs Discovery**: Find SwiftUI views, UIKit controllers, and framework-specific API relationships
- **Platform Compatibility**: iOS 13+, macOS 10.15+, watchOS 6+, tvOS 13+, visionOS compatibility analysis
- **High Performance**: Optimized for Xcode, Swift Playgrounds, and AI-powered development environments
- **Smart UserAgent Pool**: Intelligent UserAgent rotation system with automatic failure recovery and performance monitoring
- **Multi-Platform**: Complete iOS, iPadOS, macOS, watchOS, tvOS, and visionOS documentation support
- **Beta and Status Tracking**: Beta and newly released APIs, deprecated UIKit methods, new SwiftUI features tracking

## Usage examples

Ask Claude in plain language; it chooses the right tool. Examples:

### Search and documentation access

```text
"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"
"Find AVFoundation video playback APIs"
"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 NSManagedObjectContext documentation"
"Get URLSession async/await methods"
```

### Apple Design and HIG

```text
"Search Apple Design docs for layout"
"Read the HIG page about color"
"List Apple Design Resources for iOS templates"
"Download the Apple Design resource with this resourceId"
"Show Apple Design examples for the layout HIG page"
```

### Frameworks, APIs and platforms

```text
"Show me SwiftUI framework API index"
"List the UIKit classes whose name matches UIView*"
"Browse ARKit framework structure"
"Get WeatherKit API hierarchy"
"Explore Core ML model loading APIs"
"Show Vision framework image analysis APIs"
"Find APIs related to UIViewController"
"Show me similar APIs to withAnimation"
"Get all references from SwiftData documentation"
"Discover alternatives to Core Data NSManagedObject"
"List all Beta frameworks in the latest iOS"
"Show me Graphics & Games technologies"
"What machine learning frameworks are available?"
"Analyze platform compatibility for Vision framework"
```

### Updates, overviews and sample code

```text
"Show me the latest WWDC updates"
"What is new in SwiftUI?"
"Get technology updates for iOS"
"Show me release notes for Xcode"
"Find beta features in the latest updates"
"Show me technology overviews for app design and UI"
"Get comprehensive guides for games development"
"Explore AI and machine learning overviews"
"Show me iOS-specific technology guides"
"Get data management technology overviews"
"Show SwiftUI sample code projects"
"Find sample code for machine learning"
"Get UIKit example projects"
"Show featured WWDC sample code"
"Find Core Data sample implementations"
"Show only beta sample code projects"
```

### WWDC videos

```text
"Search WWDC videos about SwiftUI"
"Find WWDC sessions on machine learning"
"Show me WWDC 2026 videos"
"Search for async/await WWDC talks"
"Find WWDC videos about Swift concurrency"
"Show accessibility-focused WWDC sessions"
"Get details for WWDC session 10176"
"Show me the transcript for WWDC23 session on SwiftData"
"Get code examples from WWDC video 10019"
"Show resources from Vision Pro WWDC session"
"Get transcript for the Meet async/await in Swift session"
"List all WWDC topics"
"Show me Swift topic WWDC videos"
"Get WWDC videos about developer tools"
"List WWDC videos from 2023"
"Show all SwiftUI and UI frameworks sessions"
"Get machine learning WWDC content"
```

### Advanced usage

```text
"Find related APIs for @State with platform analysis"
"Resolve all references from SwiftUI documentation"
"Get platform compatibility analysis for Vision framework"
"Find similar APIs to UIViewController with deep search"
```

## Skills

The plugin ships 13 skills. Invoke one as `/emasoft-apple-documentation-plugin:eadp-<name>` (`eadp` stands for Emasoft Apple Documentation Plugin). Every skill except `eadp-the-skills-menu` (a catalog that agents load to pick a skill) reads documentation live through the bundled `apple-docs` MCP server and cites the pages it relies on instead of answering from memory.

| Skill | Invocation | What it does |
|-------|------------|--------------|
| `eadp-apple-docs-search` | `/emasoft-apple-documentation-plugin:eadp-apple-docs-search` | Looks up official Apple documentation: Swift, SwiftUI, UIKit, AppKit and Objective-C APIs, availability and deprecations, Human Interface Guidelines, design resources, sample code, technology overviews and WWDC sessions |
| `eadp-apple-ios-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-ios-sdk-changelog` | iOS SDK release notes (from 13.1 on, one shared "iOS & iPadOS" page per version) |
| `eadp-apple-ipados-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-ipados-sdk-changelog` | iPadOS SDK release notes (an alias of the shared "iOS & iPadOS" page; iPadOS 16 has its own page) |
| `eadp-apple-macos-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-macos-sdk-changelog` | macOS SDK release notes (AppKit and Foundation topic pages are excluded and counted in the header) |
| `eadp-apple-safari-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-safari-sdk-changelog` | Safari release notes (Safari Technology Preview is not covered) |
| `eadp-apple-swift-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-swift-sdk-changelog` | Swift toolchain notes read from the Xcode release notes; the argument is an Xcode version, never a Swift version |
| `eadp-apple-tvos-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-tvos-sdk-changelog` | tvOS SDK release notes |
| `eadp-apple-visionos-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-visionos-sdk-changelog` | visionOS SDK release notes (the first page is visionOS 1.0; Apple has published no visionOS patch page) |
| `eadp-apple-watchos-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-watchos-sdk-changelog` | watchOS SDK release notes |
| `eadp-apple-xcode-sdk-changelog` | `/emasoft-apple-documentation-plugin:eadp-apple-xcode-sdk-changelog` | Xcode release notes, including their Swift toolchain sections |
| `eadp-cc-changelog` | `/emasoft-apple-documentation-plugin:eadp-cc-changelog` | Claude Code changelog for one version, an interval or the newest |
| `eadp-cc-docs-search` | `/emasoft-apple-documentation-plugin:eadp-cc-docs-search` | Looks up the official Claude Code documentation (code.claude.com/docs) instead of answering from memory |
| `eadp-the-skills-menu` | not user-invocable | Catalog of the skills of this plugin; agents load it with `Skill()` to pick a downstream skill at runtime |

### Release-notes skills

The nine Apple SDK changelog skills (`eadp-apple-*-sdk-changelog`) each take a version (`18`, `18.4`), an interval (`17-18`), `latest N` or nothing for the newest, and read the release notes through the one tool `get_apple_sdk_changelog`. This is a deterministic read: no Jev, no cost. The version must exist for that platform (for example watchOS has no 18). The Swift skill takes an Xcode version, such as `26`, and reads the Swift toolchain notes from the Xcode release notes.

`/emasoft-apple-documentation-plugin:eadp-cc-changelog <semver version or interval, empty = most recent>` reads the Claude Code changelog for one version (`2.1.300`), an interval (`2.1.300-2.1.310`) or the newest version through `get_claude_code_changelog`.

## Tools

The bundled MCP server is named `apple-docs` inside the plugin, so Claude Code shows each tool as `mcp__plugin_emasoft-apple-documentation-plugin_apple-docs__<tool>`: the tool `search_apple_docs` appears as `mcp__plugin_emasoft-apple-documentation-plugin_apple-docs__search_apple_docs`. You never have to type these names: describe what you need and Claude picks the tool.

| Tool | Description | Key Features |
|------|-------------|--------------|
| `search_apple_docs` | Search Apple Developer Documentation | Official search API, find specific APIs, classes, methods |
| `get_apple_doc_content` | Get detailed documentation content | JSON API access, optional enhanced analysis (related/similar APIs, platform compatibility) |
| `search_apple_design_docs` | Search Apple Design and HIG content | HIG JSON references, Design pages, Design Resources catalog |
| `get_apple_design_content` | Read Apple Design and HIG pages | HIG JSON rendering, HTML fallback for `/design/` pages |
| `list_apple_design_resources` | List Apple Design Resources | Stable resource IDs, category/platform/format filters, previews and links |
| `download_apple_design_resource` | Download direct Apple Design resources | Local cache, MCP `resource_link` blocks, `resources/read` blob access |
| `get_apple_design_examples` | Return Apple Design visual examples | MCP `image` blocks with base64 data and MIME type |
| `list_technologies` | Browse all Apple technologies | Category filtering, language support, beta status |
| `search_framework_symbols` | Search symbols in specific framework | Classes, structs, protocols, wildcard patterns, type filtering |
| `get_related_apis` | Find related APIs | Inheritance, conformance, "See Also" relationships |
| `resolve_references_batch` | Batch resolve API references | Extract and resolve all references from documentation |
| `get_platform_compatibility` | Platform compatibility analysis | Version support, beta status, deprecation info |
| `find_similar_apis` | Discover similar APIs | Official Apple recommendations, topic groupings |
| `get_documentation_updates` | Track Apple documentation updates | WWDC announcements, technology updates, release notes |
| `get_technology_overviews` | Get technology overviews and guides | Comprehensive guides, hierarchical navigation, platform filtering |
| `get_sample_code` | Browse Apple sample code projects | Framework filtering (with limitations), keyword search, beta status |
| `list_wwdc_videos` | Browse WWDC video sessions | Offline transcripts and code, topic/year filtering |
| `search_wwdc_content` | Full-text search of WWDC transcripts and code | Specific discussions, API mentions, implementation examples |
| `get_wwdc_video` | Get a complete WWDC session | Full transcript, code examples, resources |
| `get_wwdc_code_examples` | Browse code examples from WWDC sessions | Implementation patterns with session context |
| `browse_wwdc_topics` | List WWDC topic categories with their IDs | Topic IDs usable as filters in `list_wwdc_videos` |
| `find_related_wwdc_videos` | Discover sessions related to a video | Prerequisites, follow-up sessions, similar talks |
| `list_wwdc_years` | List all available WWDC years | Conference years with video counts and statistics |
| `search_claude_code_docs` | Search the Claude Code documentation | Live index of code.claude.com/docs plus llms-full.txt, returns a short answer and a report file with the full section text, requires Jev |
| `get_claude_code_doc_content` | Read a Claude Code docs page or section | Page URL or one section by its sectionId |
| `get_claude_code_changelog` | Read specific Claude Code versions from the changelog | Exactly one of `latest`, `version` (X.Y.Z) or `fromVersion`/`toVersion` (X.Y.Z or X.Y; a partial X.Y covers every X.Y.z), plus optional `fromDate`/`toDate` (YYYY-MM-DD, inclusive; enough on their own, or narrowing any one mode) and optional `tags` (bracketed bullet tags such as VSCode, matched as whole words ignoring case) and `categories` (Added, Changed, Improved, Fixed; Fixed also matches "N bug fixes", Improved "N improvements") that keep only the matching bullets of those versions; optional `source` (`official`, the default, or `extended`: the unofficial Piebald-AI changelog, CC BY 4.0, with `badges` `documented`/`wrong-version`/`undocumented` and a 1-based `page` when the answer is paged); returns only those version blocks, no Jev |
| `search_claude_code_changelog` | Search the Claude Code changelog by meaning and return the best matching versions | `query`; optional `latest`, `version`, `fromVersion`/`toVersion` or `allVersions` (default: newest 50 versions), plus optional `fromDate`/`toDate` (YYYY-MM-DD, inclusive; a date bound replaces the default newest 50 and narrows any one mode) and optional `tags` / `categories` (as above; applied after the scope, and Jev scores only the kept bullets); optional `source` (`official`, the default, or `extended`: the unofficial Piebald-AI changelog, CC BY 4.0, searched by whole item windows; the default extended scope is the newest 50 versions or fewer when the pool would pass its caps, and `tags`, `categories`, `fromDate`/`toDate` and `page` are rejected with it; about 3 cents per default extended search, an estimated 4 cents at most at the caps (not measured), Jev-reported 2026-11-28) with `badges` `documented`/`wrong-version`/`undocumented` to keep only those items; each listed version has a ready `get_claude_code_changelog` call; `maxResults` counts versions (1 to 20, default 5); needs Jev |

## Technical architecture

```text
emasoft-apple-documentation-plugin/
├── .claude-plugin/plugin.json        # Claude Code plugin manifest
├── .mcp.json                         # Registers the bundled MCP server (apple-docs)
├── servers/apple-docs/
│   ├── index.js                      # Committed esbuild bundle, the server users run
│   └── THIRD_PARTY_LICENSES.txt      # Licenses of the bundled dependencies
├── src/                              # TypeScript sources of the server
│   ├── index.ts                      # MCP server entry point with all tools
│   ├── tools/                        # MCP tool implementations (docs, design, WWDC, ...)
│   └── utils/                        # Cache, HTTP client, UserAgent pool, error handling
├── scripts/                          # build-bundle.mjs and publish.py
├── tests/                            # Jest test suites
└── package.json                      # Development dependencies and scripts (private)
```

### Performance features

- **Memory-Based Caching**: Custom cache implementation with automatic cleanup and TTL support
- **Smart UserAgent Pool**: Intelligent rotation system with automatic failure recovery and performance monitoring
- **Dynamic Headers**: Realistic browser headers generation (Accept, Accept-Language, User-Agent)
- **Smart Search**: Official Apple search API with enhanced result formatting
- **Enhanced Analysis**: Optional related APIs, platform compatibility, and similarity analysis
- **Error Resilience**: Graceful degradation with comprehensive error handling
- **Type Safety**: Full TypeScript with Zod runtime validation
- **Zero Runtime Dependencies**: The server ships as one bundled file, with no node_modules to install

### Caching strategy

| Content Type | Cache Duration | Cache Size | Reason |
|--------------|----------------|------------|--------|
| API Documentation | 30 minutes | 500 entries | Frequently accessed, moderate updates |
| Search Results | 10 minutes | 200 entries | Dynamic content, user-specific |
| Framework Indexes | 1 hour | 100 entries | Stable structure, less frequent changes |
| Technologies List | 2 hours | 50 entries | Rarely changes, large content |
| Documentation Updates | 30 minutes | 100 entries | Regular updates, WWDC announcements |
| Apple Design Content | 2 hours | 100 entries | HIG and Design pages are stable during a session |
| Apple Design Resources | 2 hours | 20 entries | Catalog metadata changes less often than page reads |

Downloaded Apple Design files are cached outside the plugin directory: in a temporary directory created per server process, or in the directory named by `APPLE_DOCS_MCP_CACHE_DIR` (see Configuration). They are exposed through MCP `resources/list` and `resources/read`.

## WWDC data

The WWDC video data (2014-2026) is **not shipped with the plugin**. The first call of a WWDC tool downloads one archive (about 11 MB: 1,400+ sessions with full transcripts, 19 topic categories) from the plugin's data release, checks its SHA-256 and extracts it into `${CLAUDE_PLUGIN_DATA}/wwdc-data/v2` (or into `wwdc-data/v2` under `APPLE_DOCS_MCP_CACHE_DIR`, or under `~/.cache/apple-docs-mcp`, when `CLAUDE_PLUGIN_DATA` is not set). Later calls, in any session, read it from disk. Starting the server and every other tool never download it. Videos, slides and sample projects are never downloaded: the WWDC tools only return their links.

To install the data offline or on a machine without access to GitHub, extract the archive yourself and point the plugin at it:

```bash
mkdir -p /path/to/wwdc-data
curl -L -o wwdc-data.tar.gz https://github.com/Emasoft/apple-docs-wwdc-data/releases/download/v2/wwdc-data.tar.gz
tar xzf wwdc-data.tar.gz -C /path/to/wwdc-data
export APPLE_DOCS_MCP_WWDC_DATA_DIR=/path/to/wwdc-data
```

The SHA-256 of the archive is `9e436884c29acb8ccef0b1077bc0713e1d380be513ba174cbf865fa7f17bc3bb`. If the download fails, the WWDC tools report an error naming the URL, the target directory and `APPLE_DOCS_MCP_WWDC_DATA_DIR`.

> **Note**: Update the plugin to get a newer WWDC data release.

## Configuration

The server reads these optional environment variables when it starts. Set them in the environment of the process that starts Claude Code, because a Claude Code launched from the GUI does not see variables exported in a shell profile (observed on Claude Code 2.1.285; not documented by Anthropic). To set them, either start Claude Code from a terminal where they are exported, or, on macOS, run `launchctl setenv NAME value` and then restart Claude Code (launchctl values do not survive a reboot).

| Variable | Description | Default |
|----------|-------------|---------|
| `APPLE_DOCS_MCP_CACHE_DIR` | Directory for downloaded Apple Design files (and, when `CLAUDE_PLUGIN_DATA` is not set, for the WWDC data) | A temporary directory per server process (WWDC data: `~/.cache/apple-docs-mcp`) |
| `APPLE_DOCS_MCP_WWDC_DATA_DIR` | Directory with an already extracted WWDC data archive; nothing is downloaded when it is set (see [WWDC Data](#wwdc-data)) | Unset: the data is downloaded on first use |
| `APPLE_DOCS_MCP_CACHE_MAX_BYTES` | Size limit of the download cache, in bytes | 1073741824 (1 GiB) |
| `MCP_DEBUG` | Set to `true` to enable debug logging | Off |
| `DEFAULT_ACCEPT_LANGUAGE` | Accept-Language header sent to Apple servers | `en-US,en;q=0.9` |
| `DISABLE_LANGUAGE_ROTATION` | Set to `true` to stop rotating the Accept-Language header | Off |
| `DISABLE_SEC_FETCH` | Set to `true` to drop the Sec-Fetch-* headers | Off |
| `DISABLE_DNT` | Set to `true` to drop the DNT header | Off |
| `SIMPLE_HEADERS_MODE` | Set to `true` to send minimal request headers | Off |
| `APPLE_DOCS_MCP_RANKING` | Default ranking route of `search_apple_docs` and `search_wwdc_content`: `classic` or `relevance` (see below) | `relevance` |
| `APPLE_DOCS_MCP_JEV_RERANK` | Jev semantic selection is on by default when a provider key is found; set to `0` to turn it off, `1` to require it (see below); any other value is an error | Unset (Jev on when a key is found) |
| `APPLE_DOCS_MCP_JEV_PROVIDER` | Jev provider: `typesafe`, `openrouter` or `gateway`; when unset, `OPENROUTER_API_KEY` is used if set, else `TYPESAFE_API_KEY` | Auto-detected |
| `TYPESAFE_API_KEY` | API key for the `typesafe` provider | None |
| `OPENROUTER_API_KEY` | API key for the `openrouter` provider | None |
| `JEV_GATEWAY_URL`, `JEV_GATEWAY_API_KEY` | URL and API key for the `gateway` provider | None |

The server includes a pool of 12+ pre-configured UserAgent strings (Chrome, Firefox, Safari and Edge on macOS, Windows and Linux) that it rotates with automatic failure recovery.

### Jev semantic selection (on by default when a key is set, paid)

`search_wwdc_content` and `search_apple_docs` can use the Jev relevance-scoring service to narrow their results to the few that best match the query (5 by default, up to 20), each printed with a relevance score. It is on by default whenever a key is found: `OPENROUTER_API_KEY` is used if set, else `TYPESAFE_API_KEY`; or choose a provider with `APPLE_DOCS_MCP_JEV_PROVIDER` and set that provider's key (`TYPESAFE_API_KEY`, `OPENROUTER_API_KEY`, or `JEV_GATEWAY_URL` plus `JEV_GATEWAY_API_KEY`; `gateway` is used only when set explicitly). **Any such key in the environment means every search spends Jev credit**; the server prints one line on stderr at start naming the provider and the off switch. Set `APPLE_DOCS_MCP_JEV_RERANK=0` to turn Jev off whatever keys exist. `APPLE_DOCS_MCP_JEV_RERANK=1` with no resolvable provider and any value other than `0` or `1` are errors. With no key found, Jev is off and the Apple and WWDC searches run without selection.

If you exported one of these keys for another tool and do not want Jev, set `APPLE_DOCS_MCP_JEV_RERANK=0`.

- **Ranking route:** both tools accept `ranking`: `classic` or `relevance`. The default is `relevance`; `APPLE_DOCS_MCP_RANKING` overrides it and the tool argument overrides both. `classic` is the original behaviour: the original search and grouping for `search_apple_docs`, the substring match for `search_wwdc_content`. `relevance` is wide-recall. For `search_apple_docs` with Jev selection off, it runs the same single search as `classic` and only changes the ordering and grouping of the results; the wide recall happens only with selection on: up to 6 sub-queries derived from your query plus pages from the same documentation hierarchy as the best hits, from which Jev chooses. For `search_wwdc_content` it uses relaxed matching (any query word, prefixes, one typo tolerated) ranked by how many query words a video covers. The latency figures below are for the first call after the server starts (each query ran in a fresh server process, so every figure includes starting the server and its first network connections); they are not per-search times. A running MCP server pays that start-up cost only once, and later calls in the same session are faster. `search_apple_docs` (real Apple requests): median of about 12 s on both routes with selection off and about 15 s on `relevance` with selection on (p90 about 25 s). `search_wwdc_content` runs on local data; on that first call `relevance` takes about 1.5-3x as long as `classic` (median about 8 s against 5 s with selection off). The worst case is the first read of the data files from disk: up to about 45 s for a broad one-word query such as "SwiftUI", where the same query took about 8-11 s once the files were cached. The 120 s deadline is the ceiling for `relevance` with selection on.
- **Top result and evaluation:** on the `relevance` route, `search_apple_docs` selection always keeps the direct top result of your original query first (marked as pinned) and lets Jev fill the remaining slots; pass `select: false` for the full list. With `ranking: 'classic'` and selection on, `search_apple_docs` prints the original unpinned, grouped output. In a 20-query evaluation, WWDC selection put the right session in the top 5 for 8 of 8 queries versus 5 of 8 without it, while for Apple documentation the direct top result was usually already right, which is why the `relevance` route always keeps it.
- **Parameters:** both tools accept `select` (`true` or `false`; the default is on whenever Jev is on, see above) and `maxResults` (1-20, default 5, ignored when selection is off). For list-style requests ("all X", "list every Y") pass `maxResults: 20` or `select: false`. `select: true` while Jev is not enabled is an error.
- **Weak and no-strong-match notices:** if the best score is below 0.50, the results carry the note "Weak match: the best score is ... These results are related to the query, not a confident answer; try shorter identifier-level queries." If no result scores above 0.30, only the best result (for `search_apple_docs` on the `relevance` route: the pinned top result plus Jev's best guess) is returned with a "No strong match" note. Only `search_apple_docs` on the `relevance` route states the 0.30 threshold and the best score in that note. The exact sentence differs by tool and route: the `classic` route of `search_apple_docs` says "no result scored above the relevance threshold" and ends "Treat the result below as a weak guess.", and `search_wwdc_content` prints "no video scored above the relevance threshold" on both routes.
- **`limit` in `search_wwdc_content`:** with selection on, `limit` is the recall width: that many videos, ranked by match count, are scored by Jev (maximum 256). When `limit` is omitted, every candidate up to 256 is scored. With selection off, `limit` keeps its meaning (default 20, maximum 100). When the scan matched more videos than were scored, the header reads "Selected N of M scored (of T matching)".
- **What is sent, and to whom:** with selection on, the query and, for each candidate, its title, summary (Apple documentation results only), URL, topics and, for WWDC, an excerpt of its first match (transcript or code) are sent to the provider you chose: `api.typesafe.ai` for `typesafe`, `openrouter.ai` for `openrouter`, or the URL in `JEV_GATEWAY_URL` for `gateway`, together with your API key. Nothing is sent when selection is off.
- **Cost:** it is a paid service, billed by the provider to your key. Measured order of magnitude: about $0.0001 for about 17 Apple documentation results, about $0.001 for about 90 WWDC candidates, up to about $0.003 at the 256-candidate maximum; a search with Jev selection on typically costs well under a cent. On the `classic` route, selection typically adds under 2 seconds; at most about 15 seconds when the provider is slow or retrying. The `relevance` route is slower (see Ranking route).
- **Fail fast:** when selection is on, any failure (a missing key, an invalid provider, a network or provider error after retries) returns an error instead of unranked results. Pass `select: false` to get the unfiltered results.

The selection design is ported from [jgrep](https://github.com/kyu1204/jgrep) (MIT).

## Claude Code docs search (requires Jev)

`search_claude_code_docs` searches the Claude Code docs: the index https://code.claude.com/docs/llms.txt (fetched live on every call) and llms-full.txt (about 11 MB, cached on disk and revalidated with If-Modified-Since on every call; a cold start downloads it). It returns a short answer and writes the full text of the matching sections to a report file. `get_claude_code_doc_content` reads a page URL (https://code.claude.com/docs/en/....md) or one section by its sectionId. `get_claude_code_changelog` reads the live changelog and returns only the requested version blocks (`latest` N, one `version`, or a `fromVersion`/`toVersion` range); reading the changelog page with `get_claude_code_doc_content` (whole page or any sectionId) is refused.
`search_claude_code_changelog` searches the live changelog by meaning with one Jev pass and returns the best matching versions (default: the newest 50 versions; widen with `allVersions: true` or a `fromVersion`/`toVersion` range; `maxResults` counts versions). Measured 2026-10-27: about 0.6 cents per default search, about 1.3 to 1.5 cents over all versions. With `source: "extended"` (the unofficial Piebald-AI changelog, CC BY 4.0) it searches whole item windows of 6 KB; the default scope is the newest 50 versions, or fewer when the pool would pass its caps (1,024 windows, 4 MiB), and the response header names the versions searched. `badges` (`documented`, `wrong-version`, `undocumented`) keep only those items; `tags`, `categories`, `fromDate`/`toDate` and `page` are rejected with it. Measured 2026-11-28 (Jev-reported): about 3 cents per default extended search, an estimated 4 cents at most at the caps (not measured). Each listed version has a ready `get_claude_code_changelog` call whose `page` is valid for the README revision (ETag) named in the response header. It needs Jev, like `search_claude_code_docs`.

- `maxPages` (1 to 10, default 3) is the number of pages the Jev page pass keeps, scored by their headings. The 20 best sections of the whole docs by BM25 are added regardless. One Jev pass then scores the windows of all those sections. `maxResults` (1 to 20, default 5) is the number of sections listed. A value outside the range is an error. The query is limited to 2,000 characters after JSON encoding.
- The short answer has the query line; `Best match: strong | weak | none (best score X)`; `Report: <absolute path>`; one line per listed section (`page > heading path | sectionId | score | report lines A-B (best window C-D)`); the changelog pointer line when the changelog matches; the best-scoring window of section #1, verbatim and labelled as a partial view; and the Jev usage line. `strong` means a best score of at least 0.5. `weak` (at least 0.3) and `none` are indeterminate: read the pointed report lines before concluding. A band is never a verdict that the docs do not cover the topic.
- The report file is Markdown. It holds the full text of every reported section, code blocks intact and never truncated, grouped by page: every section scoring at least 0.3 (at least the best one, at most 4 times `maxResults`). The folder is `APPLE_DOCS_MCP_REPORTS_DIR` (must be absolute), else `$CLAUDE_PROJECT_DIR/reports_dev/cc-docs-search/`, else a folder under the system temporary directory. The name is `<YYYYMMDD_HHMMSS+HHMM>-<query-slug>.md`, with `-2`, `-3` on a clash. The server never deletes reports. It reads `$CLAUDE_PROJECT_DIR` when it starts; MCP clients other than Claude Code do not set it and get the temporary folder.
- Read the `Best match` line and the #1 window first, then the listed report line ranges (or grep the report). Call `get_claude_code_doc_content` only for a section that is not in the report.
- The search requires Jev, which is on by default when `OPENROUTER_API_KEY` or `TYPESAFE_API_KEY` (or `APPLE_DOCS_MCP_JEV_PROVIDER` and its key) is set (see the Jev section above). With `APPLE_DOCS_MCP_JEV_RERANK=0` or no key, the search fails at once, before any request. There is no fallback without Jev.
- Measured on 2026-11-29 (4 live queries, Jev-reported): 0.84 to 1.34 cents per search and 4.3 to 6.6 s per call. Two early runs took 22 s; their cause was not measured.
- Any fetch failure (no stale cache is served), any Jev failure, a report write failure or the 120 s deadline fails the whole call. There is no partial result and no unranked fallback.
- The plugin's `eadp-cc-docs-search` skill covers usage in detail. Its companion skill `eadp-cc-changelog` reads the changelog (see [Skills](#skills)).

## Development

This section is for maintainers; plugin users never need it. Requirements: Node.js 22 or later and pnpm (the version is pinned by `packageManager` in `package.json`).

```bash
pnpm install --frozen-lockfile   # install the development dependencies
pnpm build                       # regenerate servers/apple-docs/index.js and THIRD_PARTY_LICENSES.txt
pnpm typecheck                   # tsc --noEmit
pnpm lint                        # eslint src
pnpm test                        # Jest test suites
pnpm start                       # run the built stdio server (node servers/apple-docs/index.js)
```

- **The bundle is committed.** `servers/apple-docs/index.js` is what Claude Code runs, with no dependency installation step on the user machine. After changing anything under `src/` or a bundled dependency, run `pnpm build` and commit the result: a freshness test (`tests/bundle-freshness.test.ts`) fails when the committed bundle differs from a fresh build.
- **No npm or bun lockfile.** Claude Code runs `npm ci` in the plugin root when `package.json` sits next to a `package-lock.json`, `npm-shrinkwrap.json`, `bun.lock` or `bun.lockb`, which would install every development dependency on every user machine. This repository uses pnpm, whose lockfile Claude Code ignores. A guard test (`tests/plugin-lockfile-guard.test.ts`) fails if one of those files appears.
- **Dependency updates.** A cheerio upgrade must re-verify the redirect to its `load-parse` entry in `scripts/build-bundle.mjs` (run `pnpm build` and the standalone bundle test).
- **Release.** Releases are cut with the CPV canonical pipeline: `uv run python scripts/publish.py` (lint, validation, tests, version bump in `plugin.json`, `package.json` and `pyproject.toml`, changelog, tag, push and GitHub release). Nothing is published to npm.

## Contributing

Contributions are welcome! Here is how to get started:

1. **Fork** the repository
2. **Create** a feature branch: `git checkout -b feature/amazing-feature`
3. **Commit** your changes using Conventional Commits (checked by commitlint in CI): `git commit -m "feat: add amazing feature"`
4. **Push** to the branch: `git push origin feature/amazing-feature`
5. **Open** a Pull Request

## License

MIT License, see [LICENSE](LICENSE) for details. The original work is copyright kimsungwhee; additions are copyright Emasoft. The licenses of the dependencies bundled into the server are listed in [servers/apple-docs/THIRD_PARTY_LICENSES.txt](servers/apple-docs/THIRD_PARTY_LICENSES.txt).

## Disclaimer

This project is not affiliated with or endorsed by Apple Inc. It uses publicly available Apple Developer Documentation APIs for educational and development purposes.

---

[Report Issues](https://github.com/Emasoft/emasoft-apple-documentation-plugin/issues) • [Request Features](https://github.com/Emasoft/emasoft-apple-documentation-plugin/issues/new) • [Source](https://github.com/Emasoft/emasoft-apple-documentation-plugin)

TDQS

A3.7/5.0

Scored across 28 tools

Disambiguation3/5

Most tools map to a distinct sub-domain (Apple docs, design/HIG, WWDC, changelogs), but several clusters overlap: get_related_apis, find_similar_apis, and resolve_references_batch all promise 'discover related/alternative APIs', and get_documentation_updates, get_apple_sdk_changelog, and get_claude_code_changelog are three separate 'what changed' surfaces. search_apple_docs vs search_framework_symbols vs search_apple_design_docs are distinguishable by descriptions but require careful reading, and the Claude Code doc tools sit oddly inside an Apple-docs server.

Naming Consistency5/5

Every tool follows a clean snake_case verb_noun pattern with a small, predictable verb set (get_, search_, list_, find_, browse_, resolve_, download_). Wide-noun qualifiers are used consistently (search_apple_docs/search_apple_design_docs, get_apple_doc_content/get_apple_design_content), so naming alone makes the pairing structure legible.

Tool Count3/5

28 tools is heavy; even though the server legitimately spans Apple dev docs, HIG/design resources, WWDC archives, and two changelog sources, the count pushes past comfortable scanning. The four Claude Code documentation tools add surface area unrelated to the apparent Apple-docs purpose, tipping an otherwise justified set into over-stuffed territory.

Completeness4/5

Coverage is broad: search plus content retrieval for APIs, framework symbol browsing, technology overviews, platform compatibility, sample code, WWDC videos/transcripts/code examples, design resources with download, and release notes. Minor gaps remain — no direct symbol-detail endpoint (must route through generic page content) and no forums/community or symbol-index lookup — but agents can work around these.

Maintenance

ActivityActive
ResponsivenessOutdated data