MCP Ping 服务器通过 MCP(模型上下文协议)为 Claude Desktop 提供 Ping 功能,允许 Claude 执行网络连通性测试和 Ping 操作,有效解决网络状态检测问题。
运行服务器使用 Python:
python main.py [--host HOST] [--port PORT]
默认设置:
要与 Claude Desktop 一起使用此服务器,将以下配置添加到你的 Claude Desktop 配置文件(claude_desktop_config.json)中:
{
"mcpServers": {
"ping": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8080/sse"
]
}
}
}
Claude Desktop 测试示例:
ping_host:可自定义包数对任何主机进行 Pingcheck_connectivity:使用 Google 的 DNS (8.8.8.8) 进行快速互联网连通性检查pip install .
ping_host# 目的:Ping指定主机
# 参数:
# - `host`:要Ping的主机名或IP地址
# - `count`:Ping数据包数量(1 - 20,默认:4)
check_connectivity# 目的:检查互联网连通性
# 参数:
# - `host`:目标主机(默认:8.8.8.8)
ping_host
host:要 Ping 的主机名或 IP 地址count:Ping 数据包数量(1 - 20,默认:4)check_connectivity
host:目标主机(默认:8.8.8.8)⚠️ 重要提示
此服务器设计用于本地与 Claude Desktop 一起使用。请注意,不要将其暴露到公共网络中。
该项目是开源的。请随意修改和分发。