Hostsmith

io.github.hostsmith由 GitHub 帳號 hostsmith 發布v1.6.1更新於 Oct 29, 2026

Deploy static sites on Hostsmith - give it a file, get a live HTTPS URL. EU/US residency.

已驗證Streamable HTTP可網頁執行雲端與基礎設施檔案與儲存

概覽

AI 產生的概覽

Hostsmith 讓助理把產生的檔案與靜態網站發佈到 Hostsmith 託管平台,並取回可公開存取的 HTTPS 網址。

可以做什麼
  • 列出、檢視、建立與刪除託管網站,並查看網站公開網址與部署狀態
  • 列出可用網域(共用網域與自訂網域),用來選擇新網站的網域
  • 讀取帳戶資訊、訂閱方案額度與目前用量
  • 將內嵌的文字、HTML 或 JSON 內容直接部署到網站
  • 為二進位檔與大型檔案發起並完成直傳,再確認部署結果
適用情境
適合助理產出 HTML 報告、單頁介紹、示範頁面等靜態成品,而使用者希望不必建立儲存庫、建置流程或 CI 就能取得可分享的網址。也適用於託管資料必須放在指定歐盟或美國資料駐留分區的情況。
執行需求
需要 Hostsmith 帳戶並以 OAuth 2.0 授權,不支援靜態存取權杖。可作為遠端託管端點使用,也可透過 npm 套件在本機以 Node.js(npx)執行。上傳二進位檔或大型檔案時,助理所在環境需能對外連線至分區 API 主機的 HTTPS。選用環境變數可覆寫應用程式網址、API 網域、基礎 URL 與連接埠。
安裝前請注意
刪除網站是永久性的,網址會立即失效,且需要明確確認。建立與部署網站會寫入使用者的 Hostsmith 帳戶資料並佔用方案額度。上傳會把檔案內容送往 Hostsmith 分區 API 主機或直連 S3 端點,資料會離開本機環境。OAuth 授權讓伺服器可存取使用者帳戶,可在用戶端撤銷。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Hostsmith,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.hostsmith%2Fmcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "hostsmith": {
      "type": "http",
      "url": "https://mcp.hostsmith.net/mcp"
    }
  }
}

README

@hostsmith/mcp-server

[CI] [Latest Release] [Node Version] [License: MIT] [MCP]

[Hostsmith MCP connector – tool definition quality and endpoint health on Glama] [Hostsmith MCP on mcprush]

Official Model Context Protocol server for the Hostsmith hosting platform.

Static hosting for agents - give it a file, get a live URL. Claude Code shipping an HTML report. Cursor previewing a generated demo. Claude publishing a one-pager from claude.ai or Desktop. One MCP call → public HTTPS URL in seconds. No repo, no CI, no build step. Custom domains, private sites, EU or US data residency.

[Deploy a page from Claude Code and get a live URL]

Why Hostsmith

  • Artifact-first. No repo, no build config - drop a file (or have the agent generate one), get a URL.
  • Built for agents. MCP-native, OAuth-scoped, structured tool descriptions agents can chain.
  • EU or US data residency. Pick where the user's data lives, architecturally - not via a checkbox.

Tools

ToolDescription
list_sitesList all sites in your account for a given data partition
get_siteGet details of a specific site
create_siteCreate a new site
delete_siteDelete a site
list_domainsList available domains (shared and custom)
get_accountGet account info, subscription plan, and usage
deploy_filesDeploy inline file contents to a site
deploy_create_uploadStart a direct upload for binaries / large files
deploy_finalizeCommit a deploy started with deploy_create_upload

Usage

Authentication is via OAuth 2.0. Static access tokens are not supported.

Claude (claude.ai, Desktop, Cowork, mobile)

Add Hostsmith once as a custom connector and it works in every Claude app on your account.

  1. In Claude, open Customize > Connectors, click + Add, then Add custom connector.

  2. Enter Hostsmith as the name and paste the MCP server URL:

    https://mcp.hostsmith.net/mcp
  3. Click Continue, finish adding the connector, then connect it. Claude opens Hostsmith in your browser to authorize the connector against your Hostsmith account.

Free Claude plans allow one custom connector. On Team and Enterprise plans, an owner adds the connector under Organization settings > Connectors, and each member then clicks Connect next to Hostsmith under Customize > Connectors to sign in with their own Hostsmith account.

Claude asks for your approval before each tool call. To change that, open Hostsmith under Customize > Connectors and set its Tool permissions.

To revoke, open Hostsmith under Customize > Connectors, click ⋯, then Remove (Team and Enterprise owners: Organization settings > Connectors). To force a re-auth, click Disconnect, then Connect.

Stdio (Claude Code, Cursor, Cline, Windsurf, Zed)

Add this entry to your MCP client's config:

json
{  "mcpServers": {    "hostsmith": {      "command": "npx",      "args": ["-y", "@hostsmith/mcp-server"]    }  }}

The first tool call triggers an OAuth flow in your browser to authorize the server against your Hostsmith account.

Remote URL (other clients)

Any MCP client that supports remote Streamable HTTP transport can point directly at the hosted server:

json
{  "mcpServers": {    "hostsmith": {      "url": "https://mcp.hostsmith.net/mcp"    }  }}

The client handles the OAuth flow automatically - you'll be redirected to Hostsmith to authorize access.

Claude Code can use the hosted server directly too:

bash
claude mcp add --transport http hostsmith https://mcp.hostsmith.net/mcp

Cursor (one-click install)

[Add to Cursor]

Click the badge to add the remote Hostsmith server (https://mcp.hostsmith.net/mcp) to Cursor. The first tool call triggers OAuth in your browser.

Local HTTP (self-hosted)

Run the server in HTTP mode and have your MCP client perform OAuth against it:

bash
npx @hostsmith/mcp-server http
json
{  "mcpServers": {    "hostsmith": {      "url": "http://localhost:3100/mcp"    }  }}

Embedding the HTTP handler

createFetchHandler returns a Web-Standard (req: Request) => Promise<Response> handler, for hosting the server in your own runtime (a Lambda, an edge worker, a Node server). It reads no environment variables; pass the configuration:

ts
import { createFetchHandler } from "@hostsmith/mcp-server";
const handler = createFetchHandler({  hostsmithUrl: "https://hostsmith.net",  mcpBaseUrl: "https://mcp.example.com",  // Optional: called for every authenticated MCP request with that  // request's new McpServer and the access token's decoded claims,  // before the server handles the request.  onServer: async (server, { claims }) => {    // e.g. attach your own instrumentation to `server`  },});

onServer is awaited. If it throws, the error is logged and the request is handled as if there were no hook. The claims are decoded, not verified; the Hostsmith API verifies the token on every tool call. Hostsmith's hosted server at mcp.hostsmith.net uses this hook for its usage analytics. The package itself contains no analytics client and sends no telemetry, and the CLI passes no hook.

Environment variables

VariableDefaultDescription
HOSTSMITH_URLhttps://hostsmith.netHostsmith app URL (OAuth endpoints).
HOSTSMITH_API_DOMAIN-Override the upstream API domain across both partitions. The server prepends us.api. and eu.api. to the value you set. Example: HOSTSMITH_API_DOMAIN=staging.example.com routes calls to https://us.api.staging.example.com and https://eu.api.staging.example.com. Use this to point at a staging or proxied API host.
HOSTSMITH_BASE_URL-Override the API base URL with a single fixed value, bypassing partition selection entirely.
PORT3100HTTP server port.
MCP_BASE_URLhttp://localhost:$PORTPublic URL of the MCP server, used in OAuth metadata.

Network access

The MCP transport and OAuth flow run in your client's app process and need no agent-sandbox configuration - if your MCP client connected, those paths are working.

The one place sandboxed agents commonly fail is the upload PUT during deploy_create_upload + deploy_finalize: the bytes go from the agent's shell to the partition API host. From the agent terminal, allow outbound HTTPS (port 443) to:

  • us.api.hostsmith.net (for sites in the us partition)
  • eu.api.hostsmith.net (for sites in the eu partition)

Sandbox-specific snippets (Cursor sandbox.json, Claude Code settings.json, Codex config.toml, generic firewall guidance) live in the Network access docs.

The server's own calls to the Hostsmith API identify themselves with User-Agent: hostsmith-mcp-server/<version> hostsmith-js-sdk/<version>.

Troubleshooting

  • Tool calls return 401: the OAuth session expired. Reconnect from your MCP client to re-authorize.
  • OAuth redirect loops: confirm MCP_BASE_URL matches the URL your MCP client uses to reach the server.
  • Wrong partition: tool calls accept an explicit partition arg; if you omit it, the partition is inferred from your access token.
  • Upload PUT fails (DNS, refused, proxy, timeout): the agent's shell can't reach the partition API host. See Network access.
  • Inspect the install: npx @modelcontextprotocol/inspector npx -y @hostsmith/mcp-server http to browse tools interactively.

Documentation

Deeper material lives at hostsmith.net/docs/mcp.

Contributing

See CONTRIBUTING.md (including the Releases section for the version-stamping flow). Security issues: see SECURITY.md.

License

MIT

來源:README.md,提交 9aee223

工具

9

list_sites

List sites

List Hostsmith sites in the user's account. Returns each site's `siteId`, `subdomain`, `domain`, and current status - feed `siteId` into `get_site`, `deploy_files`, `deploy_create_upload`, or `delete_site`. This is the source of truth for "does the user already have a site at FQDN X" - call it before any create/deploy/delete to resolve the user's site reference. By default queries all data partitions and merges the results; pass `partition: "us"` or `"eu"` to limit the query.

輸入參數partition

list_domains

List domains

List domains the user can host sites under. Returns shared hosting domains (e.g. `hostsmith.link`, available to everyone) and custom domains owned by the user's organization. Use this to pick a `domain` value before calling `create_site`. By default queries all partitions and merges; pass `partition` or `shared` to narrow.

輸入參數sharedpartition

get_account

Get account

Get the user's account: organization details (`orgId`, `orgName`), the calling user's home partition under `user.homePartition`, current subscription plan with its limits (max sites, max domains, storage, bandwidth), and current usage counts. Use to check how much headroom the user has before creating new sites or to confirm plan-tier features. Usage is summed across all partitions.

無需輸入參數。

get_site

Get site

Get full details of a specific Hostsmith site by ID, including its public URL (`https://<subdomain>.<domain>`), current deployment status, and configuration. Use after `list_sites` to inspect a single site, or after `deploy_files` / `deploy_finalize` to confirm the site is live and grab the URL to share with the user. Defaults to the user's home partition; pass `partition` explicitly when the site lives in a different one (visible in `list_sites` output).

輸入參數siteId必填partition

create_site

Create site

Create a new Hostsmith site and return its `siteId`, full URL, and configuration. Use when the user wants to publish or host new content and no suitable site already exists. After creation, deploy content with `deploy_files` (small inline text) or `deploy_create_upload` + `deploy_finalize` (binaries / files > ~1 MB, uploaded directly to S3). The site-resolution and confirmation flow is described in the global server instructions; the rules below are specific to this tool's parameters. `domain` MUST be one of the domains returned by `list_domains` for this user - never invent or assume one. The selected domain must be in `active` status; if it isn't, surface the problem to the user instead of attempting creation. `partition` passed to this tool MUST match the partition of the selected domain. Subdomain selection must respect the domain's capabilities from `list_domains`. To serve the bare apex, pass `subdomain: "www"` - only valid when the domain has `enableApexDomain: true` (typically custom domains the user owns). For any other subdomain, the domain must have `enableSubdomains: true`; shared hosting domains (e.g. `*.hostsmith.link`) and most custom domains have `enableApexDomain: false`, so a non-apex subdomain is required there. If the chosen domain doesn't support the kind of site the user asked for (apex vs subdomain), surface the conflict rather than silently picking something else.

輸入參數domain必填partitionsubdomain

delete_site

Delete site

Permanently delete a Hostsmith site and all of its deployed files. **Destructive - only call after explicit user confirmation.** The site URL becomes unreachable immediately and the content cannot be recovered. The user must pass `confirm: true` for the deletion to proceed; otherwise the call returns an error explaining the safeguard.

輸入參數siteId必填confirmpartition

deploy_files

Deploy files (inline)

Publish in-memory file contents to a Hostsmith site without writing to disk. Use when you have just generated content (an HTML page, a report, JSON data) and the user wants it live. Returns the deployment version and status; call `get_site` afterwards if you need the public URL to share. The site must already exist - call `create_site` first if you do not have a `siteId`. Deploying to a site that already has content overwrites it - confirm overwrite with the user first. **Anti-pattern:** do not use this tool to ship binaries (images, PDFs, video, fonts, zips) by base64-embedding or data-URI inlining them into HTML/CSS/JSON. Binaries belong on `deploy_create_upload`. If that path is blocked by sandbox/network, escalate to the user (ask them to enable egress, or offer manual upload of the presigned URL) - never reach for this tool as a workaround. Inlining bloats pages, breaks browser caching, and reships the bytes on every deploy.

輸入參數files必填siteId必填partition

deploy_create_upload

Start S3 upload

Start a direct-to-S3 upload for binary or large files. Use this instead of `deploy_files` for binaries (PDF, image, video, zip) or any file > ~1 MB. The MCP server has no access to the user's filesystem and `deploy_files` ships content inline through Lambda (capped at ~6 MB JSON-RPC payloads); this tool returns presigned S3 PUT URLs so the file bytes flow directly from your environment to S3, never through the MCP server. **Bundle into a zip first when:** the upload contains more than 3 files OR any file is larger than ~1 MB. The fileWorker auto-extracts a single-zip upload after promotion, so subdirectories are preserved end-to-end and you avoid one PUT round-trip per file. Skip zipping only for the trivial single-small-file case (e.g. one HTML). Bash bundle-and-deploy template (the agent should adapt fileNames and the cleanup prompt): TMP=$(mktemp -d) zip -r "$TMP/site.zip" index.html styles.css img/ # add every file/dir to deploy SIZE=$(stat -c%s "$TMP/site.zip" 2>/dev/null || stat -f%z "$TMP/site.zip") # 1. call deploy_create_upload with { siteId, files: [{ fileName: "site.zip", fileSize: $SIZE }] } # 2. PUT $TMP/site.zip to the returned URL(s) per the protocol below, capturing ETag # 3. call deploy_finalize with { siteId, versionId, completions: [...] } # 4. ASK THE USER: "Deploy succeeded. Remove temp folder $TMP? [y/N]" # Only run `rm -rf "$TMP"` after explicit confirmation; otherwise leave it for them to inspect. Three-step protocol: 1. Call this tool with `{ siteId, files: [{ fileName, fileSize }] }`. Receive `{ versionId, files: { [fileName]: { uploadId, key, partUploadUrls: [{ part, url }], partSize, expiresAt } } }`. 2. For each file, slice the bytes into chunks of `partSize` and PUT each chunk to its `partUploadUrls[i].url`. **Capture the `ETag` response header from every PUT** - you will need it for finalize. Single-part (small file, one URL): `curl -D - -X PUT --data-binary @file.pdf "$URL"`, then grep the

輸入參數files必填siteId必填partition

deploy_finalize

Finalize deploy

Commit a deploy started with `deploy_create_upload`. Pass the `versionId` from the start response and a `completions` array containing the agent-collected ETags for each multi-part file (single-part uploads - those whose start response had an empty `uploadId` - do not need a completion entry). Returns the live site URL on success. The site must belong to the authenticated user; bearer-token auth is re-validated server-side, so holding presigned URLs alone does not let an unrelated caller finalize.

輸入參數siteId必填partitionversionId必填completions

版本歷史

3
  1. v1.6.1最新Oct 22, 2026
  2. v1.6.0Oct 11, 2026
  3. v1.5.2Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分