htmlhost-mcp 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/package.json +2 -2
- package/src/api.mjs +1 -1
- package/src/server.mjs +9 -4
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that l
|
|
|
4
4
|
|
|
5
5
|
Works with **Cursor**, **Claude Desktop**, **Windsurf**, **Cline**, **Zed**, and any MCP-compatible tool.
|
|
6
6
|
|
|
7
|
+
**Using Claude with saved htmlhost projects?** Open [htmlhost in Claude’s directory](https://claude.ai/directory/htmlhost), choose **Connect**, then sign in to htmlhost and approve. Enable htmlhost in your chat; the same connection works on web and mobile. No npm install or server URL is needed. The setup below is for coding tools working with local files.
|
|
8
|
+
|
|
7
9
|
## Editing contract
|
|
8
10
|
|
|
9
11
|
The server sends clients instructions to follow **inspect → stage → validate → repair → deploy**, with matching guidance on its pull and deploy tools. Read the [agent guide](https://htmlhost.co/agents.md) before editing. Preserve separate project files and shared header/footer markers, inherit the existing design on new pages, and validate desktop/mobile rendering with the client's own tools. Report checks that could not run.
|
|
@@ -132,7 +134,7 @@ ttl (optional) Time-to-live: 1d, 7d, 30d, or never
|
|
|
132
134
|
|
|
133
135
|
### `list_sites`
|
|
134
136
|
|
|
135
|
-
Returns all your sites, their URLs, sizes, TTLs, and plan usage, plus `shared`: the sites shared with you
|
|
137
|
+
Returns all your sites, their URLs, sizes, TTLs, and plan usage, plus `shared`: the sites shared with you, with their owner and your `role` (`admin`, `editor`, `contributor` or `viewer`). Admins and Editors pull, deploy to and restore those with your own key; Contributors pull and save drafts but can't publish; Viewers can't change them. Only the owner can delete a site.
|
|
136
138
|
|
|
137
139
|
### `get_site`
|
|
138
140
|
|
|
@@ -216,7 +218,7 @@ MIT
|
|
|
216
218
|
|
|
217
219
|
## Unpublished sites and drafts
|
|
218
220
|
|
|
219
|
-
Unpublished websites remain private until publishing is explicitly confirmed.
|
|
221
|
+
Unpublished websites remain private until publishing is explicitly confirmed. Admins and Editors on a shared site can publish with confirmation and unpublish; Contributors save drafts only. The server also cancels deployments still running when someone unpublishes.
|
|
220
222
|
|
|
221
223
|
- `deploy` / `deploy_html`: use `isDraft: true` to save without changing publication. To publish an unpublished site, obtain the user's explicit agreement to make it public, then pass `confirmPublish: true`.
|
|
222
224
|
- `restore_version` also requires `confirmPublish: true` for an unpublished website; its general `confirm` argument is insufficient.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htmlhost-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "MCP server for htmlhost.co
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "MCP server for htmlhost.co — deploy, list, and manage sites from AI coding tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"htmlhost-mcp": "bin/htmlhost-mcp.mjs"
|
package/src/api.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { createHash } from "node:crypto";
|
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
const CONFIG_PATH = join(homedir(), ".htmlhostrc");
|
|
16
16
|
/** Sent with every request, so the API can tell which version is calling. Kept in step with server.mjs. */
|
|
17
|
-
export const CLIENT_VERSION = "1.
|
|
17
|
+
export const CLIENT_VERSION = "1.7.0";
|
|
18
18
|
const DEFAULT_API = "https://htmlhost.co";
|
|
19
19
|
|
|
20
20
|
export function readConfig() {
|
package/src/server.mjs
CHANGED
|
@@ -69,7 +69,7 @@ export function createServer() {
|
|
|
69
69
|
"For focused edits, inspect the element, parent layout and relevant styles first; expand investigation as needed without skipping validation. " +
|
|
70
70
|
"When resuming staged work, verify the original project is unchanged and retain validation failures; never treat a pause as successful completion. " +
|
|
71
71
|
"Keep HTML/CSS/JS as separate files. New pages inherit the site's design, header, footer and dependencies; preserve shared markers and synchronize shared copies. " +
|
|
72
|
-
"Check references, forms and desktop/mobile rendering with your own tools, and disclose unavailable checks. These hosting tools do not run the editor's validation loop. " +
|
|
72
|
+
"Check references, forms and desktop/mobile rendering with your own tools, and disclose unavailable checks. A frozen static render cannot verify animation playback. These hosting tools do not run the editor's validation loop. " +
|
|
73
73
|
"Deploy the complete project folder with the existing slug when updating; do not replace a multi-file site with deploy_html or a lone HTML file.",
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -135,9 +135,11 @@ export function createServer() {
|
|
|
135
135
|
{
|
|
136
136
|
title: "List sites",
|
|
137
137
|
description:
|
|
138
|
-
"List the authenticated user's sites on htmlhost.co, and the sites shared with them
|
|
138
|
+
"List the authenticated user's sites on htmlhost.co, and the sites shared with them (`shared`, with the user's `role`). " +
|
|
139
139
|
"Returns slug, URL, title, size, TTL, and expiration for each site. " +
|
|
140
|
-
"
|
|
140
|
+
"On a shared site the role decides: admin and editor pull, deploy and restore; contributor pulls and saves drafts " +
|
|
141
|
+
"(isDraft: true) but can't publish, so ask the owner, an admin or an editor to publish; viewer changes nothing. " +
|
|
142
|
+
"Only the owner can delete a site.",
|
|
141
143
|
inputSchema: z.object({}),
|
|
142
144
|
},
|
|
143
145
|
wrap(async () => {
|
|
@@ -161,6 +163,9 @@ export function createServer() {
|
|
|
161
163
|
url: `https://${s.slug}.htmlhost.co`,
|
|
162
164
|
title: s.title || null,
|
|
163
165
|
owner: s.owner || null,
|
|
166
|
+
role: s.role || "editor",
|
|
167
|
+
canEdit: s.canEdit ?? true,
|
|
168
|
+
canPublish: s.canPublish ?? true,
|
|
164
169
|
isMultiPage: s.isMultiPage,
|
|
165
170
|
isPublished: s.isPublished,
|
|
166
171
|
draftVersion: s.draftVersion,
|
|
@@ -414,7 +419,7 @@ export function createServer() {
|
|
|
414
419
|
|
|
415
420
|
server.registerTool("unpublish_site", {
|
|
416
421
|
title: "Unpublish a website",
|
|
417
|
-
description: "
|
|
422
|
+
description: "For the owner, an admin or an editor: stop public serving while retaining files, saved drafts and history. Obtain the user's explicit confirmation first.",
|
|
418
423
|
inputSchema: z.object({ slug: z.string(), confirm: z.boolean().describe("True only after the user agrees to take this website offline") }),
|
|
419
424
|
}, wrap(async ({ slug, confirm }) => {
|
|
420
425
|
if (!isLoggedIn()) return NOT_SIGNED_IN;
|