home / mcp / broken link checker mcp server
MCP server for checking broken links in websites using the broken-link-checker library
Configuration
View docs{
"mcpServers": {
"davinoishi-broken-link-checker-mcp": {
"url": "https://your-ngrok-url.ngrok.io/sse"
}
}
}You can run the Broken Link Checker MCP Server locally or remotely to scan links on a single page or across an entire site. It provides detailed results, including HTTP status, reasons for broken links, and link metadata, while supporting exclusions like external links and robots.txt. This guide shows you how to install, configure, and use the server with an MCP client to perform fast, reliable link checks.
Connect your MCP client to the Broken Link Checker MCP Server to run two main operations. Use the single-page check when you want to verify all links on a specific HTML page, and use the full-site crawl to recursively verify links across an entire website. You can tailor checks by opting to exclude external links or to honor robots.txt rules. When the client sends a request, the server returns a structured JSON result that includes a summary of total, working, and broken links, plus a detailed list of any broken links with status codes and reasons.
Prerequisites: you need Node.js and npm installed on your system.
# 1) Install dependencies
npm install
# 2) (Optional) Build if your setup requires it
# This project uses a runtime entry point, so a separate build step is not strictly required for runningThere are two deployment options you can choose from depending on whether you want local stdio transport or remote HTTP/SSE transport. Use the local stdio path for Claude Desktop integration, or start the HTTP/SSE server for remote connections (for example, behind ngrok or another proxy). For local use, you’ll point Claude Desktop to the specific index file that runs the MCP server. For remote use, you’ll expose the server via HTTP/SSE and connect Claude Desktop through a public URL.
Option A: Local Usage (stdio transport) Use the local entry point to integrate with Claude Desktop directly.
Option B: Remote Usage (HTTP/SSE transport) Run the HTTP/SSE server so Claude Desktop can connect remotely (for example, via ngrok).
Local usage (stdio transport) runs with the following command configuration, which connects Claude Desktop to a local index file.
{
"mcpServers": {
"broken-link-checker": {
"command": "node",
"args": ["/Users/davinoishi/Documents-AI/BLC/index.js"]
}
}
}Start the HTTP/SSE server locally and expose it via a proxy (like ngrok) to obtain a public URL. Then configure Claude Desktop to connect using the HTTP/SSE endpoint.
# Start the HTTP/SSE server (default port 3000)
npm run start:http
# Or specify a custom port
PORT=8080 npm run start:http
```
```
# Expose your local server with ngrok
ngrok http 3000
```
```
# Configure Claude Desktop for remote connection (example URL)
{
"mcpServers": {
"broken-link-checker": {
"url": "https://your-ngrok-url.ngrok.io/sse"
}
}
}Verify the remote health endpoint after starting the server, then restart Claude Desktop and run a link-check task from your MCP client to ensure connectivity and proper responses.
# Health endpoint example (adjust to your actual URL)
https://your-ngrok-url.ngrok.io/healthYou can control server behavior with environment variables. A typical setup includes port and host configuration. Ensure you review any exposure risks when running publicly and consider adding authentication and TLS when exposing the server.
The server returns a structured JSON payload summarizing link status and listing broken links with details such as URL, base URL, HTTP status, and the reason for the failure.
Checks all links on a single HTML page, returning the status of each link along with metadata and any broken link indicators.
Recursively crawls a site starting from a URL and checks all internal/external links, honoring robots.txt and configurable exclusions.