SSL 证书到期检查器 MCP 服务器
一个基于 MCP (Model Context Protocol) 的 SSL 证书到期检查工具,可以快速检查任何网站的 SSL 证书有效期。
功能特性
- 🔍 检查任意域名的 SSL 证书到期时间
- ⏰ 计算证书剩余有效天数
- 🚨 智能状态提示(已过期/即将过期/有效)
- 🌐 支持多种 URL 格式输入
安装
确保已安装 Python 3.11 或更高版本,然后使用 uv 安装依赖:
uv sync
使用方法
作为 MCP 服务器运行
uv run main.py
在 Claude Desktop 中配置
编辑 Claude Desktop 配置文件:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{
"mcpServers": {
"ssl-checker": {
"command": "uv",
"args": [
"--directory",
"/path/to/ssl-expiry-checker-mcp",
"run",
"main.py"
]
}
}
}
工具说明
ssl_expiry_checker
检查给定网址的 SSL 证书有效期。
参数:
url(string): 要检查的网址,支持以下格式:example.comhttps://example.comwww.example.com
返回: 包含证书到期信息的详细报告
示例输出
**SSL 证书检查结果**
目标网址: https://example.com
域名: example.com
到期时间: 2026-12-31 23:59:59 UTC
剩余天数: 305 天
状态: ✅ 证书有效
状态说明
- ✅ 证书有效: 剩余天数 ≥ 7 天
- ⚠️ 证书即将过期: 剩余天数 < 7 天
- ⏳ 证书将在今天过期: 剩余天数 = 0 天
- 🚨 证书已过期: 剩余天数 < 0 天
技术栈
- Python 3.11+
- FastMCP
- 标准库: ssl, socket, urllib
许可证
MIT
Metadata
Release files for ssl-expiry-checker-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ssl_expiry_checker_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ssl_expiry_checker_mcp-0.1.0-py3-none-any.whl |
Release files / ssl_expiry_checker_mcp-0.1.0-py3-none-any.whl
| Download URL | ssl_expiry_checker_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c7e58b7a322064f6c2ea4a1c9f660fba166ecca5ba866adc41eb6dd75be0511
|
|
BLAKE2b-256 checksum How to use checksums |
a0fbfdb948b2d09456a22d533229e91ffa5ab23885af95702df1035cf1070f50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Security for ssl-expiry-checker-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.