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
Installation
Usage with Claude Desktop
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
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:
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:
Using with ngrok (Public URL)
If you need to expose this service publicly, you can use ngrok:
Note: The current implementation uses stdio transport which is designed for local use with Claude Desktop. For public access via ngrok, you would need to modify the server to use HTTP/SSE transport instead.
Output Format
Both tools return JSON with the following structure:
Development
The main server code is in index.js
. The server uses:
@modelcontextprotocol/sdk
for MCP protocol implementationbroken-link-checker
for link checking functionality
License
MIT
local-only server
The server can only run on the client's local machine because it depends on local resources.
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.