网站状态检查服务

一个用于检查网站是否宕机的MCP服务器,可查询网站当前状态并提供最近宕机事件信息。

  • by hesreallyhim
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 hesreallyhim/mcp-server-isitdown

使用说明

mcp服务器isitdown

MCP服务器,通过查询来检查网站当前是否关闭 www.isitdownrightnow.com.

概述

此MCP服务器提供了一个简单的工具来检查网站是否正在经历停机,并可以提供有关最近停机事件的一些信息。

工具

实施了以下工具:

  • get_website_status:检查网站当前是否已关闭。
    • Input: root_domain (string):要检查的网站的根域(例如“example.com”)
    • Output:一条字符串消息,指示网站是正常运行还是停机,以及最后记录的停机时间信息

安装

通过Smithery安装

通过以下方式自动安装IsItDown Server for Claude Desktop 史密瑟里:

npx -y @smithery/cli install @hesreallyhim/mcp-server-isitdown --client claude

备注:此程序包当前未发布到公共注册表。安装只能从源代码处获得。

来源

# Clone the repository 
git clone https://github.com/yourusername/mcp-server-isitdown.git
cd mcp-server-isitdown

# Using uv (recommended)
uv pip install -e .

# Using pip
pip install -e .

Claude桌面配置

将此配置添加到您的 claude_desktop_config.json 文件:

"isitdown": {
  "command": "/path/to/uv",
  "args": [
    "--directory",
    "/path/to/cloned/repo/src",
    "run",
    "mcp_server_isitdown"
  ]
}

用法

作为独立的MCP服务器运行

# Using the installed script
mcp-server-isitdown

# Using the Python module
python -m mcp_server_isitdown

Claude for Dekstop的示例用法:

  • “维基百科现在宕机了吗?”
  • “reddit上一次宕机是什么时候?”

用作图书馆

from mcp_server_isitdown.server import get_website_status

# Check if a website is down (async function)
async def check_website():
    result = await get_website_status("example.com")
    print(result)  # Prints status message with up/down status

发展

# Type checking
uvx mypy .

# Run all pre-commit hooks
uv pre-commit run --all-files

# Install in development mode
uv pip install -e ".[dev]"

# Run the Inspector
mcp dev src/mcp_server_isitdown/server.py

构建

# Build the package
uv build

# Install the built package
uv pip install dist/mcp_isitdown_service-*.whl

许可证

麻省理工学院