Skip to main content
Glama
Ahmetshbzz
by Ahmetshbzz

apple-docs-mcp

An MCP server and CLI that search Apple Developer Documentation from Xcode's on-disk documentation index — fully offline, no network calls.

Coding agents recall Apple APIs from training data that lags the installed SDK. This server gives them the real text: signatures, availability, and code examples, straight from the documentation that Xcode already downloaded.

Why this exists

Xcode installs a local copy of the Apple Developer Documentation asset. It looks like a source an agent could read directly, but the prose is not readable in place:

  • index/index.json (104 MB) holds navigation nodes — path, title, type — and no prose. The keys abstract, declarationFragments, and primaryContentSections appear zero times.

  • cache.db stores 1269 compressed blobs whose header (9b21f31f) decodes under none of LZ4, LZFSE, zlib, LZMA, or LZBITMAP via Apple's libcompression.

  • documentation-db/index.sql (1.2 GB) is a vector store for Xcode's own semantic search, not text.

Xcode 27 exposes an MCP service with a DocumentationSearch tool that answers from this asset. Measured behavior: 19–20 documents per query with full contents and code examples, ~0.4 s median latency, and zero bytes of network traffic. This project wraps that tool so any MCP client can use it, and adds an offline framework index that needs no approval at all.

Related MCP server: Apple Deep Docs MCP

Install

Requires macOS, Xcode installed, and uv.

git clone https://github.com/Ahmetshbzz/apple-docs-mcp
cd apple-docs-mcp
uv sync

Install the CLI on your PATH:

uv tool install --editable .

Register with an MCP client

Claude Code:

claude mcp add apple-docs --scope user -- \
  uv run --quiet --project /path/to/apple-docs-mcp apple-docs-mcp

Codex (~/.codex/config.toml):

[mcp_servers.apple-docs]
command = "uv"
args = ["run", "--quiet", "--project", "/path/to/apple-docs-mcp", "apple-docs-mcp"]
startup_timeout_sec = 60

Tools

Tool

Purpose

search_docs

Search documentation by meaning; returns full text, code examples, uri, and score per result

list_frameworks

List every framework in the local index (~395). Offline, no approval needed

doc_status

Report whether search is usable right now, and why not if it is not

CLI

apple-docs search "SwiftData model inheritance" --framework SwiftData
apple-docs search "AVAudioSession category" --json
apple-docs frameworks
apple-docs status

Exit codes are distinct per failure so scripts can branch: 0 success, 1 usage, 2 not approved, 3 Xcode unavailable, 4 timeout, 5 protocol, 6 asset missing.

The approval dependency

This is the one thing to understand before using it.

search_docs drives mcpbridge, so Xcode must be running with an approved workspace:

xcrun mcp-server open <path-to-project>   # accept the dialog in Xcode
  • Approval is granted per process, not per user. A different interpreter needs its own approval.

  • Approval expires after 24 hours.

  • Approval requires an open workspace; the documentation search itself is global, so any project works.

Every failure returns a typed error with a remedy. The tool never returns an empty list to signal a problem, because an empty result is indistinguishable from "this API does not exist" — the exact confusion it exists to prevent.

list_frameworks reads index.json directly and needs none of this.

Development

uv run pytest tests/                 # 37 tests
uv run pytest tests/ -m integration  # live bridge tests
uv run ruff check src tests

Unit tests need no Xcode. Integration tests skip themselves when the bridge is absent or unapproved.

Architecture

One implementation, two interfaces. Business logic is not duplicated.

src/apple_docs_mcp/
├── bridge.py      # mcpbridge JSON-RPC client; owns the protocol and typed errors
├── frameworks.py  # offline index.json reader
├── responses.py   # shared JSON payload contract
├── cli.py         # argparse adapter
└── server.py      # MCP adapter

Verified environment

Measured 2026-09-17, not assumed:

Thing

Value

Xcode

27.0 (27A266a)

Swift

6.4 (swiftlang-6.4.0.34.1)

Simulator runtime

iOS 27.0 (24A434)

Documentation asset

Build 10M13950, ~1.6 GB, ~395 frameworks

License

MIT — see LICENSE.

Available Tools

3 tools
doc_statusA

Report whether documentation search is usable right now: asset presence, bridge path, and whether this process is approved to use Xcode's tools.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of disclosing behavior. It does so well by framing the tool as a pure report and listing the three checks it performs, which implicitly signals a non-mutating status operation. It could be more explicit about having no side effects, but 'Report whether' plus the enumerated checks provides strong transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence followed by a compact colon-separated list. Every phrase earns its place, and there is no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter status tool with an output schema available, the description covers what the tool reports, when it is relevant, and which aspects are checked. It could have explicitly instructed the agent to call it before search_docs, but nothing essential for invoking it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. There is no parameter information needed in the description, and the description does not attempt to add any because none is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Report') and a specific subject ('whether documentation search is usable right now'), then enumerates the scope: asset presence, bridge path, and Xcode approval. This clearly distinguishes it from sibling tools like search_docs and list_frameworks, which perform different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'usable right now' makes it clear this is a readiness/precondition check, so an agent understands to call it when it needs to verify documentation search is available before searching. It does not explicitly name alternatives or exclusion conditions, but the intended timing is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_frameworksA

List every framework in Xcode's local documentation index. Runs offline and needs no Xcode approval.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It meaningfully discloses that the tool runs offline and needs no Xcode approval, which addresses common permission and environment concerns. It does not describe ordering or other return details, but the output schema exists to cover return structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler; the first states the core purpose and the second adds two key behavioral constraints. Everything present earns its place, and the description is immediately scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter list operation with an output schema, the description is complete: it names the resource, clarifies it covers every framework, and adds offline/no-approval context. An agent has everything it needs to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so there is nothing for the description to explain about parameter usage. With 100% schema coverage of an empty schema, the baseline of 4 is appropriate, and no further parameter documentation is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and a precise resource ('every framework in Xcode's local documentation index'), making the tool's scope unmistakable. It clearly differentiates this from siblings like search_docs and doc_status by stating it enumerates all frameworks rather than searching or checking status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for when this tool is appropriate: when a complete framework list is needed, and it works offline without requiring Xcode approval. It does not explicitly name alternatives or exclusion conditions, but the usage context is clear enough for an agent to select it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_docsA

Search Apple Developer Documentation by meaning, using Xcode's local documentation index. Returns full document text including code examples, with each result's uri and match score. Use this before answering from memory about Swift or Apple platform APIs.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesNatural-language or API search query.
timeoutNoSeconds to wait for the bridge before failing.
frameworksNoRestrict the search to these frameworks, e.g. ['SwiftData'].

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the search is semantic ('by meaning'), uses a local Xcode index, and returns full document text with code examples, uri, and match score. It does not mention failure modes or side effects, but this is a read-only search operation and the core behavior is well conveyed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences with no filler. The first sentence states the core purpose, the second describes the return value, and the third gives actionable usage guidance. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, usage context, return contents, and the underlying local-index mechanism. An output schema exists to document the exact return shape, and the schema documents all parameters. It could add a note about prerequisites or when to use list_frameworks first, but it is otherwise complete for a search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds context about the search approach and return format but does not add meaning to the parameters themselves beyond what the schema already provides for query, timeout, and frameworks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: 'Search Apple Developer Documentation by meaning, using Xcode's local documentation index.' It also explains what is returned (full document text, code examples, uri, match score), making the tool's function unmistakable and distinct from the sibling tools list_frameworks and doc_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance: 'Use this before answering from memory about Swift or Apple platform APIs.' It does not explicitly mention when not to use it or alternatives, but the sibling tools are clearly different in purpose, so no exclusion is necessary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observeddoc_status
    • First observedlist_frameworks
    • First observedsearch_docs

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct role: search_docs finds documentation, list_frameworks enumerates available documentation domains, and doc_status reports tooling health. There is no meaningful overlap or ambiguity between them.

Naming Consistency4/5

search_docs and list_frameworks follow a clear verb_noun snake_case pattern, while doc_status is a noun_noun name rather than a verb-based one. The naming is still consistent in style and readable, but the health-check tool deviates slightly from the verb-led convention.

Tool Count5/5

Three tools is well-scoped for a documentation lookup server: one core search action, one discovery action, and one operational status check. Each tool clearly earns its place without redundancy or bloat.

Completeness4/5

The server covers the main documentation workflow well: searching docs, listing available frameworks, and verifying tool readiness. A direct fetch-by-URI option is missing, but since search_docs returns full document text, it is not a serious dead end.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides 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
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides comprehensive access to Apple's development documentation ecosystem including hidden Xcode docs, Swift Evolution proposals, GitHub repositories, and WWDC session notes. Enables developers to search and retrieve advanced Apple development resources not available through public channels.
    15
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides 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.
    18
    588 npm
    1,379
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides access to Apple documentation and WWDC transcripts with semantic, keyword, and hybrid search capabilities, enabling developers to quickly find relevant code examples and technical information.
    119
    MIT