Linkinator Mcp

io.github.JustinBeckwith由 GitHub 账号 JustinBeckwith 发布v1.0.3更新于 Oct 24, 2026

MCP server for link checking using linkinator

概览

AI 生成的概览

本地 MCP 服务器,借助 linkinator 让助手扫描网站和本地文件中的失效链接。

可以做什么
  • 扫描网址或本地文件路径,返回通过/失败汇总与各链接状态码
  • 在同一域名内递归爬取并跟踪页面之间的链接
  • 解析 HTML、CSS 与 Markdown 内容,并校验锚点片段
  • 按 URL 模式过滤链接,并设置超时、并发数、User-Agent 与重试策略
  • 按错误类型分组列出失效链接,并标明其所在页面
适用场景
适合让助手检查网站或文档目录中的死链、在修改后验证锚点与片段,或在发布前做一次快速链接检查。
运行要求
以 npm 包 linkinator-mcp 通过 stdio 在本地运行,需要 Node.js 与 npx(或全局安装)。未声明任何账号、API 密钥或环境变量。扫描远程网址需要网络访问;扫描本地文件会在某个端口启动临时本地服务器。
安装前请注意
扫描会向目标站点及其跟踪的链接发出外部 HTTP 请求,内部或私有网址因此会暴露给这些主机。allowInsecureCerts 等选项会接受无效的 SSL 证书,高并发或递归也可能给站点带来较大负载。它只读取页面,不会修改内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Linkinator Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Linkinator MCP Server

[npm version] [CI] [Biome] [codecov]

[linkinator-mcp]

A Model Context Protocol (MCP) server that provides link checking capabilities using linkinator. This allows AI assistants like Claude to scan webpages and local files for broken links.

Features

  • Comprehensive Link Checking: Scan websites and local files for broken links
  • Recursive Crawling: Follow links within the same domain
  • Multiple Content Types: Check links in HTML, CSS, and Markdown files
  • Fragment Validation: Verify anchor links and URL fragments
  • Flexible Configuration: Extensive options for timeouts, retries, SSL, and more
  • Detailed Reporting: Get status codes, broken links grouped by error type, and parent page information

Quick Setup (Automatic)

The easiest way to get started is using the install-mcp tool, which automatically configures linkinator-mcp for Claude Desktop, Claude Code, Cursor, Cline, and other MCP clients:

bash
npx install-mcp linkinator-mcp --client claude

This handles all configuration automatically. Restart your Claude client after installation.

Manual Configuration

If you prefer to configure the server manually, you can edit your MCP client's configuration file directly.

Claude Code

macOS/Linux

Edit ~/.config/claude-code/config.json:

json
{  "mcpServers": {    "linkinator": {      "command": "npx",      "args": ["linkinator-mcp"]    }  }}
Windows

Edit %APPDATA%\claude-code\config.json:

json
{  "mcpServers": {    "linkinator": {      "command": "npx",      "args": ["linkinator-mcp"]    }  }}
Alternative: Global Installation

If you prefer to install the package globally first with npm install -g linkinator-mcp, you can simplify the configuration:

json
{  "mcpServers": {    "linkinator": {      "command": "linkinator-mcp"    }  }}

Claude Desktop

macOS/Linux

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "linkinator": {      "command": "npx",      "args": ["linkinator-mcp"]    }  }}
Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:

json
{  "mcpServers": {    "linkinator": {      "command": "npx",      "args": ["linkinator-mcp"]    }  }}

Restart Your Client

After updating the configuration, restart your Claude client for the changes to take effect.

Usage Examples

Once configured, you can ask Claude to check links on any webpage or local file. Here are some example prompts:

Basic Link Checking

text
Check all the links on https://example.com

Recursive Scanning

text
Scan https://example.com recursively and check all links on the same domain

Local File Checking

text
Check the links in /path/to/my/documentation/index.html

Advanced Options

text
Check https://example.com with the following options:- Recurse through all pages- Check CSS for URLs- Validate anchor fragments- Skip links to google.com and facebook.com- Use a 10 second timeout

Available Options

The scan_page tool supports all of linkinator's CLI options:

Required

  • path (string): URL or local file path to scan

Connection Settings

  • concurrency (number): Number of simultaneous connections (default: 100)
  • port (number): Server port for local scanning (random port by default)
  • timeout (number): Request timeout in milliseconds (0 = no timeout)

Crawling Behavior

  • recurse (boolean): Follow links recursively on the same domain
  • serverRoot (string): Custom disk location where the server starts
  • directoryListing (boolean): Auto-serve directory index files
  • cleanUrls (boolean): Enable extensionless link resolution (e.g., /about → /about.html)

Content Parsing

  • markdown (boolean): Parse and scan markdown files
  • checkCss (boolean): Extract and validate URLs in CSS properties
  • checkFragments (boolean): Validate URL anchor identifiers

Filtering & Customization

  • linksToSkip (string[]): URL patterns to exclude (regex strings)
  • userAgent (string): Custom user agent header

Retry Logic

  • retry (boolean): Retry HTTP 429 responses with retry-after header
  • retryErrors (boolean): Retry 5xx errors
  • retryErrorsCount (number): Retry attempt limit
  • retryErrorsJitter (number): Random delay between retries in milliseconds

SSL & Security

  • allowInsecureCerts (boolean): Accept invalid SSL certificates

Output Format

The tool returns a formatted report showing:

text
Linkinator Scan Results for: https://example.com
Summary:  Status: ✓ PASSED / ✗ FAILED  Total Links: 150  OK: 145  Broken: 5  Skipped: 0
Broken Links:
  Status 404:    - https://example.com/missing-page      Found on: https://example.com/index.html    - https://example.com/old-blog-post      Found on: https://example.com/blog.html
  Status 500:    - https://api.example.com/endpoint      Found on: https://example.com/docs.html

Troubleshooting

Server Not Appearing in Claude Code

  1. Check that the path in config.json is absolute, not relative
  2. Verify the build directory exists: ls /path/to/linkinator-mcp/build/index.js
  3. Check Claude Code logs for errors
  4. Ensure Node.js is in your PATH

Permission Errors

If you get permission errors on macOS/Linux:

bash
chmod +x /path/to/linkinator-mcp/build/index.js

Port Already in Use

If scanning local files and getting port errors, try specifying a port:

text
Check /path/to/files with port 9000

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details on how to get started.

License

MIT

Related Projects

Author

Justin Beckwith [email protected]

Acknowledgments

Built with the Model Context Protocol SDK.

来源:README.md,提交 be7c7a3

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分