live-preview-mcp
Live Preview MCP Server
Version 1.1(红队加固后)——生产级 Model Context Protocol 服务器,允许任何支持 MCP 的 AI 助手启动、管理并在 iframe 中嵌入实时应用预览。
安全加固(v1.1)
无 shell 注入:Docker 和进程派生始终使用参数数组(
shell: false)。安全环境:仅传递显式的环境变量允许列表;危险键(
NODE_OPTIONS、LD_PRELOAD等)会被剔除。符号链接安全的路径检查:在允许列表验证之前调用
realpathSync。WebSocket 速率限制 + 每个预览的连接数上限。
进程存活就绪检查:就绪探针还会验证子进程是否仍然存活。
并发预览限制(默认 10)。
Docker:
CapDrop: ALL、no-new-privileges,尽可能使用非 root 用户,AutoRemove + 启动时孤儿进程回收器。更强的日志脱敏(JWT、AWS 密钥、GitHub/Slack/OpenAI 令牌等)。
令牌长度增加至 32 个随机字节。
Related MCP server: Somewhere MCP
功能
MCP 工具:
start_preview、stop_preview、get_preview_status、get_preview_logs、list_previews、reload_preview、update_preview_config、share_preview、get_mobile_qr、set_auth_token框架自动检测:Vite、Next.js、CRA、Vue、Angular、Express、static、Expo、Flutter
HTTP 仪表盘 + 反向代理(已移除框架响应头)
可选的 Docker、Cloudflare/ngrok 隧道、移动端二维码、令牌认证、Cloud-IDE 感知
要求
Node.js ≥ 18
可选:Docker、
cloudflared、ngrok
安装与构建
cd live-preview-mcp
npm install
npm run build运行
node dist/index.jsMCP 客户端配置
{
"mcpServers": {
"live-preview": {
"command": "node",
"args": ["/absolute/path/to/live-preview-mcp/dist/index.js"],
"env": {
"PORT": "9000",
"ALLOWED_DIRS": "/path/to/projects"
}
}
}
}许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Cloud sandboxes for AI agents: run code, files, previews, browsers, Linux desktops, Android.
Build and embed a live AI product demo from your code, track buyer Q&A, and sync demo leads to CRM.
Build, preview and publish small web apps for a group of people from your AI assistant.
Deploy apps from GitHub, read build/runtime logs, and manage your app's users from your AI agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to scaffold, edit, live-preview, and deploy full-stack apps with built-in database, email, and push notification capabilities through natural language.19MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to build, deploy, and inspect apps through a hosted backend service, including reading platform docs, deploying raw source, inspecting logs, verifying live pages in browsers, and managing project tasks.MIT

Roar AI MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to deploy and manage hosted apps from git repos, read logs, add Postgres databases and domains, manage API keys and budgets, and send requests to 200+ AI models. Connects over remote Streamable HTTP with OAuth sign-in, so users need no API keys, installs, or local server.MIT- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to rent disposable cloud dev environments with a terminal, real browser, repo checkout, git gateway, and live view, so they can build, test, run dev servers, inspect pages, and push branches while keeping keys off the VM.3Apache 2.0