OpenAI Secure MCP Tunnel
OpenAI Secure MCP Tunnel
Turborepo 모노레포: mcp-tunnel은 로컬 stdio MCP 서비스를 OpenAI Tunnel Client를 통해 워크스페이스에 노출합니다. 핵심 도구와 선택적 확장은 모두 workspace package로 제공되며, 향후 독립적인 apps/mcp-* 조합 애플리케이션을 추가할 수 있습니다.
아키텍처
apps/mcp-tunnel 当前 Tunnel 专用 MCP 应用和运行脚本
packages/mcp-tool-runtime 通用 tool 注册、配置与结果协议
packages/mcp-tools-core read / write / edit / bash
packages/mcp-tools-extra read_image / read_many / edit_many / notify
packages/mcp-image-adapter 图片读取和 sharp 转码(按需加载)
packages/pi-adapter 工作区文件、编辑、命令和路径安全适配개발 환경은 pnpm stub(postinstall에서도 실행됨)을 통해 unbuild --stub을 사용하므로, package를 수정할 때마다 수동으로 build할 필요가 없습니다.
Related MCP server: localmcpcoder
현재 Tunnel 앱 구성
모든 런타임 파일은 apps/mcp-tunnel/에 있습니다: .env.local, Tunnel Client 바이너리, 로그 및 dist-tunnel-client/. 이 app의 .env.local을 생성합니다:
CONTROL_PLANE_TUNNEL_ID=tunnel_...
CONTROL_PLANE_API_KEY=sk-...
# 可选;相对路径以 apps/mcp-tunnel 为基准
TUNNEL_CLIENT_PATH=./tunnel-client.exe
MCP_WORKSPACE_ROOT=.
# 未配置时只启用 core;配置时仅启用列出的工具
TOOLS_ENABLED=read,write,edit,bash,read_image,read_many,edit_many,notifyhttps://platform.openai.com/settings/organization/tunnels 여기서 tunnel 생성 -> CONTROL_PLANE_TUNNEL_ID
https://platform.openai.com/settings/organization/api-keys 여기서 api-key 생성 -> CONTROL_PLANE_API_KEY
https://chatgpt.com/plugins 로컬 시작 후 여기에서 plugins 추가
TOOLS_ENABLED가 구성되지 않으면 read, write, edit, bash만 활성화됩니다. 구성이 비어 있으면 tool을 노출하지 않으며, 구성이 비어 있지 않으면 나열된 tool만 노출합니다. 확장 코드는 동적 import로 로드되며, read_image 및 해당 sharp 의존성은 명시적으로 활성화된 경우에만 로드됩니다.
MCP_WORKSPACE_ROOT는 쉼표로 구분된 디렉터리와 glob 패턴을 지원합니다(예: D:/Workspace/ai-projects/*,C:/Users/Maple/.codex-cc). 상대 경로는 첫 번째 일치 디렉터리를 기준으로 하며, 절대 경로는 일치하는 디렉터리 중 하나의 파일에 액세스할 수 있습니다.
read_image는 PNG, JPEG, GIF, WebP를 지원합니다. 상대 경로는 workspace 경계로 제한되며, 절대 경로는 로컬 이미지를 읽는 호환 동작을 유지합니다. 큰 이미지는 자동으로 크기가 조정되거나 WebP로 변환됩니다. edit_many는 순서대로 실행되며, 원자적이지 않은 작업입니다.
시작 및 배포
pnpm start:mcp-tunnel
pnpm start:mcp-tunnel:pm2
pnpm stop:mcp-tunnel:pm2
pnpm build:mcp-tunnel첫 번째 명령은 Tunnel을 포그라운드로 시작합니다. 두 번째 명령은 전역으로 설치된 PM2를 사용하여 app을 호스팅합니다. 세 번째 명령은 PM2 레코드를 중지하고 제거합니다. 먼저 npm install --global pm2를 실행하세요. PM2는 프로젝트 의존성이 아니며 독립 패키지에도 포함되지 않습니다. Windows에서 PM2로 호스팅된 Tunnel Client는 상주 콘솔 창을 숨깁니다. 포그라운드 시작은 계속해서 표시되는 출력을 유지합니다.
독립 패키지는 apps/mcp-tunnel/dist-tunnel-client/에 생성되며, 여기에는 .env.local, Tunnel Client 바이너리 또는 node_modules가 포함되지 않습니다. 자격 증명과 바이너리를 해당 디렉터리에 넣은 후 node start-cli.js를 실행합니다. node start-pm2.js를 실행하려면 호스트에도 전역 PM2가 필요합니다.
macOS launchd는 선택적 호환 계층입니다:
pnpm --filter @workspace/mcp-tunnel install:macos-launchd로그인 시에만 PM2 드라이버 스크립트를 호출하며, 실제 상주 및 재시작은 PM2가 관리합니다.
개발 및 검증
pnpm stub
pnpm check
pnpm build
pnpm testapp 내의 .env.local, Tunnel 자격 증명 또는 바이너리 파일을 커밋하지 마세요.
This server cannot be deployed
Maintenance
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables ChatGPT to inspect and edit local projects through a secure MCP interface, offering workspace management, file operations, git integration, and safe command execution.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables remote MCP clients like ChatGPT to run shell commands and manage files on your local machine via a Cloudflare tunnel, exposing tools for file operations, search, and task management.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables ChatGPT to securely control a local workstation via an MCP tunnel, exposing 44 tools for file/project editing, git, process supervision, browser automation, and Office document handling across macOS, Linux, and Windows.5MIT
- FlicenseNot gradedqualityBmaintenanceEnables external AI (ChatGPT, Claude) to securely access a local workspace via Cloudflare Tunnel, providing file operations, shell commands, Git operations, and more with bearer token authentication and sandbox isolation.1-