XS

xinghelee/sandboxserver

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

31 stars 2 forks 品質 74 トレンド 15MIT

お使いのアプリに HTTP + WebSocket サーバーを埋め込む DEBUG 専用 iOS SDK: ブラウザコンソール + MCP ブリッジでファイル、データベース、ネットワーク、ログ、およびライブ画面を検査します。 サードパーティの依存関係ゼロ.

概要

[https://github.com/user-attachments/assets/1f2cda8f-da85-492a-ac19-24ed8d34d778] 任意のアプリをブラウズ可能なデバッグターゲットにします。 同じネットワークのブラウザーから、start() を呼び出して、取得します。 - インポート — リスト/プレビュー/編集/ダウンロード/削除、範囲のストリーミング、root-confined() - すべてのURLSessionリクエスト、リアルタイムで検査可能() - 🗄 — SQLite DBを発見し、テーブル/schemaをブラウズし、読み取り専用SQLを実行します(; コアデータ/リアム + 後で書き込み) - 📜 — アプリのコンソール出力をストリームします(SandboxServer.

概要(AI 翻訳)

英語・ホテル

[https://github.com/user-attachments/assets/1f2cda8f-da85-492a-ac19-24ed8d34d778]

A DEBUG-only iOS SDK* は、任意のアプリを Browsable デバッグ ターゲットに変えます。 それを統合し、電話をかけて下さい [start()] と、同じネットワークのブラウザから取得します。

  • インポートSandboxファイルブラウザ — リスト/プレビュー/編集/ダウンロード/削除、範囲のストリーミング、root-confined(live)
  • ライブネットワークキャプチャ** - すべての[URLSession]リクエスト、リアルタイムで検査可能(live)
  • 🗄 データベースビューア — SQLite DBを発見し、表/schemaをブラウズし、読み取り専用SQLを実行します(live; コアデータ/リアルタイム+後で書き込み)
  • 📜ライブログ — アプリのコンソール出力([[SandboxServer.log])、プラス[[print]/[NSLog]])をブラウザに、レベルフィルタリング(live)
  • ◀画面ミラー + コントロール — アプリの UI をブラウザに表示し、それをドライブ: タップ (UIControls / SwiftUI ボタン)、スワイプ/スクロール&ドラッグ(実際の合成タッチ)、タイプ、貼り付け(ライブ、iOS)
  • ハイアーキシーを見る — ライブビューツリー(フレーム、クラス、ラベル、サムネイル)をリストまたはブラウザで3Dレイヤーエクスプローラとしてチェックします(ライブ、iOS)

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

SandboxServer

English · 简体中文

https://github.com/user-attachments/assets/1f2cda8f-da85-492a-ac19-24ed8d34d778

A DEBUG-only iOS SDK that turns any app into a browsable debug target. Integrate it, call start(), and from a browser on the same network you get:

  • 🗂 Sandbox file browser — list / preview / edit / download / delete, Range streaming, root-confined (live)
  • 🌐 Live network capture — every URLSession request, inspectable in real time (live)
  • 🗄 Database viewer — discover SQLite DBs, browse tables/schema, run read-only SQL (live; Core Data/Realm + writes later)
  • 📜 Live logs — stream the app’s console output (SandboxServer.log, plus print/NSLog when console capture is on) to the browser, level-filtered (live)
  • 📱 Screen mirror + control — watch the app’s UI live in the browser and drive it: tap (UIControls / SwiftUI buttons), swipe/scroll & drag (real synthesized touch), type, and paste (live, iOS)
  • 🌳 View hierarchy — inspect the live view tree (frames, classes, labels, thumbnails) as a list or a 3D layer explorer in the browser (live, iOS)
  • 🔌 WebSocket capture — every URLSessionWebSocketTask connection and its sent/received frames, streamed live (live)
  • 📈 Performance HUD — live FPS / CPU / memory footprint / thermal state, streamed and charted (live)
  • 📦 App bundle inspector — Info.plist, Mach-O architectures + hardening, provisioning, privacy, plist decode (live)
  • ⚙️ UserDefaults editor — browse, edit, delete & reset the app’s persisted defaults and App Group suites (live)
  • 📲 Device info — model / OS / locale / screen + safe-area / battery / memory / free disk at a glance (live)
  • ⛓️ Deep-link trigger — list the app’s URL schemes and open any scheme / universal link in the app (live, iOS)
  • 🔔 Notification tester — inspect/request authorization, fire local notifications, simulate a remote push payload (live, iOS)
  • 🖥 A web console served by the SDK itself — no app to install, just open a URL
  • 🤖 MCP tools — the same on-device API re-exposed to AI clients (Claude Code / Desktop)

It runs an embedded HTTP + WebSocket server inside the host process on Apple’s Network.framework, with zero third-party runtime dependencies.

⚠️ This SDK exposes full read/write access to the host app’s sandbox. It is off by default, requires an explicit start(), binds loopback by default, and is physically absent from Release/App Store builds. Token auth is opt-in; if you bind to .localNetwork without enabling it, every device on the trusted LAN can reach the console. Use non-production accounts on a trusted network.


Architecture

┌─ host iOS app (DEBUG) ──────────────────────────────┐
│  SandboxServer.shared.start()                        │
│     │                                                │
GitHub で README 全文を見る

インストール

npx -y sandbox-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "sandbox": { "command": "npx", "args": ["-y", "sandbox-mcp"], "env": { "SANDBOX_HOST": "127.0.0.1", "SANDBOX_PORT": "8080" } } } }