Html Share
MCP server to share html via GCS
Installation
npx mcp-html-shareAsk AI about Html Share
Powered by Claude · Grounded in docs
I know everything about Html Share. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MCP HTML Share
A Go-based MCP (Model Context Protocol) server that shares HTML content via Google Cloud Storage. Upload HTML and get back a public URL.
Usage Example
An LLM can use this tool to create and share web content:
User: "Create a data visualization showing monthly sales trends and share the URL"
Assistant: "I'll create an interactive chart and upload it for you"
{
"tool": "share-html",
"arguments": {
"html_content": "<html>... chart content ...</html>",
"short_name": "sales-trends-2024"
}
}
Result: https://storage.cloud.google.com/your-bucket/sales-trends-2024-a1b2c3d4.html
Quick Start
Using Docker
docker run -p 8080:8080 -p 9090:9090 \
-e GOOGLE_APPLICATION_CREDENTIALS=/creds/credentials.json \
-v /path/to/credentials.json:/creds/credentials.json \
ghcr.io/loveholidays/mcp-html-share:latest \
--bucket=your-bucket-name
Using Pre-built Binary
Download from releases or install via Homebrew:
brew tap loveholidays/tap
brew install mcp-html-share
Run the server:
mcp-html-share --bucket=your-bucket-name --transport=http
Configuration
Required Setup
-
Create a GCS bucket:
gcloud storage buckets create gs://your-bucket-name --location=US -
For public URLs (default):
gcloud storage buckets add-iam-policy-binding gs://your-bucket-name \ --member=allUsers \ --role=roles/storage.objectViewer -
Set up authentication (choose one):
- Service Account:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json - Application Default:
gcloud auth application-default login
- Service Account:
Command Line Flags
--bucket(required): GCS bucket name--transport:http(default in Docker) orstdio(for Claude Desktop)--http-port: HTTP port (default: "8080")--health-port: Health/metrics port (default: "9090")--public-url: Return public URLs (default: true) or signed URLs (false)
MCP Tools
share-html
Upload HTML content and get a public URL.
Request:
{
"tool": "share-html",
"arguments": {
"html_content": "<html><body><h1>Hello World</h1></body></html>",
"short_name": "hello-world"
}
}
Response:
{
"url": "https://storage.cloud.google.com/your-bucket/hello-world-12345678.html"
}
Using with Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"html-share": {
"command": "npx",
"args": [
"mcp-remote",
"https://your-mcp-html-share-server.example.com"
]
}
}
}
For local development with stdio:
{
"mcpServers": {
"html-share": {
"command": "mcp-html-share",
"args": ["--bucket", "your-bucket-name", "--transport", "stdio"]
}
}
}
Endpoints
- MCP Server:
http://localhost:8080(when using--transport=http) - Health:
GET http://localhost:9090/livez - Metrics:
GET http://localhost:9090/metrics(Prometheus format)
Development
# Clone and build
git clone https://github.com/loveholidays/mcp-html-share
cd mcp-html-share
make build
# Run tests
make test
# Run locally
make run-http BUCKET=your-bucket-name
License
LGPL-3.0 - see LICENSE file.
