Unlocalhost

io.github.info-arnav由 GitHub 帳號 info-arnav 發布v0.1.1更新於 Oct 24, 2026

Deploy localhost to a private, authenticated link from your AI coding agent.

概覽

AI 產生的概覽

一個 MCP 伺服器,讓程式設計助理把本機應用程式部署成需要登入、僅限指定訪客開啟的私有連結。

可以做什麼
透過瀏覽器裝置授權登入 unlocalhost 服務,權杖會自動保存供後續呼叫使用。請助理部署目前專案:使用你自己的 git 憑證推送程式碼、掃描已提交的密鑰,然後建置並執行。指定誰可以開啟已部署的應用程式,訪客以 GitHub 或 Google 登入,其驗證過的電子郵件會與訪客名單比對。管理已部署應用程式的共用與存取權限,移除某人後存取立即失效。可將工具指向自架的 unlocalhost 執行個體,而非託管服務。
適用情境
適合用程式設計助理完成應用程式後,想要一個持久、只有受邀者能開啟的網址,而不必自行撰寫驗證或架設伺服器的情況。也適合偏好自架部署服務的團隊。
執行需求
透過 npx 從 npm 套件在本機執行,需要 Node.js。首次需在瀏覽器以 GitHub 登入。UNLOCALHOST_TOKEN 密鑰通常由登入工具在裝置授權後寫入;UNLOCALHOST_URL 為選用,用於指向自架執行個體。自架服務另需具備萬用字元 DNS 的網域、DNS 供應商 API 權杖、GitHub App 與 Google OAuth 用戶端。
安裝前請注意
部署會把程式碼推送到儲存庫並在服務上執行,請先確認送出的內容。服務以唯讀方式複製儲存庫並掃描已提交的密鑰,發現即拒絕部署,但仍應避免把密鑰提交進儲存庫。訪客名單的變更決定誰能存取應用程式,移除某人會立即撤銷其存取。此權杖可存取你的 unlocalhost 帳戶,應妥善保密。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Unlocalhost,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[unlocalhost]

unlocalhost

Turn localhost into a link only the people you name can open.

Sign in is built in, so you write no auth code and touch no servers.

Website · Docs · MIT licensed · Self hostable


The problem

Your coding agent can write the whole application. It cannot host it, because hosting needs a server, a domain, a certificate, and a login system. So people reach for whatever is fastest, and that is where things go wrong: a public URL with no sign in, an API key committed by accident, or auth bolted on at the end by someone who has never written auth.

unlocalhost closes that gap. You say one sentence to the agent you already have open, and you get back a real URL with a guest list in front of it.

you    deploy this and let [email protected] in
agent  pushed your code to a private repoagent  buildingagent  live at sarahs-todo.unlocalhost.techagent  [email protected] can sign in and open it

How it works

  1. You add unlocalhost to your coding agent as an MCP server and sign in once with GitHub.
  2. You tell the agent to deploy, and name who is allowed in.
  3. Your agent pushes the code using your own git credentials. unlocalhost never holds write access to anything.
  4. We clone read only, scan for committed secrets and refuse to continue if we find any, then build and run it.
  5. Visitors sign in with GitHub or Google. Their verified email is checked against the guest list before the request ever reaches your app.

What makes it different

Tunnel (ngrok)Platform (Vercel)unlocalhost
Survives closing laptopNoYesYes
Private by defaultNoNoYes
Auth you have to writeAll of itAll of itNone
Runs on your own serverNoNoYes

Quick start

bash
claude mcp add unlocalhost -- npx -y @unlocalhost/unlocalhost

Or in any MCP client config:

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

Then ask your agent to sign in to unlocalhost, and deploy.

Self hosting

The hosted service runs this exact code. Nothing is held back, there is no phone home, and no license check.

bash
git clone https://github.com/info-arnav/unlocalhost.gitcd unlocalhost/deploycp .env.example .env      # fill it indocker compose --env-file .env run --rm migratedocker compose --env-file .env up -d

You need a domain with wildcard DNS, a DNS provider API token for wildcard TLS, a GitHub App, and a Google OAuth client. The full walkthrough is in docs/server-setup.md.

Architecture

internet :443 → Caddy → auth-gate /verify → activator → Dokku → your app
PackageJob
webLanding page, sign in screens, docs
server/gatewayPublic API ingress, CORS, rate limiting, request ids
server/services/auth-gateOAuth, sessions, and the allowlist check on every request
server/services/control-planeApps, sharing, GitHub App, deploy pipeline
server/services/activatorWakes sleeping apps, puts idle ones back to sleep
server/services/mcp-serverThe unlocalhost npm package your agent talks to
server/sharedDatabase, logging, crypto, errors, sessions

Borrowed rather than built: Dokku and Nixpacks turn a repository into a running container, Caddy handles wildcard TLS. The novel part is small on purpose.

Security

  • Apps are private until you name someone. Removing them revokes access at once.
  • Every deploy is scanned for committed secrets and refused if any are found.
  • Sign in is enforced at the edge, before a request reaches your app.
  • Environment variables are encrypted at rest with AES 256 GCM.
  • We hold read only access, and only to repositories you pick.

Found a vulnerability? Please follow SECURITY.md rather than opening a public issue.

Contributing

Read CONTRIBUTING.md first. In short: every backend module follows routes → controller → service → repository, code carries no comments, and there are no test files. Verification is done by running things.

Licence

MIT. See LICENSE.

來源:README.md,提交 083d851

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分