Apple Docs MCP

repository·main·Indexed 23 days ago

https://github.com/kimsungwhee/apple-docs-mcp

A Model Context Protocol (MCP) server providing AI assistants with direct access to official Apple developer documentation, framework hierarchies, and WWDC video content. It enables natural language searching and technical retrieval for Swift, SwiftUI, UIKit, and other Apple technologies. Features include bundled WWDC data (2012-2025) with transcripts, platform compatibility analysis, and API exploration tools. Compatible with Claude Desktop, Cursor, VS Code, Windsurf, Zed, and Cline.

Tokens
8.5K
Snippets
17
Records
55
Agent score
77%

What's inside apple-docs-mcp

  1. Access bundled WWDC data

    main

    The npm package includes bundled WWDC video data (2014-2025), allowing for offline access and zero network latency for WWDC-related queries.

    Included Data:

    • 1,260+ WWDC session videos with full transcripts.
    • 20 topic categories for organized browsing.
    • 13 years of content (2012-2025).
    • 35MB of optimized JSON data.

    Note: To receive new WWDC content additions, you must update your package.

  2. Caching Strategy and TTLs

    main

    The server uses an intelligent LRU cache with optimized Time-To-Live (TTL) settings based on content type to balance performance and freshness:

    Content TypeCache DurationCache SizeReason
    API Documentation30 min500 entriesFrequent access, moderate updates
    Search Results10 min200 entriesDynamic content, user-specific
    Framework Index1 hour100 entriesStable structure, low change frequency
    Technology List2 hours50 entriesRarely changes, large content
    Documentation Updates30 min100 entriesPeriodic updates, WWDC announcements
    WWDC Video Data2 hoursUnlimitedStable content, local JSON files
  3. Review the Caching Strategy

    main

    To optimize performance and respect API limits, the server implements an in-memory cache with specific TTL (Time-To-Live) and capacity limits for different content types:

    Content TypeCache DurationCache SizeReason
    API Documentation30 minutes500 itemsFrequent access, moderate updates
    Search Results10 minutes200 itemsDynamic content, user-specific
    Framework Index1 hour100 itemsStable structure, infrequent changes
    Technology List2 hours50 itemsRarely changes, large content
    Documentation Updates30 minutes100 itemsPeriodic updates, WWDC announcements
    WWDC Video Data2 hoursUnlimitedStable content, local JSON files
  4. Understand the technical architecture of Apple Docs MCP

    main

    The Apple Docs MCP server is structured into several functional layers to provide access to Apple Developer Documentation:

    • MCP Server Entry Point: src/index.ts contains all available tools.
    • Tool Implementations: Located in src/tools/, these handle specific tasks like searching, fetching documentation, indexing frameworks, resolving references, and managing WWDC content.
    • WWDC Tools: Specialized tools in src/tools/wwdc/ for extracting video content, topics, and video lists.
    • Utilities: src/utils/ provides core services including memory caching (with TTL), error handling, an HTTP client with performance tracking, and a smart UserAgent rotation system.

    The server uses Zod v4.0.5 for runtime validation and the MCP SDK v1.15.1.

  5. Understand the Apple Docs MCP Architecture

    main

    The Apple Docs MCP server is structured into several functional layers:

    • MCP Server Entrypoint: src/index.ts contains the main entry point and all available tools.
    • Tools Implementation: Located in src/tools/, these handle specific tasks like searching, fetching documentation, indexing frameworks, finding related APIs, and managing WWDC video data.
    • WWDC Subsystem: A specialized toolset in src/tools/wwdc/ for extracting video content, topics, and lists.
    • Utilities: Found in src/utils/, providing core services like TTL-supported memory caching, HTTP client with performance tracking, a smart UserAgent rotation system, and URL conversion.
    • Built-in WWDC Data: Unlike other tools, WWDC data (2014-2025) is bundled directly in the npm package, allowing for 100% offline access and zero network latency for these specific sessions.
  6. Install Apple Docs MCP in VS Code

    main

    Add the following configuration to your VS Code MCP configuration file to enable the Apple Docs server via stdio:

    {
      "mcp": {
        "servers": {
          "apple-docs": {
            "type": "stdio",
            "command": "npx",
            "args": ["-y", "@kimsungwhee/apple-docs-mcp"]
          }
        }
      }
    }
  7. Install Apple Docs MCP in Zed

    main

    Add the following configuration to your Zed settings.json file to register the Apple Docs context server:

    {
      "context_servers": {
        "Apple Docs": {
          "command": {
            "path": "npx",
            "args": ["-y", "@kimsungwhee/apple-docs-mcp"]
          },
          "settings": {}
        }
      }
    }
  8. Install Apple Docs MCP on Windows (Command Prompt)

    main

    When configuring MCP servers on Windows, you must use cmd with the /c flag to correctly execute npx via the command prompt:

    {
      "mcpServers": {
        "apple-docs": {
          "command": "cmd",
          "args": ["/c", "npx", "-y", "@kimsungwhee/apple-docs-mcp"],
          "disabled": false,
          "autoApprove": []
        }
      }
    }
  9. Install Apple Docs MCP on Windows

    main

    For Windows users, use the cmd /c prefix to ensure npx executes correctly within the MCP configuration:

    {
      "mcpServers": {
        "apple-docs": {
          "command": "cmd",
          "args": ["/c", "npx", "-y", "@kimsungwhee/apple-docs-mcp"],
          "disabled": false,
          "autoApprove": []
        }
      }
    }
  10. Run development and build commands

    main

    Use the following commands to manage the development lifecycle of the Apple Docs MCP project:

    Development Mode (with auto-reload):

    pnpm run dev
    # or
    npm run dev

    Production Build:

    pnpm run build
    # or
    npm run build

    Type Checking:

    pnpm exec tsc --noEmit
    # or
    npx tsc --noEmit

    Clean Build Artifacts:

    pnpm run clean
    # or
    npm run clean
    pnpm run dev