Skip to main content
Glama

LinkRescue MCP 服务器

PyPI License: MIT

快速查找断链,按影响优先级排序,并生成 AI 代理可执行的修复建议。

LinkRescue MCP 通过模型上下文协议 (MCP) 公开断链扫描、监控和修复工作流,以便 Claude 和 Cursor 等工具可以直接运行链接健康检查操作。

你将获得

  • check_broken_links:扫描 URL(或站点地图)并返回结构化的断链报告

  • monitor_links:为网站设置定期监控

  • get_fix_suggestions:生成优先级的修复建议

  • health_check:验证 MCP 服务器和后端 API 的连接性

如果 LinkRescue 后端 API 无法访问,服务器将回退到真实的模拟数据,以便本地测试和演示能够持续运行。

要求

  • Python 3.11+

  • pip

快速开始

git clone https://github.com/carsonroell-debug/linkrescue-mcp.git
cd linkrescue-mcp
pip install -r requirements.txt
python main.py

MCP 端点:

  • http://localhost:8000/mcp

配置

变量

描述

默认值

LINKRESCUE_API_BASE_URL

LinkRescue API 的基础 URL

http://localhost:3000/api/v1

LINKRESCUE_API_KEY

用于身份验证请求的 API 密钥

示例:

export LINKRESCUE_API_BASE_URL="https://your-api.example.com/api/v1"
export LINKRESCUE_API_KEY="your-api-key"
python main.py

运行选项

直接运行:

python main.py

通过 FastMCP CLI 运行:

fastmcp run main.py --transport streamable-http --port 8000

连接 MCP 客户端

Claude Desktop

将其添加到 claude_desktop_config.json

{
  "mcpServers": {
    "linkrescue": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Claude Code

claude mcp add linkrescue --transport http http://localhost:8000/mcp

尝试一下

fastmcp list-tools main.py
fastmcp call-tool main.py health_check '{}'
fastmcp call-tool main.py check_broken_links '{"url":"https://example.com"}'

工具输入和输出

输入:

  • url(必填):要扫描的网站 URL

  • sitemap_url(可选):从站点地图爬取

  • max_depth(可选,默认 3):爬取深度

返回扫描元数据、断链详情和汇总统计信息。

输入:

  • url(必填)

  • frequency_hours(可选,默认 24

返回监控 ID、计划详情和状态。

get_fix_suggestions

输入:

  • 来自 check_broken_links 的完整报告,或

  • 原始 broken_links 数组,或

  • 任意格式的 JSON 字符串

返回优先级的操作和建议的修复步骤。

health_check

无输入。返回服务器状态和后端 API 可达性。

部署

Smithery

此仓库包含 smithery.yamlsmithery.json

  1. 将仓库推送到 GitHub

  2. Smithery 中创建/添加服务器

  3. 将 Smithery 指向此仓库

Docker / 托管平台

包含一个用于 Railway、Fly.io 和其他容器主机的 Dockerfile

# Railway
railway up

# Fly.io
fly launch
fly deploy

在你的主机环境中设置 LINKRESCUE_API_BASE_URLLINKRESCUE_API_KEY

架构

Agent (Claude, Cursor, etc.)
  -> MCP
LinkRescue MCP Server (this repo)
  -> HTTP API
LinkRescue Backend API

此服务器是 MCP 工具调用和 LinkRescue API 操作之间的转换层。

其他 README 变体

  • 开发者版本:README.dev.md

  • 市场版本:README.marketplace.md

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - A tier

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/carsonroell-debug/linkrescue-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server