
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server that lets AI agents create, update, and destroy HTML pages while connected browsers receive updates in real time.
MCP HTML Sync Server is cataloged as an MCP server attributed to yujiosaka. An MCP server that lets AI agents create, update, and destroy HTML pages while connected browsers receive updates in real time. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP HTML Sync Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
All connected clients receive updates in real time through WebSockets, and browsers automatically refresh when content changes.
Updating a page that no longer exists returns an error, and destroying a page removes it and disconnects all clients.
README.md · aa53a67bf27a · 采集于 2026-11-13 12:56:15 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A real-time HTML syncing server with hot reload capabilities, built using the Model Context Protocol (MCP). This server enables AI agents to create, update, and destroy HTML pages dynamically, with all connected clients receiving updates in real-time.
flowchart LR
AI[AI Agent] -->|MCP Protocol| MCP[MCP HTML Sync Server]
MCP -->|Create/Update/Destroy/AddScripts/AddStylesheets| PM[Page Manager]
PM -->|Store| Pages[(HTML Pages, Scripts & Stylesheets)]
User[User Browser] -->|HTTP Request| HTTP[HTTP Server]
HTTP -->|Fetch Page, Scripts & Stylesheets| PM
User <-->|WebSocket| WS[WebSocket Server]
WS <-->|Real-time Updates| PM
docker pull yujiosaka/mcp-html-sync-server
docker run -p 3000:3000 yujiosaka/mcp-html-sync-server
Instead of using an .env file, you can pass environment variables directly to the Docker container at runtime:
docker run -p 3000:3000 \
-e SERVER_PORT=3000 \
-e BASE_URL=http://localhost:3000/ \
-e PAGE_MAX_AGE=1h \
-e PAGE_MAX_COUNT=1000 \
yujiosaka/mcp-html-sync-server
This approach is recommended for production deployments as it allows you to configure the server without modifying the container image.
NODE_ENV=production npx mcp-html-sync-server
# Clone the repository
git clone https://github.com/yujiosaka/mcp-html-sync-server.git
cd mcp-html-sync-server
# Install dependencies
bun install
# Copy the example environment file
bun run config
# Start the server
bun run start
Edit the .env file to configure the server:
# Host address for the HTTP server (used for binding the server)
SERVER_HOST=localhost
# Port number for the HTTP server (used for binding the server)
SERVER_PORT=3000
# Base URL for the application (used for generating view URLs)
BASE_URL=http://localhost:3000/
# Maximum age of pages before they expire (e.g., 1h = 1 hour, uses ms library format)
PAGE_MAX_AGE=1h
# Maximum number of pages that can be stored (oldest pages are removed when limit is reached)
PAGE_MAX_COUNT=1000
| Option | Description | Default | Format |
|---|---|---|---|
| SERVER_HOST | Host address for binding the HTTP server | localhost | hostname |
| SERVER_PORT | Port number for the HTTP server | 3000 | number |
| BASE_URL | Base URL for generating view URLs | http://localhost:3000/ | URL |
| PAGE_MAX_AGE | Maximum age of pages before expiration | 1h | time string (e.g., 1h, 30m, 1d) |
| PAGE_MAX_COUNT | Maximum number of pages to keep | 1000 | number |
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"html-sync-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"3000:3000",
"-e", "SERVER_PORT=3000",
"-e", "BASE_URL=http://localhost:3000/",
"-e", "PAGE_MAX_AGE=1h",
"-e", "PAGE_MAX_COUNT=1000",
"yujiosaka/mcp-html-sync-server"
]
}
}
}
{
"mcpServers": {
"html-sync-server": {
"command": "npx",
"args": ["-y", "mcp-html-sync-server"],
"env": {
"NODE_ENV": "production"
}
}
}
}
For quick installation, use one of the one-click install buttons below:
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open Settings (JSON).
Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.
Note that the
mcpkey is not needed in the.vscode/mcp.jsonfile.
{
"mcp": {
"servers": {
"html-sync-server": {
"command": "npx",
"args": ["-y", "mcp-html-sync-server"],
"env": {
"NODE_ENV": "production"
}
}
}
}
}
For Docker installation:
{
"mcp": {
"servers": {
"html-sync-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p", "3000:3000",
"-e", "SERVER_PORT=3000",
"-e", "BASE_URL=http://localhost:3000/",
"-e", "PAGE_MAX_AGE=1h",
"-e", "PAGE_MAX_COUNT=1000",
"yujiosaka/mcp-html-sync-server"
]
}
}
}
}
The server provides the following MCP tools that can be used by AI agents:
Creates a new HTML page with the specified content.
Tool Name: create_page
Input Schema:
{
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "HTML content for the page body (only the inner content)"
},
"scripts": {
"type": "array",
"description": "Optional array of JavaScript scripts to include in the page",
"items": {
"type": "object",
"properties": {
"src": {
"type": "string",
"description": "URL for external script"
},
"content": {
"type": "string",
"description": "Content for inline script"
}
},
"description": "Either src or content must be provided",
"oneOf": [
{ "required": ["src"] },
{ "required": ["content"] }
]
}
},
"stylesheets": {
"type": "array",
"description": "Optional array of CSS stylesheets to include in the page",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL for external stylesheet"
}
},
"required": ["href"]
}
}
},
"required": ["body"]
}
Example Request:
{
"name": "create_page",
"arguments": {
"body": "<h1>Hello World</h1><p>This is my page content.</p><button id='confetti-btn'>Click for Confetti!</button>",
"scripts": [
{ "src": "https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js" }
],
"stylesheets": [
{ "href": "https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" }
]
}
}
Example Response:
{
"content": [
{
"type": "text",
"text": "Page created successfully! A URL is provided below to view your page."
},
{
"type": "text",
"text": "View your HTML page in URL: http://localhost:3000/abc123"
},
{
"type": "text",
"text": "ID: abc123\nExpires at: 2023-04-15T12:34:56.789Z\n\nUse this ID for future updates before expiration."
}
],
"metadata": {
"id": "abc123",
"url": "http://localhost:3000/abc123",
"expires_at": "2023-04-15T12:34:56.789Z"
}
}
Updates an existing page with new content. All connected clients will see the updates in real-time. If the page does not exist (has been removed or expired), an error response will be returned.
Tool Name: update_page
Input Schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the page to update"
},
"body": {
"type": "string",
"description": "New HTML content for the page body (only the inner content)"
}
},
"required": ["id", "body"]
}
Example Request:
{
"name": "update_page",
"arguments": {
"id": "abc123",
"body": "<h1>Updated Content</h1><p>This content has been updated.</p>"
}
}
Example Response:
{
"content": [
{
"type": "text",
"text": "Page updated successfully! A URL is provided below to view your updated page."
},
{
"type": "text",
"text": "View your HTML page in URL: http://localhost:3000/abc123"
},
{
"type": "text",
"text": "ID: abc123\nExpires at: 2023-04-15T12:34:56.789Z\n\nUse this ID for future updates before expiration."
}
],
"metadata": {
"id": "abc123",
"url": "http://localhost:3000/abc123",
"expires_at": "2023-04-15T12:34:56.789Z"
}
}
Removes a page and disconnects all clients.
Tool Name: destroy_page
Input Schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the page to destroy"
}
},
"required": ["id"]
}
Example Request:
{
"name": "destroy_page",
"arguments": {
"id": "abc123"
}
}
Example Response:
{
"success": true
}
Adds JavaScript scripts to an existing page. All connected clients will receive the scripts in real-time.
Tool Name: add_scripts
Input Schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the page to add scripts to"
},
"scripts": {
"type": "array",
"description": "Array of JavaScript scripts to add to the page",
"items": {
"type": "object",
"properties": {
"src": {
"type": "string",
"description": "URL for external script"
},
"content": {
"type": "string",
"description": "Content for inline script"
}
},
"description": "Either src or content must be provided",
"oneOf": [
{ "required": ["src"] },
{ "required": ["content"] }
]
}
}
},
"required": ["id", "scripts"]
}
Example Request:
{
"name": "add_scripts",
"arguments": {
"id": "abc123",
"scripts": [
{ "content": "alert('Hello World!')" }
]
}
}
Example Response:
{
"content": [
{
"type": "text",
"text": "Scripts added successfully! A URL is provided below to view your page."
},
{
"type": "text",
"text": "View your HTML page in URL: http://localhost:3000/abc123"
},
{
"type": "text",
"text": "ID: abc123\nExpires at: 2023-04-15T12:34:56.789Z\n\nUse this ID for future updates before expiration."
}
],
"metadata": {
"id": "abc123",
"url": "http://localhost:3000/abc123",
"expires_at": "2023-04-15T12:34:56.789Z"
}
}
Adds CSS stylesheets to an existing page. All connected clients will receive the stylesheets in real-time.
Tool Name: add_stylesheets
Input Schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the page to add stylesheets to"
},
"stylesheets": {
"type": "array",
"description": "Array of CSS stylesheets to add to the page",
"items": {
"type": "object",
"properties": {
"href": {
"type": "string",
"description": "URL for external stylesheet"
}
},
"required": ["href"]
}
}
},
"required": ["id", "stylesheets"]
}
Example Request:
{
"name": "add_stylesheets",
"arguments": {
"id": "abc123",
"stylesheets": [
{ "href": "https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" }
]
}
}
Example Response:
{
"content": [
{
"type": "text",
"text": "Stylesheets added successfully! A URL is provided below to view your page."
},
{
"type": "text",
"text": "View your HTML page in URL: http://localhost:3000/abc123"
},
{
"type": "text",
"text": "ID: abc123\nExpires at: 2023-04-15T12:34:56.789Z\n\nUse this ID for future updates before expiration."
}
],
"metadata": {
"id": "abc123",
"url": "http://localhost:3000/abc123",
"expires_at": "2023-04-15T12:34:56.789Z"
}
}
The project includes a manual test script (manual-test.ts) that demonstrates how to use the MCP server. This script:
To run the manual test:
# Run the test script
bun manual-test.ts
The script will provide URLs that you can open in your browser to see the page and observe real-time updates. It uses an interactive approach with confirmation prompts between each step, allowing you to verify the changes in your browser before proceeding to the next step.
This test script is particularly useful for:
# Run in development mode with auto-reload
bun run dev
# Build the project
bun run build
# Run linting
bun run check
# Fix linting issues
bun run check:write
If you see an error like the following when starting the server:
[2025-04-28 18:28:48.370 +0900] ERROR: Error starting server
err: {
"type": "Error",
"message": "Failed to start server. Is port 3000 in use?",
"stack":
Error
at serve (unknown)
at [kRealListen] (node:http:565:41)
at listen (node:http:542:35)
at <anonymous> (/Users/yujiisobe/work/mcp-html-sync-server/node_modules/fastify/lib/server.js:265:12)
at processTicksAndRejections (unknown:7:39)
"code": "EADDRINUSE",
"syscall": "listen",
"errno": 0
}
This means that port 3000 (or whatever port you've configured) is already being used by another application. To resolve this:
Change the port: Edit the .env file and change the SERVER_PORT to a different value (e.g., 3001, 8080, etc.)
Stop the other application: Find and stop the application that's using port 3000. You can use one of these commands to find processes using the port:
# On macOS/Linux
lsof -i :3000
# On Windows
netstat -ano | findstr :3000
Restart your computer: In some cases, a restart can clear orphaned processes that might be holding onto the port.
When using the server with Claude Desktop or VS Code, you may also see JSON parsing errors if the port is already in use. These errors occur because the server can't start properly and is returning error messages instead of valid JSON responses.
docker build -t yujiosaka/mcp-html-sync-server .
This project is licensed under the MIT License. See LICENSE for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP HTML Sync Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-html-sync-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.