Broken Link Checker MCP Server
Enables checking for broken links on web pages and entire websites through natural language commands. Provides detailed reports including HTTP status codes and supports options like excluding external links and respecting robots.txt.
README
Broken Link Checker MCP Server
An MCP (Model Context Protocol) server that provides broken link checking capabilities using the broken-link-checker library.
Features
- Check Single Page Links: Scan all links on a single HTML page for broken links
- Check Entire Site: Recursively crawl and check all links across an entire website
- Detailed reporting including HTTP status codes, broken reasons, and link metadata
- Support for excluding external links and respecting robots.txt
- Two deployment modes: Local stdio or Remote HTTP/SSE
Installation
npm install
Deployment Options
Option 1: Local Usage (stdio transport)
Use index.js for local Claude Desktop integration.
Option 2: Remote Usage (HTTP/SSE transport)
Use server.js for remote deployment with ngrok or similar proxy services.
Usage with Claude Desktop (Local)
Step 1: Configure Claude Desktop
Add this server to your Claude Desktop configuration file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"broken-link-checker": {
"command": "node",
"args": ["/Users/davinoishi/Documents/Projects-AI/BLC/index.js"]
}
}
}
Make sure to update the path to match your actual installation directory.
Step 2: Restart Claude Desktop
After updating the configuration, restart Claude Desktop for the changes to take effect.
Step 3: Use the Tools
The MCP server provides two main tools:
1. check_page_links
Check all links on a single HTML page.
Parameters:
url(required): The URL of the page to checkexcludeExternalLinks(optional): If true, only check internal links (default: false)honorRobotExclusions(optional): If true, respect robots.txt (default: true)
Example:
Can you check the links on https://example.com for any broken links?
2. check_site
Recursively crawl and check all links across an entire website.
Parameters:
url(required): The starting URL of the site to checkexcludeExternalLinks(optional): If true, only check internal links (default: false)honorRobotExclusions(optional): If true, respect robots.txt (default: true)maxSocketsPerHost(optional): Maximum concurrent requests per host (default: 1)
Example:
Can you crawl https://example.com and check all pages for broken links?
Remote Deployment with HTTP/SSE Transport
For remote deployments (e.g., deploying on a VPS and connecting via ngrok), use the HTTP/SSE server:
Step 1: Start the HTTP Server
# Start the HTTP/SSE server (default port 3000)
npm run start:http
# Or specify a custom port
PORT=8080 npm run start:http
The server will start on http://localhost:3000 (or your specified port).
Step 2: Expose with ngrok (or alternative)
# Install ngrok if you haven't already
npm install -g ngrok
# Expose your local server
ngrok http 3000
ngrok will provide you with a public URL like: https://abc123.ngrok.io
Step 3: Configure Claude Desktop for Remote Connection
Update your Claude Desktop configuration to use the HTTP/SSE transport:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"broken-link-checker": {
"url": "https://your-ngrok-url.ngrok.io/sse"
}
}
}
Replace your-ngrok-url.ngrok.io with your actual ngrok URL.
Step 4: Test the Connection
- Check the health endpoint:
https://your-ngrok-url.ngrok.io/health - Restart Claude Desktop
- Ask Claude to check links on a webpage
Environment Variables
You can configure the server using environment variables:
# Copy the example environment file
cp .env.example .env
# Edit .env with your settings
PORT=3000
HOST=0.0.0.0
Production Deployment
For production deployments, consider:
-
Use a process manager (PM2, systemd):
npm install -g pm2 pm2 start server.js --name broken-link-checker-mcp pm2 save pm2 startup -
Use a reverse proxy (nginx, Caddy) for HTTPS
-
Add authentication if exposing publicly
-
Monitor logs and resource usage
Output Format
Both tools return JSON with the following structure:
{
"summary": {
"totalLinks": 100,
"brokenLinks": 5,
"workingLinks": 95
},
"brokenLinks": [
{
"url": "https://example.com/broken-page",
"base": "https://example.com",
"broken": true,
"brokenReason": "HTTP_404",
"http": {
"statusCode": 404
}
}
]
}
Development
The main server code is in index.js. The server uses:
@modelcontextprotocol/sdkfor MCP protocol implementationbroken-link-checkerfor link checking functionality
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。