Skip to main content
Glama
AppKit Inspector

AppKit Inspector

by JaminZhou

AppKit Inspector

CI License

AppKit Inspector は、Codex から実行中のネイティブ macOS AppKit インターフェースを検査するための Debug 専用ブリッジです。アプリケーションのコンテンツビューをプロセス内でキャプチャし、クリックしたポイントを対応する NSView にマッピングし、階層とジオメトリを表示し、コーディングタスクのための正確な視覚フィードバックを準備します。

パブリックプレビュー: API、プラグインパッケージ、およびプレゼンテーション動作は 1.0 より前に変更される可能性があります。Codex Browser がサポートされるデフォルトのサーフェスです。フルスクリーンは実験的であり、デフォルトでは無効のままです。

機能

  • アクセシビリティやスクリーンレコーディングの許可なしに、実際の AppKit ウィンドウを検査します。

  • キャプチャしたインターフェースをクリックして、最も深いネイティブ NSView を特定します。

  • クラス名、フレーム、アクセシビリティメタデータ、祖先パスを確認します。

  • 選択したビュー、ジオメトリ、メモ、およびプライベートなローカルアーティファクトを含むフィードバックパッケージをコピーします。

  • ディスカバリとトランスポートを 127.0.0.1 上で認証された状態に保ちます。

  • #if DEBUG を使用して、アクティブな Release 動作からプローブをコンパイル除外します。

Related MCP server: chatuse

要件

  • macOS 14 以降、Swift 6.2 を備えた Xcode 26 以降、Node.js 22 以降、プラグインワークフロー用の最新の Codex デスクトップインストール。

クイックスタート

プロジェクトをクローンして検証します:

git clone https://github.com/JaminZhou/AppKitInspector.git
cd AppKitInspector
npm ci
npm run check

クローンしたリポジトリをローカルの Codex マーケットプレイスとしてインストールし、プラグインを有効にします:

codex plugin marketplace add "$PWD"
codex plugin add appkit-inspector@appkit-inspector-dev

同梱の AppKit デモを起動します:

make demo

新しくインストールされた MCP ツールを読み込むように新しい Codex タスクを開始し、次に尋ねます:

Use AppKit Inspector to connect to the running demo and open it in Codex Browser. The workflow
explicitly presents the right Browser panel after navigation. In the Inspector, use **Fit**, **−**,
and **+** to resize the snapshot; trackpad pinch and Command-modified scrolling also zoom.

デフォルトの open_appkit_inspector ツールは、現在のタスクの右側の Browser パネル用に、60 秒間有効な単回使用のループバック URL を作成します。フルスクリーンを要求したり、システムブラウザを自動的に起動したりすることはありません。外部ブラウザウィンドウは明示的なフォールバックです。

AppKit プロジェクトへのプローブの追加

Xcode でパッケージを追加します:

https://github.com/JaminZhou/AppKitInspector.git

または Package.swift で宣言します:

.package(
    url: "https://github.com/JaminZhou/AppKitInspector.git",
    from: "0.1.1"
)

AppKitInspectorProbe を Debug ターゲットまたは Debug 構成にのみ追加し、アプリケーションの起動後に開始します:

#if DEBUG
import AppKitInspectorProbe

_ = try? AppKitInspectorProbe.start()
#endif

Release、アーカイブ、TestFlight、または App Store ビルドでは、プローブを追加または開始しないでください。

プレゼンテーションモード

  • Codex Browser: デフォルトでサポートされています。

  • 外部ローカルウィンドウ: システムのデフォルトブラウザで開かれる明示的なフォールバック。

  • MCP App フルスクリーン: 実験的で、デフォルトでは無効であり、MCP サーバーが APPKIT_INSPECTOR_EXPERIMENTAL_FULLSCREEN=1 で起動した場合にのみ利用可能です。

プレゼンテーションの失敗時に別のウィンドウが自動的に開くことはありません。

リポジトリ構成

  • native/ — 再利用可能な Swift プローブ、デモアプリケーション、およびネイティブテスト。

  • packages/mcp/ — ローカル MCP サーバー、ディスカバリ、および認証済みトランスポート。

  • packages/app/ — Inspector ブラウザインターフェースとローカルクライアント。

  • plugins/appkit-inspector/ — インストール可能な Codex プラグイン、生成されたディストリビューション、およびスキル。

  • TODO.md — 延期された作業と実験的なフルスクリーン受け入れ。

開発

npm ci
npm run check
swift build -c release

ライブブリッジの確認には、一方のターミナルで make demo を実行し、もう一方で npm run test:live を実行します。packages/app/ または packages/mcp/ を変更した後は、npm run build を実行し、plugins/appkit-inspector/dist/ の下にある対応する生成ファイルを含めてください。

セキュリティとプライバシー

プローブと Inspector サーバーはループバックにのみバインドし、ランダムな資格情報を要求し、ユーザープライベートなディスカバリデータを書き込みます。Codex Browser の起動リンクは単回使用で、HttpOnly の同一サイトセッションになります。このプロジェクトは公開されている AppKit および Foundation API を使用しており、インジェクション、アクセシビリティ自動化、プライベートフレームワーク、スクリーンレコーディングは使用しません。

キャプチャされたスクリーンショット、階層データ、メモ、およびレビューアーティファクトは機密情報です。Codex を通じて使用する場合、それらはユーザーの製品およびワークスペースデータ管理の下で Codex タスクの一部になる可能性があります。プローブを統合する前に SECURITY.md を読み、脆弱性レポートにはプライベートセキュリティアドバイザリを使用してください。

貢献

CONTRIBUTING.md を参照してください。プロジェクトに意図的に提出された貢献は、Apache License 2.0 の下でライセンスされます。

ライセンス

Copyright 2026 Jamin Zhou. Apache License, Version 2.0 の下でライセンスされています。同梱の依存関係の帰属は THIRD_PARTY_NOTICES.md に記載されています。

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude to inspect and drive native macOS app UIs during development via an in-process view tree and screenshot renderer, without requiring screen recording permission.
      7
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to inspect and control macOS apps via accessibility trees, screenshots, OCR, and input simulation, with a visible pointer.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables driving macOS apps from Claude Code — screenshots, accessibility trees, clicks, typing and keys — by borrowing the Computer Use eyes and hands from OpenAI's ChatGPT/Codex desktop app, with persistent JavaScript scripting, text-targeted batching, diff output and macros that collapse many actions into one call without consuming Codex quota or calling a model.
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Click an element in your running web app or the iOS Simulator and say what should change; your coding agent gets the comment with the selector, DOM path, computed styles, component chain, source-file hint and a cropped screenshot. Runs locally on 127.0.0.1.
      8
      13
      MIT