live-preview-mcp
Enables AI assistants to start, manage, and embed live application previews in iframes, with support for multiple frameworks, Docker, tunnels, and authentication.
README
Live Preview MCP Server
Version 1.1 (post red-team hardening) — Production-grade Model Context Protocol server that lets any MCP-capable AI assistant start, manage, and embed live application previews in an iframe.
Security Hardening (v1.1)
- No shell injection: Docker and process spawn always use argument arrays (
shell: false). - Safe environment: Only an explicit allow-list of env vars is passed; dangerous keys (
NODE_OPTIONS,LD_PRELOAD, etc.) are stripped. - Symlink-safe path checks:
realpathSyncbefore allow-list validation. - WebSocket rate limiting + per-preview connection caps.
- Process-liveness readiness: readiness probe also verifies the child process is still alive.
- Concurrent preview limit (default 10).
- Docker:
CapDrop: ALL,no-new-privileges, non-root user where possible, AutoRemove + startup orphan reaper. - Stronger log redaction (JWT, AWS keys, GitHub/Slack/OpenAI tokens, etc.).
- Token length increased to 32 random bytes.
Features
- MCP Tools:
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 - Framework Auto-Detection: Vite, Next.js, CRA, Vue, Angular, Express, static, Expo, Flutter
- HTTP Dashboard + Reverse Proxy with framing headers removed
- Optional Docker, Cloudflare/ngrok tunnels, mobile QR, token auth, Cloud-IDE awareness
Requirements
- Node.js ≥ 18
- Optional: Docker,
cloudflared,ngrok
Install & Build
cd live-preview-mcp
npm install
npm run build
Run
node dist/index.js
MCP Client Configuration
{
"mcpServers": {
"live-preview": {
"command": "node",
"args": ["/absolute/path/to/live-preview-mcp/dist/index.js"],
"env": {
"PORT": "9000",
"ALLOWED_DIRS": "/path/to/projects"
}
}
}
}
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.