Dnstwist

io.github.w0h1v由 GitHub 帳號 w0h1v 發布v1.1.4更新於 Nov 5, 2026

MCP server for dnstwist: detect typosquatting, phishing and brand impersonation domains.

概覽

AI 產生的概覽

呼叫 dnstwist 找出模仿你所擁有網域的搶註、釣魚與品牌仿冒網域,並提供 DNS、郵件、WHOIS 與網頁相似度訊號。

可以做什麼
  • 以全部或指定的 dnstwist 排列演算法為目標網域產生相似網域
  • 只保留已註冊的相似網域,並選擇 JSON、CSV 或清單格式輸出
  • 查詢 DNS 記錄,並標記會接受任意位址郵件的郵件伺服器
  • 擷取 HTTP 與 SMTP 橫幅,查詢 WHOIS 註冊日期與註冊商
  • 以 ssdeep 或 TLSH 比較相似網域網頁與原網站的相似度
適用情境
適合品牌保護與安全評估情境:讓助理列舉並篩選你擁有或獲授權評估的網域的相似網域,例如找出已註冊的仿冒網站或郵件攔截風險。
執行需求
透過 npx 以 stdio 在本機執行。需要 Node.js 20.3 或更新版本,以及本機安裝的 dnstwist(pipx)或 Docker;不需 API 金鑰。可選設定 DNSTWIST_RUNNER(local、docker 或 auto)與 DNSTWIST_TIMEOUT_SECONDS(預設 600)。DNS、WHOIS、HTTP 與 SMTP 查詢需要網路存取。
安裝前請注意
只掃描你擁有或獲授權評估的網域;本專案與 dnstwist 官方無關。1.0.4 及更早版本有命令注入漏洞,請使用 1.0.5 或更新版本。Docker 執行方式需要存取 Docker 守護程序,在多數系統上等同 root 權限。掃描會查詢第三方 DNS、WHOIS、HTTP 與 SMTP 服務,可能較慢或逾時。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

[MCP dnstwist: typosquatting detection for AI agents. Find lookalike, homoglyph and phishing domains with dnstwist over the Model Context Protocol.]

[npm version] [CI] [License: MIT] [Node 20.3 or newer] [MCP Registry]

Quickstart · Tool · Security · Troubleshooting · Docs

mcp-dnstwist is an MCP server that lets AI agents run dnstwist to find domains that imitate yours: typos, homoglyphs, bit flips, swapped TLDs and more. For each registered lookalike it can report DNS records, whether its mail server could intercept your email, WHOIS registration details, and how closely its web page copies yours.

[!NOTE] Independent project, not affiliated with dnstwist. Only scan domains you own or are authorized to assess.

[!IMPORTANT] Versions up to 1.0.4 have a command injection vulnerability (GHSA-p4jr-h3rj-2rw4) and are deprecated. Use 1.0.5 or later; npx -y @burtthecoder/mcp-dnstwist always fetches the latest.

Highlights

  • Lookalike discovery. All of dnstwist's permutation algorithms, or only the ones you pick.
  • Threat signals. DNS records, open mail relays that could intercept email (mxcheck), WHOIS creation date and registrar, HTTP and SMTP banners, and web-page similarity (ssdeep or TLSH) to spot cloned phishing sites.
  • Runs your way. A local dnstwist install, the official dnstwist Docker image, or a self-contained mcp-dnstwist image.
  • Hardened. No shell, strict input validation, and time limits that stop and clean up long scans.
  • Tested. End-to-end tests with fake docker and dnstwist executables run in CI on Node 20, 22 and 24.

How it works

mermaid
flowchart LR    A["AI agent<br/>(Claude, Codex, Gemini, VS Code)"] -->|"MCP over stdio"| S["mcp-dnstwist"]    S -->|"validated argv, no shell,<br/>time limit"| D["dnstwist<br/>(local or Docker)"]    D -->|"DNS, WHOIS, HTTP, SMTP"| I["Lookalike domains"]    D -->|"JSON"| S    S -->|"results"| A

Quickstart

Requirements: Node.js 20.3 or newer, and either dnstwist (pipx install "dnstwist[full]") or Docker. No API key.

sh
# Claude Codeclaude mcp add --transport stdio dnstwist -- npx -y @burtthecoder/mcp-dnstwist
# Codex CLIcodex mcp add dnstwist -- npx -y @burtthecoder/mcp-dnstwist
# Gemini CLIgemini mcp add dnstwist npx -y @burtthecoder/mcp-dnstwist

For Claude Desktop, VS Code, Docker and running from source, see Connect a client.

Then ask your agent: "Which lookalike domains of example.com are registered, and could any of them intercept email?" More prompts are in example workflows.

The tool

One tool, fuzz_domain. Full parameters and real sample output are in the tool reference.

ParameterDefaultWhat it does
domain(required)The domain to imitate, for example example.com
registered_onlytrueOnly return lookalikes that exist
fuzzersallLimit to some algorithms, for example ["homoglyph", "bitsquatting"]
mxchecktrueFlag mail servers that would accept email for any address
bannerstrueCapture HTTP and SMTP banners
whoisfalseRegistration date and registrar
lshoffWeb-page similarity to the original: ssdeep or tlsh
all_recordsfalseAll DNS records, not only the first of each type
nameservers1.1.1.1Up to 10 IPv4 addresses or https://<host>/dns-query URLs
threads50Parallel lookups, 1 to 100
formatjsonjson, csv or list

Settings

VariableDefaultDescription
DNSTWIST_RUNNERautolocal (dnstwist on PATH), docker (the elceef/dnstwist image), or auto (local if available)
DNSTWIST_TIMEOUT_SECONDS600Longest a scan may run. On timeout, cancellation or shutdown the scan is stopped and cleaned up

Security

The tool's arguments come from an AI model, which content it reads can steer, so the server treats them as hostile:

  • No shell. dnstwist starts with execFile and an argument array; a test fails the build if a shell-based API appears.
  • Strict validation. Domains must be hostnames, nameservers IPv4 or DoH URLs, numbers and names from fixed sets. No value can start with -.
  • Bounded runs. Time limits, and cleanup of processes and containers on timeout, cancellation and shutdown.

The Docker runner needs access to the Docker daemon (root-equivalent on most systems). The local runner or the self-contained image avoid that. Details in the security model. Report vulnerabilities privately; see SECURITY.md.

Troubleshooting

  • "Neither dnstwist nor Docker is available": install dnstwist (pipx install "dnstwist[full]") or start Docker. Desktop clients may not see your shell's PATH.
  • Slow on Apple Silicon: the dnstwist Docker image is amd64-only. Install dnstwist locally; it's used automatically.
  • "did not finish within N seconds": include an IPv4 nameserver (DNS-over-HTTPS is slow), turn off whois, lsh or banners, or raise DNSTWIST_TIMEOUT_SECONDS.

More in the troubleshooting guide.

Development

sh
git clone https://github.com/w0h1v/mcp-dnstwist && cd mcp-dnstwistnpm cinpm test    # fake docker and dnstwist executables: no Docker or network needed

See CONTRIBUTING.md and the changelog.

License

MIT. See LICENSE.

來源:README.md,提交 e4dfe4b

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

2
  1. v1.1.4最新Nov 5, 2026
  2. v1.1.1Oct 13, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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