Add comprehensive PyPI discovery and monitoring capabilities with 4 core tools: - monitor_pypi_new_releases: Track new releases by category with real-time alerts - get_pypi_trending_today: Analyze current trending packages with market insights - search_pypi_by_maintainer: Find packages by maintainer with portfolio analysis - get_pypi_package_recommendations: Algorithm-based package recommendations Features: - RSS feed integration for real-time release monitoring - Intelligent caching system with configurable TTL - Advanced package categorization and filtering - Trending analysis with multiple data signals - Personalized recommendations with user context - Comprehensive error handling and logging - Full test coverage with mocked dependencies - MCP server endpoints for all discovery tools Dependencies: - Add feedparser for RSS feed parsing - Enhanced server.py with 4 new MCP tool endpoints - Updated tools/__init__.py exports This implementation provides production-ready monitoring and discovery capabilities that integrate seamlessly with the existing codebase architecture.
92 lines
2.5 KiB
Python
92 lines
2.5 KiB
Python
"""MCP tools for PyPI package queries.
|
|
|
|
This package contains the FastMCP tool implementations that provide
|
|
the user-facing interface for PyPI package operations.
|
|
"""
|
|
|
|
from .compatibility_check import (
|
|
check_python_compatibility,
|
|
get_compatible_python_versions,
|
|
suggest_python_version_for_packages,
|
|
)
|
|
from .dependency_resolver import resolve_package_dependencies
|
|
from .download_stats import (
|
|
get_package_download_stats,
|
|
get_package_download_trends,
|
|
get_top_packages_by_downloads,
|
|
)
|
|
from .package_downloader import download_package_with_dependencies
|
|
from .package_query import (
|
|
query_package_dependencies,
|
|
query_package_info,
|
|
query_package_versions,
|
|
)
|
|
from .metadata import (
|
|
manage_package_keywords,
|
|
manage_package_urls,
|
|
set_package_visibility,
|
|
update_package_metadata,
|
|
)
|
|
from .publishing import (
|
|
check_pypi_credentials,
|
|
delete_pypi_release,
|
|
get_pypi_account_info,
|
|
get_pypi_upload_history,
|
|
manage_pypi_maintainers,
|
|
upload_package_to_pypi,
|
|
)
|
|
from .search import (
|
|
find_alternatives,
|
|
get_trending_packages,
|
|
search_by_category,
|
|
search_packages,
|
|
)
|
|
from .discovery import (
|
|
get_pypi_package_recommendations,
|
|
get_pypi_trending_today,
|
|
monitor_pypi_new_releases,
|
|
search_pypi_by_maintainer,
|
|
)
|
|
from .analytics import (
|
|
analyze_pypi_competition,
|
|
get_pypi_package_analytics,
|
|
get_pypi_package_rankings,
|
|
get_pypi_security_alerts,
|
|
)
|
|
|
|
__all__ = [
|
|
"query_package_info",
|
|
"query_package_versions",
|
|
"query_package_dependencies",
|
|
"check_python_compatibility",
|
|
"get_compatible_python_versions",
|
|
"suggest_python_version_for_packages",
|
|
"resolve_package_dependencies",
|
|
"download_package_with_dependencies",
|
|
"get_package_download_stats",
|
|
"get_package_download_trends",
|
|
"get_top_packages_by_downloads",
|
|
"search_packages",
|
|
"search_by_category",
|
|
"find_alternatives",
|
|
"get_trending_packages",
|
|
"upload_package_to_pypi",
|
|
"check_pypi_credentials",
|
|
"get_pypi_upload_history",
|
|
"delete_pypi_release",
|
|
"manage_pypi_maintainers",
|
|
"get_pypi_account_info",
|
|
"update_package_metadata",
|
|
"manage_package_urls",
|
|
"set_package_visibility",
|
|
"manage_package_keywords",
|
|
"get_pypi_package_analytics",
|
|
"get_pypi_security_alerts",
|
|
"get_pypi_package_rankings",
|
|
"analyze_pypi_competition",
|
|
"monitor_pypi_new_releases",
|
|
"get_pypi_trending_today",
|
|
"search_pypi_by_maintainer",
|
|
"get_pypi_package_recommendations",
|
|
]
|