Portal
Portal

Portal 是一个 VS Code 扩展,将当前工作区暴露为 公共 MCP 端点。其设计刻意精简:仅支持命令和文件传输。
通过隧道将任意 MCP 客户端(Claude、ChatGPT、Cursor、自定义代理、curl)连接到您的机器。代理可以运行 shell 命令并移动文件,但不能通过 MCP 工具编辑文本——因为没有此类工具。
您将获得
表面 | 作用 |
MCP Streamable HTTP |
|
文件 HTTP API |
|
侧边栏与设置 | 扁平 Win10 风格面板:启动/停止、复制 URL、隧道健康状态 |
Portal Agent 终端 |
|
Related MCP server: FreeRDC Community Edition
MCP 工具(恰好五个)
工具 | 用途 |
| 前台执行命令。默认超时 120s(最大 600s)。使用 |
| 启动长时间运行的进程。返回 |
| 按偏移量增量读取 stdout/stdout,省略 |
| 停止后台任务及其进程树( |
| 公共文件 API 的基础 URL、大小限制和 curl 示例。 |
Shell 环境: powershell(Windows 默认)、pwsh、cmd)()、bash / sh(存在 Git Bash 时)。自动设置 UTF-8。
会话: 复用来自 initialize 的 Mcp-Session-Id。若该 ID 丢失或未通过验证,请重新执行 SessionInitialized——不要自行编造 ID。
不存在 read_file / write_file / edit_file / list_* / search_files 等工具。请通过 shell 或 HTTP 文件 API 来读写。
文件传输(双向 HTTP)
与 MCP 使用相同的隧道和 token。默认最大大小:64 MiB(portal.maxTransferBytes)。上传操作将原子替换文件。下载支持 Range 并返回 SHA-256。
GET {base}?op=info capability + workspace
GET {base}?glob=**/* list files
GET {base}/<relpath> download
HEAD {base}/<relpath> metadata
PUT {base}/<relpath> upload
DELETE {base}/<relpath> delete
POST {base}?op=pack zip JSON { "paths": ["src"] }
POST {base}?op=unpack&dest=. unzip (raw zip body)免费 ngrok 域名需要以下请求头:ngrok-skip-browser-warning: 1。
# download
curl -fsSL -H "ngrok-skip-browser-warning: 1" \
"$BASE/README.md" -o README.md
# upload
curl -fsSL -H "ngrok-skip-browser-warning: 1" \
-T ./photo.png "$BASE/incoming/photo.png"
# pack a folder
curl -fsSL -H "ngrok-skip-browser-warning: 1" \
-H "Content-Type: application/json" \
-d '{"paths":["src"]}' "$BASE?op=pack" -o src.zip隧道提供商
提供商 | URL | 说明 |
| 每次启动生成新的随机 | 快速试用;不稳定 |
| 固定主机名 | 需要存储的隧道 token、公共主机名、固定在本机端口 |
| 保留域名(例如 | 永久性 URL |
| 自有命令或已有 URL | 占位符: |
路由 token 是秘密路径段。MCP 位于 /mcp/<token>。将 portal.routeToken 留空,则启动时自动生成一个。
命令(命令面板)
Portal: 启动 / 停止
Portal: 复制 URL
Portal: 检查隧道
Portal: 设置
Portal: 安装 cloudflared / 安装/升级 ngrox
Portal: 显示日志 / 显示 Agent 终端
有用的设置:portal.startOnActivation(默认开启)、portal.showCommandsInTerminal、portal.localPort(0 = 自动,cloudflare-named 除外)。
构建
需要 Node 18+ 和 VS Code ^1.95.0。
npm install
npm run build # esbuild → dist/extension.js
npm run typecheck
npm run package # .vsix (no bundled node_modules)加载打包后的 VSIX,或在桌面版 VS Code 主机中运行该扩展(extensionKind:ui + workspace)。
许可证
MIT 协议。
This server cannot be deployed
Maintenance
Related MCP Connectors
Secure tunneling, reverse proxy and remote access for local applications.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Provision an OpenCode workbench and MCP stack on any Linux box, local or over SSH.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceExpose your VS Code workspace's tools — files, terminal, LSP, diagnostics, and images — to remote MCP clients over a public HTTPS tunnel.5MIT
- AlicenseNot gradedqualityAmaintenanceEnables a remote MCP client to access narrowly scoped local filesystem resources and process capabilities through a loopback-only bridge. Supports guarded file reads, searches, and mutations, authenticated transport, and private reachability via OpenAI Secure MCP Tunnel.1AGPL 3.0
- AlicenseAqualityAmaintenanceEnables MCP clients to securely work with local files, directories, searches, terminal sessions, and processes on paired computers via outbound connections, without exposing inbound ports.271MIT
- AlicenseNot gradedqualityAmaintenanceEnables running local MCP servers on machines behind NAT and accessing their tools from anywhere through a single Streamable HTTP endpoint, without opening any inbound ports.MIT