Windows MCP for ChatGPT & Grok
Connects ChatGPT to the local Windows MCP server through an OpenAI Secure MCP Tunnel, enabling ChatGPT to use the server's file, shell/terminal, and desktop GUI control tools on the user's Windows machine.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Windows MCP for ChatGPT & GrokTake a screenshot of my desktop and tell me which window is in focus."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Windows MCP for ChatGPT & Grok
English · 日本語
Windowsのファイル・ターミナル・デスクトップを、ChatGPT、Grok、stdio対応MCPクライアントから操作するセルフホスト型MCPサーバーです。各利用者が自分のPCに導入し、自分の認証で接続します。 Windows 10/11用です。
既存の個人環境向け実装を一般公開用に整理しました。インストール先・ユーザー名・ドメイン・トンネルIDは固定されていません。個人用の認証情報、会話履歴、稼働データ、バイナリは含みません。
できること
Desktop Commander 0.3.0の25ツール:ファイル読み書き、検索、編集、PowerShell/CMD、対話プロセスなど。
GUIの12ツール:画面情報、スクリーンショット、ウィンドウ情報、クリック、ドラッグ、文字・キー入力など。
状態を確認する
control_diagnostics。合計38ツール。ChatGPT:OpenAI Secure MCP Tunnelでstdio本体へ接続。
Grok:公開HTTPSのStreamable HTTP入口とOAuth認可コード+S256 PKCEで接続。
Claude Desktop等:stdio本体へ接続。クライアントごとの表示・画像対応は別途確認してください。
ChatGPT ─ OpenAI Secure MCP Tunnel ─ stdio bridge ─┐
├─ Windows files / shell / GUI
Grok ─ HTTPS tunnel ─ OAuth / HTTP ─ stdio bridge ─┘
Local MCP client ────────────────── stdio bridgeRelated MCP server: GPT Windows Connector
1. インストール
必要なもの:Windows 10/11、Python 3.12以上(Tkinterを含む標準Windows版)、Node.js 24 LTS、Git。PythonとNode.jsをPATHに登録してください。通常のユーザー権限で実行します。
PowerShellで:
git clone https://github.com/sakusaku0214/windows-mcp-chatgpt-grok.git
cd windows-mcp-chatgpt-grok
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup.ps1セットアップはプロジェクト専用 .venv と node_modules を作成します。Pythonを明示する場合は setup.ps1 -Python 'C:\path\to\python.exe'。Windowsの実行ポリシー変更はこのプロセス限りです。
2A. ChatGPTに接続
OpenAI公式手順に従い、自分のトンネルとランタイムAPIキーを作成し、公式
tunnel-clientをインストールします。対象のChatGPTワークスペースとPlatform組織を関連付けます。トンネルの権限とChatGPT側の接続機能が必要です。
次を実行します。キー未設定時は非表示で入力できます。
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\start-chatgpt.ps1 -TunnelId 'tunnel_YOUR_ID'
# tunnel-clientがPATHにない場合は -TunnelClient 'C:\path\to\tunnel-client.exe' を追加プロセスを起動したまま、ChatGPTのアプリ追加画面でそのトンネルを選択し、接続します。最初は
control_diagnosticsなど読取専用の操作で確認してください。
キーは環境変数 CONTROL_PLANE_API_KEY からも受け取れます。設定ファイルにキー本体は保存しません。利用条件はOpenAI側の権限・プランに依存します。GitHubでのソース公開と、ChatGPTの公開プラグインとしての配布は別です。公開プラグイン申請は本リポジトリの対象外です。
2B. Grokに接続
Grokから届く自分用の公開HTTPS URLが必要です。Tailscale Funnel、Cloudflare Tunnel、ngrokなどを別途用意し、http://127.0.0.1:7192 に転送してください。自分で選んだポート以外を公開する必要はありません。
例として、インストール・ログイン・Funnel利用条件を確認済みのTailscaleでは:
tailscale funnel --bg --https=443 http://127.0.0.1:7192表示されたHTTPSドメインを使って起動します。PublicOrigin は末尾スラッシュと /mcp を含めない値です。
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\start-http.ps1 -PublicOrigin 'https://YOUR-HOST.example.ts.net'初回起動で、このWindowsユーザー専用のランダムトークンを新規生成し、DPAPI暗号化して保存します。サーバーの起動を保ち、別のPowerShellで承認用トークンの画面を開きます。
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\show-token.ps1Grok Connectors → New Connector → Customで、次を設定します。BASE は指定した公開Originです。
項目 | 値 |
MCP URL |
|
Client ID |
|
Client secret | 空欄 |
Authorization endpoint |
|
Token endpoint |
|
Scope |
|
Token authentication |
|
承認ページが開いたら、表示中のドメインが自分のものか確認し、Windows上の画面からコピーしたトークンを承認ページに貼り付けます。GrokのチャットやClient secret欄へトークンを貼り付けないでください。トークン画面を閉じるか60秒経過すると、コピーした値が同じ場合にクリップボードから消去します。
公開HTTP入口のOAuthはGrok用の登録済みコールバックに限定しています。 他のMCPクライアントはstdioを使うか、Bearer認証に対応する場合に所有者トークンでHTTPを利用できます。任意のコールバックを受け入れるOAuthサーバーではありません。
トンネル側が転送するHostは、指定した公開Hostまたは 127.0.0.1:7192 / localhost:7192 にしてください。プロキシでヘッダーを書き換える場合も、このいずれかに設定します。URLが変わるサービスでは起動OriginとGrok登録を更新し、再承認してください。
公式:Grokカスタムコネクター、トンネル接続、Tailscale Funnel。
2C. その他のstdioクライアント
設定例のパスを自分のインストール先に置換してください。Codex向けの設定例もあります。
{
"mcpServers": {
"windows-control": {
"command": "C:/path/to/windows-mcp/.venv/Scripts/python.exe",
"args": ["-B", "-u", "C:/path/to/windows-mcp/bridge.py"]
}
}
}運用と注意点
接続したAIは、実行ユーザー権限でファイルやシェルを操作できます。 専用Windowsユーザーでの運用を検討し、接続先と許可する操作を理解して使ってください。命令文・ブロックリストはOSの隔離境界ではありません。
Windowsへログオンしている必要があります。ロック画面、UAC、管理者アプリ、ログオン前の操作は保証しません。GUI画像の座標は物理ピクセルです。
ChatGPTとGrokの設定・検索・プロセス台帳は分離しますが、PCとファイル・デスクトップは共通です。同じ画面やファイルへの操作を調整してください。GUI mutexは1呼出し単位です。
タイムアウトは操作取消しを意味しません。結果不明の書込み・起動・クリックは再送前に状態確認してください。HTTPのツール待ちがタイムアウトすると後続操作を拒否します。確認後、手動再起動してください。
通常の終了は起動したターミナルのCtrl+C。ChatGPT用とHTTP用は別プロセスです。HTTPを止めてもトンネルサービスの公開設定は残る場合があります。Tailscaleの当該公開を止める場合は
tailscale funnel --https=443 off。スクリプトは前景実行です。PC再起動後の自動起動・認証済みセッションの復元は設定しません。OAuthの期限付き認証は同じWindowsユーザー・同じURLでディスクに保存しますが、MCPセッションや実行中プロセスは復元しません。
runtime/、gateway/runtime/、gateway/auth/等は自動生成され、Gitから除外します。公開URL・鍵・ログ・スクリーンショットをIssueへ載せないでください。
詳細なセキュリティ・状態保存仕様 · 開発と検証 · ライセンス · 第三者ライセンス
MITライセンスで利用・変更・再配布できます。OpenAI、xAI、Desktop Commanderの公式製品ではありません。
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Hosted MCP server and REST API that lets AI agents use apps with no API, signed in as you.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA lightweight MCP HTTP server giving AI assistants real tools to interact with your Windows machine, including running commands, file access, system info, web search, and browser automation.1-
- AlicenseNot gradedqualityBmaintenanceRemote-first, model-independent Windows execution MCP for ChatGPT, Claude, Gemini, and other MCP-compatible AI clients.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to securely control and interact with a local Windows machine through 218 configurable tools for files, Git, processes, Windows UI, browser automation, WSL, Office, recovery, skills, and child MCP servers.1 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT to safely interact with Windows workspaces through a loopback-only MCP server, with OAuth, bounded PowerShell tools, persistent jobs, and optional Cloudflare Tunnel exposure.MIT