DesktopBridge
DesktopBridge 🌉
macOS 向けローカル Model Context Protocol サーバー。Claude(または任意の MCP ホスト)が stdio 経由で通信し、以下が可能です:
許可されたディレクトリ内のファイルの読み取り、書き込み、一覧表示、検索
CPU / メモリ / ディスク統計、稼働時間、および編集された環境変数の読み取り
実行中のアプリケーションの一覧表示
stdout/stderr を分離したシェルコマンドの実行、タイムアウト、オプションの進捗ストリーミング
クリップボードの読み書き
スクリーンショットの取得とディスプレイの一覧表示
このプロセスは、起動したユーザーと同じ OS 権限を持ちます。モデルに Mac のターミナルを与えるようなものだと考え、DESKTOP_BRIDGE_ROOTS で影響範囲を縮小してください。
要件
macOS(クリップボード、スクリーンショット、アプリケーション一覧は Apple のツールを使用)
Node.js 20.19+(22 LTS 推奨)
Related MCP server: macOS Automator MCP Server
インストール
cd desktop-bridge
npm install
npm run build
npm testコンパイル済みエントリポイントは dist/index.js です。
Claude Desktop に接続
サーバーをビルドします(
npm run build)。Claude Desktop → Settings → Developer → Edit Config を開きます。
claude_desktop_config.example.jsonのブロックをマージし、パスとユーザー名を置き換えます:
{
"mcpServers": {
"desktop-bridge": {
"command": "node",
"args": ["/Users/YOU/dev/desktop-bridge/dist/index.js"],
"env": {
"DESKTOP_BRIDGE_ROOTS": "/Users/YOU/Desktop,/Users/YOU/Documents,/Users/YOU/Downloads"
}
}
}
}Claude Desktop を完全に終了して再起動します。
MCP ツール(ブリッジアイコン 🌉)に desktop-bridge が表示されることを確認します。
macOS の設定ファイル:
~/Library/Application Support/Claude/claude_desktop_config.json
Claude Code に接続
claude mcp add desktop-bridge -- node /Users/YOU/dev/desktop-bridge/dist/index.jsまたは、同じ command / args / env ブロックを ~/.claude.json に追加します。
Cursor に接続
~/.cursor/mcp.json(またはプロジェクトの .cursor/mcp.json)に追加します:
{
"mcpServers": {
"desktop-bridge": {
"command": "node",
"args": ["/Users/YOU/dev/desktop-bridge/dist/index.js"]
}
}
}ホストなしでスモークテスト
npm run inspectorこれにより、ビルド済みの stdio サーバーに対して MCP Inspector が起動します。list_roots を呼び出し、次に get_system_info を呼び出します。
ログは stderr のみに出力されます。このプロセスで console.log を使用しないでください — stdout は JSON-RPC チャネルです。
環境変数
変数 | デフォルト | 意味 |
|
| ファイルツールが操作できるディレクトリ(カンマ区切り)。スクリーンショットの保存先として OS の一時ディレクトリが常に追加されます。 |
|
| 単一ファイルの読み書きの最大サイズ(1 KiB〜100 MiB)。 |
|
|
|
|
| stdout+stderr の合計キャプチャ上限。超過するとプロセスが強制終了され、 |
|
|
|
|
| true の場合、 |
| 未設定 | ステータスサイト用のハートビート POST URL( |
| 未設定 | サイトの |
|
| ハートビート間隔(5秒〜5分)。 |
コメント付きテンプレートは .env.example をコピーしてください。サーバーは プロセス環境変数(Claude Desktop の env ブロック)を読み取ります。.env ファイルは読み取りません。
ツール
ツール | 機能 |
| 許可されたディレクトリとファイルサイズ上限 |
| テキスト(オプションの行ウィンドウ)または base64 |
| 作成/上書き/追記; オプションで |
| 名前、タイプ、サイズ、mtime、モード |
| 名前のグロブおよび/またはファイル内容の正規表現 |
| CPU 使用率、負荷、メモリ、 |
| ホスト、稼働時間、ユーザー、編集された環境変数 |
| System Events 経由の GUI(またはすべての)プロセス |
| stdout/stderr を分離したシェル; |
|
|
| ディスプレイ名、メインフラグ、スケール、フレーム |
|
|
リソース: desktop://roots, desktop://system/info。
プロンプト: inspect_desktop, find_file。
セキュリティモデル
ファイル: すべてのパスは
realpathで解決されます。解決されたパスは設定されたルート内に存在する必要があります。..、余分なスラッシュ、ルートを外れるシンボリックリンクは拒否されます。ホームはデフォルトのルートではありません。 これにより、
~/.sshなどは意図的に追加しない限りアクセスできません。シェル: 依然として完全なユーザーシェルです。cwd が制限されていても、コマンドは任意の場所に
cdできます。ファイル/クリップボード/スクリーンツールのみが必要な場合は、DESKTOP_BRIDGE_ALLOW_SHELL=falseで無効にしてください。環境変数: password/token/secret/key/credential/cookie/session に一致するキーは
[redacted]に置き換えられます。Stdio: ネットワークリスナーはありません。ホストがこのプロセスを起動します。
macOS の権限
機能 | 権限 |
スクリーンショット | Node を起動したアプリ(Claude Desktop、Cursor、またはターミナル)の画面収録 |
| macOS がプロンプトを表示する場合の自動化 → System Events |
アクセシビリティ重視のアプリ | タイトルが非表示になる場合があります。ツールはどちらの場合もプロセス名を一覧表示します。 |
screencapture が失敗する場合は、システム設定 → プライバシーとセキュリティ → 画面収録 を開き、ホストアプリを有効にしてから再起動してください。
開発
npm run build # tsc → dist/
npm start # node dist/index.js (stdio)
npm test # compile + node:testレイアウト: src/lib/*(パスガード、プロセスランナー、グロブ/検索)、src/tools/*(MCP ツール)、src/index.ts(stdio エントリ)。
ホーム
https://home.jameymcelveen.com はブラウザのスタートページです(web/、追加の npm パッケージなし)。サインインは @mcelveen.us と STATUS_PASSWORD です。
現在の内容と、今後追加されるもののダンプトレイ:
ピース | メモ |
検索 | 自動フォーカス。Google / Kagi / DDG。バング: |
リンク | ローカルランディングページアプリと同じタイルに加え、プロパティ。設定で JSON として編集可能 |
天気 | Open-Meteo、°F、Florence SC(座標を上書きしない場合) |
Mac | DesktopBridge ハートビート: オンライン / 古い / オフライン、IP、負荷 |
スクラッチ | 自動保存されるメモ |
ワード | 日替わり聖句 |
Chrome/Safari/Firefox のホームページを https://home.jameymcelveen.com に設定してください(ブラウザがページから自動設定することはできません)。セッション Cookie は 30 日間有効です。/ で検索にフォーカス、⌘K も同様です。
main へのプッシュで CI が実行され、その後 Vercel(サイト)と Railway(ハートビート + 保存設定)にデプロイされます。
Mac では、MCP サーバーの env に追加します:
DESKTOP_BRIDGE_STATUS_URL=https://home.jameymcelveen.com/api/heartbeat
DESKTOP_BRIDGE_STATUS_TOKEN=<HEARTBEAT_TOKEN>ライセンス
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceA Model Context Protocol server that enables running AppleScript code to interact with Mac applications and system features including Notes, Calendar, Contacts, Messages, file management, and more.178460MIT
- AlicenseAqualityAmaintenanceProvides a Model Context Protocol server for executing AppleScript and JavaScript for Automation scripts on macOS, featuring a knowledge base of pre-defined scripts and supporting automation of macOS applications and system functions.2507874MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables execution of AppleScript and JavaScript for Automation scripts on macOS, allowing programmatic control of applications and system functions through a rich knowledge base of pre-defined scripts.25078MIT
- FlicenseAqualityDmaintenanceSecure AppleScript execution for AI applications via Model Context Protocol with configurable security profiles and automatic TCC permission handling.31
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jameymcelveen/desktop-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server