A Model Context Protocol (MCP) server for querying PyPI package information, dependencies, and compatibility checking.
- 📦 Query PyPI package information (name, version, description, dependencies)
- 🐍 Python version compatibility checking
- 🔍 Dependency analysis and resolution
- 🏢 Private PyPI repository support
- ⚡ Fast async operations with caching
- 🛠️ Easy integration with MCP clients
# Install from PyPI (coming soon)
pip install pypi-query-mcp-server
# Or install from source
git clone https://github.com/loonghao/pypi-query-mcp-server.git
cd pypi-query-mcp-server
poetry install
# Start the MCP server
pypi-query-mcp
# Or run directly with Python
python -m pypi_query_mcp.server
The server provides the following MCP tools:
- get_package_info - Get comprehensive package information
- get_package_versions - List all available versions for a package
- get_package_dependencies - Analyze package dependencies
- check_package_python_compatibility - Check Python version compatibility
- get_package_compatible_python_versions - Get all compatible Python versions
# Example: Check if Django is compatible with Python 3.9
result = await mcp_client.call_tool("check_package_python_compatibility", {
"package_name": "django",
"target_python_version": "3.9"
})
# Example: Get package information
info = await mcp_client.call_tool("get_package_info", {
"package_name": "requests"
})
🎉 Core functionality implemented and ready for use!
Current implementation status:
- ✅ Basic project structure
- ✅ PyPI API client with caching
- ✅ MCP tools implementation (package info, versions, dependencies)
- ✅ Python version compatibility checking
- ✅ CI/CD pipeline with multi-platform testing
- ⏳ Private repository support (planned)
- ⏳ Advanced dependency analysis (planned)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.