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 分