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 分