fse08877-netizen/mcp-package-health

GitHub: fse08877-netizen/mcp-package-health

一个 MCP 协议服务器,让 Claude、Cursor 等 AI 编程助手能够实时查询 Python 包的健康状态、漏洞信息和依赖关系图。

Stars: 0 | Forks: 0

# mcp-package-health [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/f91f7625cf054217.svg)](https://github.com/fse08877-netizen/mcp-package-health/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/mcp-package-health)](https://pypi.org/project/mcp-package-health/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org) **一个 [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server,可直接在 Claude、Cursor 以及任何兼容 MCP 的客户端中,为 AI agent 提供实时的包健康数据、漏洞报告和依赖图。** ## 为什么开发此工具 每个开发者都问过 Claude 诸如“这个包还在维护吗?”或“这个版本有 CVE 吗?”之类的问题——而 Claude 只能回答“我没有实时数据。” `mcp-package-health` 解决了这个问题。它暴露了三个可供任何兼容 MCP 的 AI agent 实时调用的工具: | 工具 | 功能描述 | |------|-------------| | `get_package_health` | 从 PyPI 获取最新版本、发布日期、许可证和摘要 | | `check_vulnerabilities` | 通过 [OSV.dev](https://osv.dev) 进行 CVE/漏洞扫描 | | `get_dependency_graph` | 直接和传递依赖列表 | ## 安装 ``` pip install mcp-package-health ``` 或从源码安装: ``` git clone https://github.com/fse08877-netizen/mcp-package-health.git cd mcp-package-health pip install -e ".[dev]" ``` ## 在 Claude Desktop 中使用 添加到你的 `claude_desktop_config.json` 中: ``` { "mcpServers": { "package-health": { "command": "mcp-package-health" } } } ``` 然后询问 Claude: - “numpy 1.24.0 版本使用安全吗?” - “fastapi 的依赖项有哪些?” - “httpx 上一次发布是什么时候?” ## 工具参考 ### `get_package_health(package_name, ecosystem="pypi")` ``` { "name": "requests", "version": "2.32.3", "summary": "Python HTTP for Humans.", "last_release": "2024-05-29T17:05:40", "license": "Apache-2.0", "project_url": "https://requests.readthedocs.io" } ``` ### `check_vulnerabilities(package_name, version)` ``` { "package": "Pillow", "version": "9.0.0", "vulnerability_count": 3, "vulnerabilities": [ { "id": "GHSA-56pw-mpj4-fxww", "summary": "Pillow uninitialized memory", "severity": "HIGH" } ] } ``` ### `get_dependency_graph(package_name)` ``` { "package": "fastapi", "direct_dependencies": ["starlette", "pydantic", "typing-extensions"], "count": 3 } ``` ## 开发 ``` pytest tests/ -v ``` ## 许可证 MIT © [fse08877-netizen](https://github.com/fse08877-netizen/mcp-package-health)
标签:AI插件, MCP, Python, 依赖管理, 域名收集, 无后门, 逆向工具