apple-docs
This MCP server provides offline Apple Developer Documentation search and retrieval for coding agents.
Discover and filter Apple frameworks/technologies.
Search symbols by exact name, wildcard, or conceptual query across frameworks/platforms.
Perform hybrid semantic search for natural-language intent and behavioral/UI concepts.
Retrieve detailed symbol documentation, including Swift declarations, parameters, deprecation notices, and examples.
Optionally scope searches or docs to a specific framework and filter by platform or symbol type.
Check server version and index/search status.
Provides instant, offline-first access to Apple Developer Documentation, including symbol search across Apple frameworks, rich documentation retrieval, and technology discovery.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@apple-docs Get docs for SwiftUI's NavigationStack"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apple Developer Documentation MCP Server & Plugin
High-performance MCP server and Antigravity/Hermes plugin featuring Hybrid Semantic Search and offline Apple Developer Documentation.
Gives coding agents (Claude Code, Cursor, Windsurf, Antigravity, Hermes) deep understanding of Apple frameworks β allowing agents to search by natural-language behavior, concepts, and intent, not just exact symbol names.
Highlights
π§ Hybrid Semantic Search: Combines dense vector embeddings with SQLite FTS5 BM25 via Reciprocal Rank Fusion (RRF). Finds the right APIs even when your query shares zero words with the symbol name.
π Cross-Framework Query Expansion: Seamlessly bridges Web, React, and Android idioms (
useEffect,SharedPreferences,Flexbox,coroutine,AsyncStorage) into native Apple symbols (task,onAppear,AppStorage,HStack,VStack,Spacer).π οΈ One-Click IDE Configuration CLI: Safely configure Cursor, Claude Desktop, Windsurf, Antigravity, and VS Code with
apple-doc-plugin install --target <ide>.β‘ 95,899 Symbols Offline: Ships with a pre-indexed database covering all 21 core Apple frameworks (SwiftUI, UIKit, Foundation, Security, AVFoundation, WebKit, RealityKit, Vision, StoreKit, MapKit, CoreData, SwiftData, Combine, AppKit, Swift, Observation, CoreLocation, AuthenticationServices, LocalAuthentication, and more) across both Swift and Objective-C/C symbol trees.
π― Dual Semantic Engines: Run hosted embeddings with Google Gemini (
gemini-embedding-2) or 100% offline on Apple Silicon Metal with local GGUF (embeddinggemma-2).π Lexical Precision & Wildcards: Full support for wildcard globbing (
Grid*,*Style,Navigation*View), exact-title boosting, and kind aliasing (funcβmethod).π DocC AST to Agent Markdown: Formats Apple DocC JSON into concise Markdown with method signatures, parameter tables, deprecation notices, and live CDN fallback.
π©Ί Instant Diagnostics & Setup: Built-in
apple-doc-plugin setupandapple-doc-plugin doctorcommands verify database integrity, vector dimensions, and embedding providers in seconds.
The Power of Semantic Search & Cross-Framework Recall
Traditional documentation tools require you to know the exact symbol name in advance. But when developers and AI agents build apps, they search for behaviors, lifecycle events, and cross-platform idioms:
The right-hand column below was produced by the hybrid engine with
gemini-embedding-2. In lexical-only mode (no vectors configured) the same queries fall back to keyword matching and return much weaker results β runnpm run download-vectorsornpm run embed-indexto enable hybrid search. The localembeddinggemma-2model has a measurably lower ceiling on behavioral queries; see Provider quality.
What You Ask / What Agent Searches | How Keyword Search Fails | What |
"prevent sheet swipe dismiss" | 0 matches (words don't match) |
|
"code that runs when screen appears" | Matches random functions named |
|
"react useEffect equivalent" | 0 matches (React terminology) |
|
"android shared preferences storage" | 0 matches (Android terminology) |
|
"display: flex layout" | 0 matches (CSS Flexbox terminology) |
|
"three column navigation layout" | Matches generic |
|
"dismiss keyboard on tap outside" | 0 matches (the symbol is not named) |
|
Comprehensive Framework Coverage: The offline database includes complete coverage for Security (Keychain Services with
SecItemAdd), WebKit (WKWebView), AVFoundation (AVPlayer), StoreKit (SKPaymentQueue), MapKit (MKMapView), CoreData (NSManagedObject), RealityKit (Entity), Vision (VNRecognizeTextRequest), AuthenticationServices (ASAuthorizationAppleIDProvider), and LocalAuthentication (LAContext). See Coverage for detailed framework breakdowns.
How the Hybrid Engine Works
User / Agent Query ("react useEffect equivalent" or "prevent sheet swipe down")
β
ββββΊ Query Expansion Layer: Maps 18+ Web/React/Android idioms into native Apple symbols
β
ββββΊ Lexical Branch: SQLite FTS5 (BM25 + Exact Name Boost + Mapped Symbol Bonus)
β
ββββΊ Semantic Branch: Dense Vector Embedding (Gemini or Local GGUF)
ββ Enriched context prompt against 19,473 Apple DocC vectors
β
βΌ
Reciprocal Rank Fusion (RRF, k=60)
β
βΌ
Ranked, Deduplicated Results with Runnable get_documentation LinksZero Demotion Risk: Exact symbol matches receive an explicit boost so lexical precision is never sacrificed for semantic breadth.
Enriched Member Abstracts: Includes backfilled view modifiers, initializers, and methods so modifiers like
.interactiveDismissDisabled()are indexed by behavior.Calibrated Similarity Thresholds: Uses empirically tuned cosine floors (
0.65for Gemini,0.68for Gemma) to filter background noise while surfacing relevant API families.Real fusion, no duplicates: Symbol vectors are stored under
sym-<symbolId>; the fusion layer maps that back to the symbol id so a document found by both retrievers is emitted once withsource: "hybrid"instead of appearing twice.
Related MCP server: Apple RAG MCP
Quick Install & Setup (Zero Clone Required)
Run directly via npx without cloning or building from source:
1. One-Click IDE / Agent Configuration (Recommended)
Automatically detect and configure your coding assistant's MCP configuration with portable npx execution:
# Target Cursor
npx apple-doc-plugin install --target cursor
# Target Claude Desktop
npx apple-doc-plugin install --target claude-desktop
# Target Windsurf
npx apple-doc-plugin install --target windsurf
# Target Antigravity
npx apple-doc-plugin install --target antigravity
# Target VS Code
npx apple-doc-plugin install --target vscode(Pass --dry-run to preview changes without modifying disk, --local to link a local repository clone, or --env GEMINI_API_KEY=... to attach API credentials).
2. First-Run Setup & Vector Bootstrap
Verify your installation, inspect database integrity, and optionally bootstrap offline vector assets:
# Verify health and search mode
npx apple-doc-plugin setup
# Automatically download pre-computed 768-d vectors and configure Cursor
npx apple-doc-plugin setup --download-vectors --target cursor3. Manual MCP Configuration (Optional)
If preferred, drop this directly into your MCP configuration (claude_desktop_config.json, .cursor/mcp.json, etc.):
{
"mcpServers": {
"apple-docs": {
"command": "npx",
"args": ["-y", "apple-doc-plugin"],
"env": {
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
}
}
}
}(Tip: GEMINI_API_KEY enables hybrid semantic search. If omitted, the server operates in offline lexical mode, or uses local embeddinggemma-2 if downloaded via npx apple-doc-plugin download-model).
4. Global CLI Installation
npm install -g apple-doc-plugin
apple-doc-plugin --help5. Antigravity Plugin
# Direct install
agy plugin install AndrewMason7/apple-doc-plugin
# Or from local clone
agy plugin install .6. Hermes Agent Plugin (Native)
hermes plugins install https://github.com/AndrewMason7/apple-doc-plugin.git
hermes plugins enable apple-doc-pluginBuilding From Source (Contributors)
If you are developing or contributing to apple-doc-plugin:
Prerequisites: Node.js β₯ 22 (node -v).
# 1. Clone & install dependencies
git clone https://github.com/AndrewMason7/apple-doc-plugin.git
cd apple-doc-plugin
npm install
npm run build
# 2. Run diagnostics
npm run doctornpm run doctor inspects your database, schema, and embedding setup:
β Node.js v24.x (or v26.x)
β Index file data/apple-docs.db (48.1 MB)
β Symbols 95,899 rows
β FTS index 95,899 rows
β Symbol kinds every row classified
β Framework attribution consistent with paths
β Embedding provider local-gguf (768-d) (or gemini)
β Semantic layer 0/100 vectors β hybrid search cannot engage; queries stay lexical
β npm run download-vectors (fast, bundled artifact)
β npm run embed-index (build locally)
β Vector dimensions no vectors stored
β Snapshot age 0 days old (from build metadata)
All checks passed (1 warning).Note: The shipped snapshot is immediately usable for fast offline lexical search (95,899 symbols). Run
npm run download-vectorsto import the bundled 768-d vector artifact (19,473 vectors) in seconds, ornpm run embed-indexto build them yourself. Either way the semantic layer flips toβand hybrid search engages.
Setting Up Semantic Search
The repository ships with lexical FTS5 ready out-of-the-box. Enabling the semantic layer gives you full hybrid vector search.
Option A: Pre-computed Vector Artifact (Fastest β No API Key)
The 768-d vector layer is bundled in the repository as a gzip-compressed SQLite artifact (~54 MB) and pinned by SHA-256. Importing it takes seconds and needs no embedding provider:
npm run download-vectors
npm run doctorThe command prefers the artifact already present under assets/ (repo clone / plugin install), so this works fully offline. It falls back to the mirrored URL only when the bundled file is missing, and verifies the checksum on every path.
The full hybrid database is ~113 MB, over GitHub's 100 MB file limit, which is why the corpus and the vectors ship as two files instead of one.
Option B: Hosted Gemini (Best Ranking)
Gemini embeddings (gemini-embedding-2) provide the highest conceptual ranking and fastest generation rate (~50 embeddings/second via batching). This is the provider the behavioral examples in this README were verified against.
Get an API key from Google AI Studio (free tier available).
Configure your environment:
cp .env.example .env echo "GEMINI_API_KEY=your-api-key" >> .envGenerate the vector embeddings:
# Generates ~19,400 symbol embeddings with member abstracts in ~5 minutes npm run embed-indexVerify status:
npm run doctorThe semantic layer will now display
βand hybrid search is immediately engaged.
Option C: Local GGUF (100% Offline & Private)
Run vector embeddings completely on-device using EmbeddingGemma via Apple Silicon Metal acceleration:
# 1. Download model into local cache (~309 MB)
mkdir -p ~/.cache/apple-docs/models
hf download unsloth/embeddinggemma-2-GGUF embeddinggemma-2-Q8_0.gguf --local-dir ~/.cache/apple-docs/models
# 2. Embed the symbol layer
npm run embed-indexProvider quality
The two embedding backends are not equivalent on behavioral queries. Measured on the shipped corpus (top result for each query):
Query |
|
|
"prevent sheet swipe dismiss" |
|
|
"code that runs when screen appears" |
|
|
"three column navigation layout" |
|
|
"dismiss keyboard on tap outside" |
|
|
"biometric authentication view" |
|
|
|
|
|
The 270M local backbone has a real ceiling over terse one-line abstracts: it is fine for exact names and concept-level matches, and misses many intent-style paraphrases. Use Gemini when ranking quality matters, and the local model when privacy/offline matters more.
MCP Tools Reference
The server exposes dedicated tools designed specifically for AI agent pair programming:
Tool | Purpose | When to Use | Example Query |
| Hybrid Semantic Search | Default tool for agents. Use when you know what you want to achieve, describe UI concepts, or ask behavioral questions. |
|
| Fast Lexical Search | Use when searching for specific names, prefix/suffix wildcards ( |
|
| Full Documentation Lookup | Use to inspect parameters, return types, code declarations, and discussion. Supports |
|
| Framework Discovery | Use to discover available Apple frameworks in the database and see symbol counts. |
|
| Index & Health Status | Inspect server version, search mode ( |
|
Search Modes Compared
Capability | Offline Lexical (Default) | Hybrid Semantic (Embedded) |
Primary Tool |
|
|
Ranking Algorithm | SQLite FTS5 (BM25) | Reciprocal Rank Fusion (BM25 + Cosine Vectors) |
Query Type | Exact names, wildcards ( | Natural language, concepts, behaviors |
Requirements | Node.js 22+ (shipped database) | Vector artifact, Gemini Key, or local GGUF ( |
Network Access | 100% Offline | 100% Offline (bundled artifact or GGUF) or Gemini API |
Coverage
The snapshot holds 95,899 symbols across 25 indexed frameworks (with at least 25 symbols each), covering both Swift and Objective-C/C symbol trees:
Indexed framework | Symbols | Indexed framework | Symbols | |
Swift | 18,442 | CoreData | 1,170 | |
Foundation | 13,013 | Combine | 1,062 | |
AppKit | 12,654 | SwiftData | 552 | |
UIKit | 11,449 | CoreLocation | 474 | |
Security | 7,331 | RegexBuilder | 462 | |
SwiftUI | 7,202 | LocalAuthentication | 246 | |
RealityKit | 6,235 | Synchronization | 196 | |
AVFoundation | 5,614 | Distributed | 93 | |
WebKit | 3,193 | BundleResources | 88 | |
Vision | 1,915 | ObjectiveC | 77 | |
StoreKit | 1,531 | AVFAudio | 45 | |
AuthenticationServices | 1,473 | Observation | 37 | |
MapKit | 1,299 |
Cross-reference targets (pages linked from indexed frameworks): visionOS (22), Xcode (11), PassKit (6), WidgetKit (4), AVKit (3).
What this means in practice:
First-Class Platform Coverage: Core platform frameworks including Security (Keychain Services), WebKit, AVFoundation, StoreKit, MapKit, CoreData, RealityKit, Vision, AuthenticationServices, and LocalAuthentication are fully indexed offline.
Full C Function and Swift Method Resolution: Both bare C function names (e.g.,
SecItemAdd) and standard Swift types/methods (WKWebView,MKMapView,SKPaymentQueue,AVPlayer,NSManagedObject,LAContext) resolve cleanly viasearch_symbolsandget_documentation.Hybrid Semantic Search: Semantic vectors are available for 19,473 core framework symbols via
npm run download-vectors(or local embedding vianpm run embed-index). All 95,899 symbols across all 21 core frameworks remain fully discoverable by name, kind, and signature via lexical search and point documentation lookup.
MCP Resources & Prompts
In addition to tools, apple-doc-plugin implements native MCP Resources and Prompts:
Resources:
apple-docs://frameworks: Returns JSON metadata and exact primary symbol counts for all 21 core frameworks (see Coverage).apple-docs://symbols/{framework}: Returns a clean catalog of primary types, protocols, and macros for any indexed framework (e.g.apple-docs://symbols/SwiftUI).
Prompts:
modernize-navigation: Automated migration template from legacyNavigationViewtoNavigationStack/NavigationSplitView.scaffold-swiftdata: Scaffold@Modelschemas, container configuration, and SwiftUI@Queryview bindings.audit-deprecation: Audit Swift/SwiftUI code against modern deployment targets and flags deprecated APIs.
Configuration
Settings can be specified in .env or passed via your MCP server environment config:
Variable | Default | Description |
| none | Gemini API key for hosted semantic search and embeddings. |
|
| Force provider: |
|
| Path to local |
|
| MRL vector dimensions ( |
|
| Custom path to the SQLite documentation database. |
| bundled asset, then mirror | Override the vector artifact URL. The artifact already under |
CLI & Database Commands
The executable CLI supports standalone commands and subcommands:
Command | Description |
| Run 10-point health check ( |
| Import the bundled (or mirrored) gzip 768-d vector artifact with SHA-256 verification and mirror failover. |
| Export semantic vector bundle into verifiable standalone SQLite package with companion manifest and hash. |
| Directly ingest and index offline |
| Automated download of local GGUF ( |
| Generate or resume vector embeddings for hybrid search ( |
| Fix framework attribution and symbol kinds in place without re-crawling ( |
| Build standalone native runner and release distribution archive. |
| Run complete test suite (372 tests). |
| Run TypeScript typechecking and Prettier verification. |
Standalone Distribution & Homebrew
Homebrew (macOS)
Install via Homebrew using the official formula:
brew install packaging/homebrew/apple-doc-plugin.rbStandalone Binary Packaging
Build a self-contained executable runner and release tarball:
./scripts/build-binary.sh --tarballProduces bin/apple-doc-plugin-native and dist/apple-doc-plugin-<version>-<platform>.tar.gz.
Troubleshooting
Check health first: Run
npm run doctorβ every warning or failure includes a recommended fix command.Native addon compilation: If
npm installfails compilingbetter-sqlite3, install native build tools (xcode-select --installon macOS, orbuild-essentialon Linux).Full Troubleshooting Guide: See docs/TROUBLESHOOTING.md for in-depth solutions for every diagnostic check.
Prior Art
The MCP tool contract follows conventions established by MightyDillah/apple-doc-mcp. While that project routes live queries to Apple's CDN on-the-fly, this project provides a high-speed local SQLite FTS5 database, Reciprocal Rank Fusion hybrid semantic search, DocC Markdown rendering, and integrated agent development rules.
License
MIT Β© 2026 Andrew Mason
Available Tools
7 toolschoose_technologyA
(Optional / Legacy) Select the framework/technology to scope subsequent searches and documentation lookups. In most cases, you can pass framework directly to search_symbols or get_documentation without setting session state.
Inputs: name, identifier.
current_technologyB
(Optional / Legacy) Report the currently selected technology in session state
Inputs: no named parameters.
discover_technologiesB
Explore and filter available Apple technologies/frameworks before choosing one
Inputs: page, query, pageSize.
get_documentationA
Get detailed documentation for specific symbols, including Swift syntax declarations, parameters, deprecation notices, and code examples. Can be optionally scoped to a framework directly via the framework argument without needing choose_technology.
Inputs: path (required), framework.
get_versionB
Get the current version information of the Apple Doc MCP server
Inputs: no named parameters.
search_symbolsA
Search Apple developer documentation with sub-millisecond symbol-first results across all indexed Apple frameworks. Can be optionally scoped to a framework (via the framework argument or choose_technology). Supports exact symbol resolution, wildcards (*, ?), and conceptual intent searches.
Inputs: query (required), platform, framework, maxResults, +1 more.
semantic_searchA
Search Apple Developer Documentation by natural language intent, behavioral description, or UI concept (powered by Gemini hybrid embeddings). Use this tool when you do not know the exact Apple API symbol name, or want to query layout patterns and conceptual behavior (e.g. "prevent sheet swipe dismiss", "background location tracking when screen is off", "store auth token securely in keychain", "react useEffect on mount equivalent").
Inputs: query (required), platform, framework, maxResults, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 7 tools
Most tools have clearly distinct roles: symbol search, semantic search, documentation retrieval, and technology discovery. search_symbols and semantic_search have some conceptual overlap since search_symbols also supports intent-based searches, but their descriptions make the primary intended use clear.
Tool names mostly follow a verb_noun pattern like search_symbols, get_documentation, and discover_technologies. current_technology breaks the pattern by being a state query rather than an action, and semantic_search is slightly inconsistent, but the overall convention is predictable.
Seven tools is well-scoped for an Apple documentation server. Each tool serves a clear purpose in the documentation discovery and retrieval workflow, without redundancy or unnecessary bloat.
The core workflows of searching for symbols, searching by concept, and retrieving detailed documentation are fully covered. Missing a dedicated browsing or listing API is a minor gap, but discover_technologies and scoped search largely compensate.
Maintenance
Related MCP Connectors
Search and read Apple developer documentation, HIG, and WWDC transcripts as Markdown.
Apple developer docs and WWDC transcripts with RAG retrieval and Jev relevance ranking.
Access and search Branch's official API documentation directly within any AI agent or client.
Search a curated catalog of agent skills, MCP servers and rules for Swift, SwiftUI, Xcode and iOS.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides AI agents with instant access to official Apple developer documentation, Swift programming guides, design guidelines, and Apple Developer YouTube content including WWDC sessions. Uses advanced RAG technology with semantic search and AI reranking to deliver accurate, contextual answers for Apple platform development.7-
- FlicenseNot gradedqualityNot gradedmaintenanceProvides AI agents with instant access to official Apple developer documentation, Swift docs, design guidelines, and Apple Developer YouTube content through advanced semantic and hybrid search capabilities. Features AI-powered reranking for accurate retrieval of Apple platform knowledge including iOS, macOS, watchOS, tvOS, and visionOS development resources.5-
- AlicenseBqualityFmaintenanceProvides AI assistants with access to Apple's Human Interface Guidelines and technical API documentation across all Apple platforms (iOS, macOS, watchOS, tvOS, visionOS), enabling unified search of design principles and implementation details.3168 npm21MIT
- AlicenseAqualityDmaintenanceProvides access to Apple's official developer documentation, frameworks, APIs, and WWDC session transcripts across all Apple platforms. It enables AI assistants to search technical guides, sample code, and platform compatibility information using natural language queries.18955 npm1,382MIT