local-mcp-chatgpt-tunnel
Provides a gateway for connecting local stdio MCP servers to OpenAI's ChatGPT Developer Mode through the official Secure MCP Tunnel, allowing ChatGPT to call tools from local MCP servers.
Click on "Install 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., "@local-mcp-chatgpt-tunnelList all files in my local workspace and read the config file."
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.
Local MCP ChatGPT Tunnel
Windows上で動くstdio形式のMCPサーバーを、OpenAI公式Secure MCP Tunnel経由でChatGPT Developer Modeへ接続するためのローカルGatewayです。 複数のstdio MCPを1つに集約し、ツール名の名前空間化、公開ツールの除外、パス許可、直列実行、遅延起動を設定ファイルから制御できます。
インストール方法
Windows環境での導入手順はINSTALL.mdを参照してください。
Related MCP server: mcp-local-files
セキュリティ警告
自分のWindows PC、自分のOpenAI Platform Organization、自分のChatGPT Workspaceだけで使う個人専用ツールです。 任意コード実行能力を持つMCPを接続できるため、第三者への共有や公開Pluginとしての運用は想定していません。
AIによる実装について
このリポジトリは、ChatGPT 5.6 Sol Highによって実装されました。 AIが生成したコードを含むため、誤りや脆弱性が残っている可能性があります。 実際に使用する前にコードと設定内容を確認し、利用者自身の責任で使用してください。
何ができるか
ChatGPTからWindows上のstdio MCPサーバーを呼び出す
複数のMCPを
<prefix>__<tool>形式のツール名へまとめる任意のstdio MCPを
config/gateway.tomlへ追加するMCPごとに許可するディレクトリとファイルを制限する
危険なツールを名前または部分文字列で非公開にする
同時実行させたくないMCPを
serial_groupで直列化する必要に応じて、特定のMCP全体を無効化する
このリポジトリが行わないこと
OpenAI Responses APIやChat Completions APIの呼び出し
独自AIエージェント、独自ハーネス、モデル課金処理の実装
公開MCP URLやローカル受信ポートの提供
Node.js、Git、ripgrep、Python、tunnel-clientの自動インストール
Ghidra MCP、Chrome DevTools MCP、DQ9 MCPなど第三者MCPの再配布
Secure MCP Tunnelへの接続は公式tunnel-client.exeが担当します。このリポジトリは、その標準入出力へ接続するローカルMCP Gatewayと同梱MCPを提供します。
対応環境
現在の導入手順はWindows 11向けです。実行にはNode.js LTSとOpenAI公式tunnel-client.exeを使います。同梱のファイル検索機能にはripgrepを使い、診断スクリプトはnode、npm、git、rg、pyを確認します。
macOSとLinux向けの導入手順、Docker構成、受信ポートを開く構成は用意していません。
使い始めるまで
使えるようになるまでの手順は、INSTALL.mdにまとめています。 大まかな流れは次のとおりです。
必要なソフトと公式
tunnel-client.exeを手動で用意するconfig/gateway.example.tomlをconfig/gateway.tomlへコピーして絶対パスを書き換えるOpenAI Platformで個人用Tunnelと実行専用runtime API keyを作る
Tunnel IDとruntime API keyをWindowsのユーザー環境変数へ保存する
start.cmdで診断後にTunnelを起動するChatGPT Developer Modeから個人用Tunnelを選択する 設定や権限を推測して進めず、必ずINSTALL.mdを上から確認してください。
同梱MCP
MCP | 公開ツールの例 | 用途 |
|
| 許可したWorkspace内の一覧、UTF-8検索、読み書き、限定されたパッチ適用 |
|
| PNG、JPEG、WebPをChatGPTの画像コンテンツとして読み取る |
|
| 許可したソースを単一ファイルでもZIPとしてChatGPTへ渡す |
|
| 許可したリポジトリに対する限定されたGit操作 |
同梱MCPは外部npm依存を持ちません。すべてのツールが |
safe-files
safe-filesは、gateway.tomlで指定されたcwdをプロセスの作業ディレクトリ兼Workspaceルートとして使います。
主な機能は次のとおりです。
固定された
rg --files --hiddenによる再帰一覧固定された
rgによるUTF-8テキスト検索UTF-8テキストの読み書きと完全一致置換
サイズを制限したbase64ファイル転送
ディレクトリ作成
内蔵パーサーまたは固定された
git applyによるパッチ適用 再帰一覧では.git内部を常に除外し、パッチでは.git内部を対象にできません。許可ルート外、シンボリックリンクによる脱出、高確度で資格情報らしい内容なども拒否します。一般シェル、PowerShell、任意コマンド実行ツールは含みません。
safe-images
safe-imagesは読み取り専用です。PNG、JPEG、WebPの拡張子とマジックバイトを照合し、初期状態では8 MiB、50メガピクセルまでに制限します。
SVG、HEIC、空ファイル、許可ルート外、シンボリックリンク、UNCパス、NTFS代替データストリームを拒否します。
safe-download
safe-downloadは読み取り専用で、単一ファイルまたはディレクトリを常にZIPとして返します。safe-filesとは別のcwdと許可リストを設定し、ChatGPTへ渡してよいソースだけを公開します。
ディレクトリは固定されたrg --files --hiddenで列挙し、.git内部、ROM、Save、State、秘密鍵形式、資格情報らしい内容、許可範囲外、シンボリックリンクを拒否します。
gitmcp
gitmcpは、許可されたディレクトリ内のGitリポジトリに対して、固定されたGitサブコマンドとオプションだけを実行します。一般シェルや任意Git引数は受け取らず、.gitの直接編集、フック追加、force push、任意refspecには対応しません。
status、追跡ファイル一覧、ブランチ・remote・履歴の確認、作業ツリーまたはstaged差分、ブランチ切り替え、git add --all -- .、commitを利用できます。push、pull、cloneは起動引数で個別に無効化でき、設定例ではpullとcloneを無効にしています。cloneでは固定の--recurse-submodulesを選択できます。
repositoryPathへサブモジュールや入れ子のGitリポジトリを直接指定すると、そのリポジトリ自身のstatus、diff、logなどを取得できます。親リポジトリ配下を再帰探索して、すべての入れ子リポジトリを自動列挙するツールは含みません。
任意のstdio MCPを追加する
接続するMCPの起動コマンドや引数は、Gateway本体ではなくconfig/gateway.tomlの[mcp_servers.<name>]へ記述します。
private_use_only = true
[mcp_servers.example]
command = "py"
args = ['C:\path\to\server.py']
cwd = 'C:\path\to'
enabled = true
prefix = "example"
startup_timeout_sec = 30
tool_timeout_sec = 1800
allowed_directories = ['C:\work\project']
allowed_files = ['C:\Users\owner\Downloads\one-upload-file.png']
[mcp_servers.example.env]
EXAMPLE_CONFIG = 'C:\path\to\config.json'有効なstdio MCPだけが子プロセスとして起動し、元のツール名tool_nameはChatGPT側でexample__tool_nameとして公開されます。enabled = falseのエントリは起動しません。
Codex設定からコピーしたtool_output_token_limit、ツール別の承認設定、Gatewayが認識しない項目は無視されます。このGateway上では効果を持ちません。
Gateway設定
パス許可
allowed_directoriesは指定したディレクトリとその配下を許可し、allowed_filesは指定したファイルだけを完全一致で許可します。
Gatewayはすべての子MCPのツール引数を再帰的に検査し、path、filePath、files、directoryなどのキーや絶対パスらしい文字列を許可リストへ照合します。相対パスは対象MCPのcwdから解決します。
allowed_directories = ['C:\work\project']
allowed_files = ['C:\Users\owner\Downloads\upload.png']この検査はChatGPTから子MCPへ渡るツール引数のガードです。接続したMCP自身が内部で勝手にファイルへアクセスすることを、OSレベルで防ぐ機能ではありません。
公開ツールの除外
ツール名の完全一致はblocked_tools、大文字小文字を区別しない部分一致はblocked_tool_substringsで非公開にできます。
blocked_tools = ["dangerous_tool"]
blocked_tool_substrings = ["script", "shell", "execute"]blocked_tool_substringsはglobや正規表現ではありません。たとえば"script"はevaluate_script、runScript、SCRIPT_debugをすべて対象にします。
直列実行と遅延起動
同じ資源を同時操作させたくないMCPは、同じserial_groupへ所属させられます。
deferred = trueにしたMCPは初期化時に起動せず、別MCPの指定ツールが成功した後にstart_afterで起動できます。stop_afterでは同様に停止できます。
[mcp_servers.browser]
command = "node"
args = ["browser-server.mjs"]
cwd = ".."
enabled = true
prefix = "browser"
deferred = true
serial_group = "browser"
[mcp_servers.browser.start_after]
server = "controller"
tool = "prepare_browser"
[mcp_servers.browser.stop_after]
server = "controller"
tool = "stop_browser"セキュリティ上の前提
gateway.tomlのcommandはローカルプログラムを実行します。信頼できるMCPだけを登録してください。
コマンドによっては、インターネット上のMCPプログラムを直接取得して実行するものもあります。
gateway.tomlで指定したコマンドは、サンドボックス内ではなく、実際のPC上でWindowsユーザーの権限を使って実行されます。
信頼できないMCPを指定しないでください。
Gatewayは管理者権限での起動を拒否し、子MCPへ親プロセスの秘密情報らしい環境変数をそのまま継承しません。ただし、同じWindowsユーザーが読めるファイルをOSレベルで隔離するものではありません。
Tunnelは自分のPlatform Organizationと自分のChatGPT Workspaceだけへ関連付け、runtime API keyにはTunnels Read + Use以外の権限を与えない構成を推奨します。詳細はSECURITY.mdとINSTALL.mdを確認してください。
診断とテスト
必要なコマンドの検出とバージョン確認を行います。インストールや設定変更は行いません。
node app\doctor.mjsリポジトリのテストは次で実行できます。
npm test外部npm依存はありません。
ライセンス
このリポジトリ本体はMIT Licenseです。公式tunnel-client.exeなど第三者コンポーネントについてはTHIRD_PARTY_NOTICES.mdを確認してください。
This server cannot be installed
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
- Alicense-qualityCmaintenanceLocal MCP server bridging ChatGPT Web to local tools for file, shell, git, test, and process management with secure policy controls.Last updatedMIT
- Alicense-qualityBmaintenanceEnables ChatGPT/Codex to read, search, and edit files in a single allowed folder on Windows through OpenAI Secure MCP Tunnel.Last updatedISC
- FlicenseCqualityCmaintenanceEnables ChatGPT to control a Windows PC remotely via OpenAI Secure MCP Tunnel, executing file operations, PowerShell commands, and system actions through a local MCP server.Last updated15
- Alicense-qualityAmaintenanceEnables ChatGPT to inspect and edit local projects through a secure MCP interface, offering workspace management, file operations, git integration, and safe command execution.Last updated3MIT
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
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/DaisukeDaisuke/local-mcp-chatgpt-tunnel'
If you have feedback or need assistance with the MCP directory API, please join our Discord server