@burtthecoder/mcp-dnstwist

中文文档
1.1.4发布于 2026/11/05MITES Module构建来源已验证近 30 天下载 2011

MCP server for dnstwist: find typosquatting, homoglyph and lookalike domains used for phishing and brand impersonation

原始使用文档
文档目录9 节
  1. Highlights
  2. How it works
  3. Quickstart
  4. The tool
  5. Settings
  6. Security
  7. Troubleshooting
  8. Development
  9. License

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

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.

# Claude Code
claude mcp add --transport stdio dnstwist -- npx -y @burtthecoder/mcp-dnstwist

# Codex CLI
codex mcp add dnstwist -- npx -y @burtthecoder/mcp-dnstwist

# Gemini CLI
gemini 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

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

See CONTRIBUTING.md and the changelog.

License

MIT. See LICENSE.

版本与发布记录

@burtthecoder/mcp-dnstwist 共发布 13 个版本,首次发布于 2024/12/20;过去 12 个月发布了 8 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.1.4latest2026/11/054 天前
1.1.32026/11/045 天前
1.1.22026/11/045 天前
1.1.12026/10/1327 天前
1.1.02026/10/1327 天前
1.0.72026/10/1327 天前

关于 @burtthecoder/mcp-dnstwist 的常见问题

@burtthecoder/mcp-dnstwist 是什么?

MCP server for dnstwist: find typosquatting, homoglyph and lookalike domains used for phishing and brand impersonation

如何安装 @burtthecoder/mcp-dnstwist?

在项目目录运行 npm install @burtthecoder/mcp-dnstwist,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 mcp-dnstwist,可以用 npx mcp-dnstwist 直接运行。

@burtthecoder/mcp-dnstwist 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/burtthecoder__mcp-dnstwist 是否存在。

@burtthecoder/mcp-dnstwist 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@burtthecoder/mcp-dnstwist 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.3。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@burtthecoder/mcp-dnstwist 可以商用吗?

@burtthecoder/mcp-dnstwist 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@burtthecoder/mcp-dnstwist 的下载量有多少?

根据 npm 官方下载统计,@burtthecoder/mcp-dnstwist 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,011 次,日均约 67 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@burtthecoder/mcp-dnstwist 还在维护吗?

最新版本 1.1.4 发布于 2026/11/05(4 天前);至今共发布 13 个版本,其中过去 12 个月发布了 8 个;首次发布于 2024/12/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。