html-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@html-mcpDisplay this HTML report in the viewer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
html-mcp
An always-open HTML viewer for AI agent output, exposed as an MCP tool.
html-mcp is a single Go binary with two subcommands:
html-mcp serve— a long-lived HTTP server that stores HTML documents (SQLite + FTS5 full-text search) and serves a live web UI to browse, search, and view them.html-mcp mcp— a lightweight stdio MCP server exposing a single tool,send_html, that forwards a document to the runningserveprocess over localhost HTTP.
The two-process split is intentional: serve owns storage and stays
running; mcp is disposable — an agent's MCP client launches and tears it
down at will, and it forwards to whichever serve instance is listening on
the resolved port.
How it works
AI agent (MCP client)
│ stdio (JSON-RPC)
▼
html-mcp mcp ──────────────► html-mcp serve ──────► SQLite (docs.db)
(forwards send_html) (HTTP API + + files/ (raw HTML)
embedded web UI)
│
▼
Browser at http://localhost:7420/
(table view, search, live SSE updates,
detail view for a given document)send_htmlposts toserve'sPOST /api/documentsand returns the new document's id/name, or an error ifserveisn't reachable.The web UI polls/streams
GET /api/events(SSE) so newly ingested documents appear live without a manual refresh.
Related MCP server: pulp
Requirements
Go 1.26+ (see
go.mod)Node.js 18+ and npm — only needed for the Playwright e2e suite
SQLite is vendored via
modernc.org/sqlite(pure Go, no cgo/system SQLite required)
Getting started
git clone <this-repo>
cd html-mcp
go build ./...Run the server
go run . serve
# or, after building:
./html-mcp serveBy default serve listens on port 7420 and stores data under
~/.local/share/html-mcp (XDG-style). Open http://localhost:7420/ to see
the web UI.
Flags and environment overrides:
Setting | Flag | Env var | Default |
Data dir |
|
|
|
Port |
|
|
|
Override priority (highest to lowest): flag > env var > default.
go run . serve --port 8080 --data-dir /tmp/html-mcp-dataRun the MCP server
html-mcp mcp is meant to be launched by an MCP client (e.g. an AI coding
assistant), not run interactively — it speaks JSON-RPC over stdio and
forwards send_html calls to a running serve process. Point an MCP
client's config at the built binary:
{
"mcpServers": {
"html-mcp": {
"command": "/absolute/path/to/html-mcp",
"args": ["mcp"]
}
}
}If serve is running on a non-default port, pass --port (or set
HTML_MCP_PORT) so mcp forwards to the right instance:
html-mcp mcp --port 8080serve must already be running for send_html calls to succeed; mcp
returns a tool-level error (visible to the agent) rather than crashing if
serve isn't reachable.
Development
Common dev commands are also available as make targets — run make help for
the full list (build, test, vet, fmt, check, e2e, clean). The Makefile only wraps
the raw commands documented below; either approach works.
Project layout
main.go CLI entrypoint, subcommand dispatch (serve/mcp)
internal/config/ XDG data dir + port resolution (flag > env > default)
internal/server/ serve subcommand wiring: bind, storage, router, shutdown
internal/api/ HTTP API: POST/GET /api/documents, GET /api/events (SSE)
internal/storage/ SQLite storage layer + FTS5 search
internal/mcp/ stdio MCP server (send_html tool), forwards to serve's API
web/ Embedded web UI (index.html, app.js, app.css) via go:embed
e2e/ Playwright browser smoke tests against the real serve binaryBuild
go build ./...Run tests
Go unit and integration tests (includes a real subprocess MCP handshake
test in main_mcp_e2e_test.go):
go test ./...Vet and format:
go vet ./...
gofmt -l .Browser/e2e smoke tests (Playwright drives a real html-mcp serve binary,
not a mock):
npm install
npx playwright install chromium # first run only, if browsers aren't cached
npm run test:e2eThe e2e suite builds and runs go run . serve on port 7421 against a
throwaway data dir (./.e2e-data, gitignored), so it can run alongside a
dev instance on the default port 7420 without conflict.
HTTP API reference
All endpoints are served by html-mcp serve:
Method | Path | Description |
POST |
| Ingest a document ( |
GET |
| List documents, most-recent-first; |
GET |
| Get document metadata |
GET |
| Get raw HTML content ( |
GET |
| Server-Sent Events stream; broadcasts newly ingested documents |
name is required on ingest; description, tags, and html default to
empty strings.
Data storage
serve creates its data directory on startup if it doesn't exist:
docs.db— SQLite database (document metadata + FTS5 index)files/— raw HTML content per document
Only one serve instance can bind a given port at a time; a second
instance on the same port fails fast with a clear error instead of
silently queuing behind the first.
License
No license file is currently present in this repository.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceEnables AI assistants to inspect web pages, monitor network requests, extract HTML, analyze console output, and examine DOM elements in real-time through a Playwright-powered browser.Last updated347MIT
- Alicense-qualityCmaintenanceEnables AI agents to collaboratively design and edit web pages on an infinite canvas using real HTML/CSS, with tools for reading, mutating, and exporting documents.Last updated899LGPL 3.0
- Alicense-qualityAmaintenanceEnables AI agents to render and interact with rich HTML one-pagers on a local canvas, with tools for rendering, commenting, selection, and status queries.Last updated44MIT
- AlicenseAqualityBmaintenanceEnables AI coding assistants to visually inspect local web pages by providing screenshots, console errors, and sanitized DOM snapshots.Last updated1158MIT
Related MCP Connectors
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Human feedback for AI agents: share HTML, get a live review link, read anchored notes as markdown.
Publish HTML to private, unguessable, replace-in-place URLs from any MCP-compatible AI agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fernandodeperto/HTML-Reader'
If you have feedback or need assistance with the MCP directory API, please join our Discord server