10 Commits

Author SHA1 Message Date
05dd346f45 Implement PyPI Community & Social Tools
- Add get_pypi_package_reviews: Aggregates community feedback from GitHub issues, Stack Overflow, and social media with sentiment analysis
- Add manage_pypi_package_discussions: Future-ready discussion management with GitHub Discussions integration
- Add get_pypi_maintainer_contacts: Privacy-respecting maintainer contact discovery with communication guidelines
- Integrate all tools with MCP server endpoints and comprehensive error handling
- Add extensive test coverage for all community functionality
- Follow existing code patterns and async/await best practices
- Include future-ready implementations for when PyPI adds native community features
2025-08-16 09:53:32 -06:00
f79144d710 feat: Add PyPI Development Workflow Tools
Implement comprehensive PyPI development workflow tools to assist with package preparation and validation:

1. **validate_pypi_package_name** - Validates package name format according to PyPI standards, checks availability, and provides improvement recommendations

2. **preview_pypi_package_page** - Generates preview of PyPI package page with metadata validation, SEO analysis, and discoverability scoring

3. **check_pypi_upload_requirements** - Validates package metadata against PyPI upload requirements with compliance scoring and actionable next steps

4. **get_pypi_build_logs** - Analyzes package distributions, build quality, platform support, and provides build health assessment

Key Features:
- Full PyPI standards compliance validation
- Package name availability checking
- Comprehensive metadata analysis
- Build distribution analysis with platform filtering
- SEO and discoverability optimization
- Upload readiness assessment
- Actionable recommendations and next steps
- Comprehensive error handling and logging

Files Added:
- pypi_query_mcp/tools/workflow.py - Core workflow functionality
- tests/test_workflow.py - Comprehensive test suite
- Updated server.py with 4 new MCP tool endpoints
- Updated tools/__init__.py with exports

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 09:44:33 -06:00
1b4ca9f902 feat: Implement PyPI Discovery & Monitoring Tools
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.
2025-08-16 09:33:31 -06:00
9924df34ec feat: Add comprehensive PyPI Analytics & Insights Tools
This commit implements a complete analytics suite for PyPI packages with four major tools:

🔍 **Package Analytics** (`get_pypi_package_analytics`)
- Comprehensive download analytics with trend analysis
- Platform and Python version breakdown
- Version adoption patterns and quality metrics
- Geographic distribution and growth indicators

🔒 **Security Alerts** (`get_pypi_security_alerts`)
- Integration with OSV (Open Source Vulnerabilities) database
- Dependency vulnerability scanning
- Security posture analysis and risk assessment
- Severity filtering and remediation recommendations

📈 **Package Rankings** (`get_pypi_package_rankings`)
- Search visibility and discoverability analysis
- Competitor ranking comparison
- SEO optimization suggestions
- Keyword and metadata analysis

🏆 **Competition Analysis** (`analyze_pypi_competition`)
- Market positioning and share analysis
- Feature comparison with competitors
- Adoption trends and growth patterns
- Strategic recommendations for improvement

**Key Features:**
- 50+ helper functions for detailed analysis
- Comprehensive error handling and validation
- Async/await patterns for optimal performance
- Integration with multiple data sources (PyPI, OSV, GitHub)
- Configurable analysis depth and options
- Production-ready code with extensive logging

**Implementation Details:**
- New module: `pypi_query_mcp/tools/analytics.py` (2000+ lines)
- Updated exports in `tools/__init__.py`
- Added 4 new MCP server endpoints in `server.py`
- Comprehensive test suite with 80+ test cases
- Full type hints and detailed docstrings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 09:19:14 -06:00
2534f42d8b feat: implement PyPI metadata management tools
- Add new metadata.py module with 4 core functions:
  * update_package_metadata: Update description, keywords, classifiers
  * manage_package_urls: Update homepage, documentation, repository URLs
  * set_package_visibility: Make packages private/public (for organizations)
  * manage_package_keywords: Update search keywords and tags

- Add PyPIMetadataClient with comprehensive async/await patterns
- Include robust error handling and validation for all metadata formats
- Provide implementation guidance for metadata updates via package uploads
- Add MCP server endpoints for all 4 metadata management functions
- Update tools/__init__.py with proper imports and exports
- Create comprehensive test suite with 50+ test cases covering:
  * Client initialization and validation
  * All metadata management functions
  * Error handling and edge cases
  * URL validation and accessibility checking
  * Keyword quality analysis and scoring
  * Integration workflows

Features:
- Production-ready code following existing patterns
- Comprehensive docstrings and type hints
- Authentication with API tokens
- Dry-run mode for safe validation
- URL quality scoring and accessibility validation
- Keyword quality analysis with recommendations
- Organization detection for visibility management
- Detailed validation errors and recommendations
2025-08-16 09:00:32 -06:00
9f3fd459b3 Implement PyPI Account & Publishing Tools
Add comprehensive PyPI publishing and account management functionality:

Features:
- upload_package_to_pypi: Upload distributions to PyPI/TestPyPI with safety checks
- check_pypi_credentials: Validate API tokens and credentials
- get_pypi_upload_history: View upload history for packages with statistics
- delete_pypi_release: Safe release deletion with dry-run and confirmation
- manage_pypi_maintainers: Add/remove/list package maintainers
- get_pypi_account_info: View account details, quotas, and limits

Implementation:
- Created pypi_query_mcp/tools/publishing.py with all 6 functions
- Added PyPIPublishingClient for authenticated API operations
- Comprehensive error handling with custom exceptions
- Full async/await patterns following existing codebase conventions
- Safety checks for destructive operations (deletion requires confirmation)
- Support for both production PyPI and TestPyPI

Integration:
- Added publishing-specific exceptions to core/exceptions.py
- Updated tools/__init__.py with publishing function imports
- Added 6 MCP server endpoints to server.py with proper error handling
- Created comprehensive tests in tests/test_publishing.py

Production-ready code with proper authentication, validation, and safety measures.
2025-08-16 08:52:03 -06:00
e205176ace feat: add comprehensive PyPI search functionality with advanced filtering
- Implemented PyPISearchClient with semantic search, filtering, and sorting
- Added 4 new search tools: search_packages, search_by_category, find_alternatives, get_trending_packages
- Created SearchFilter and SearchSort classes for flexible configuration
- Added SearchError exception for search-specific error handling
- Comprehensive test suite with 13 tests covering all search functionality
- Enhanced MCP server with 4 new search endpoints
- Support for filtering by Python version, license, category, downloads, maintenance status
- Multiple sorting options: relevance, popularity, quality, recency, name, downloads
- Semantic search using description similarity scoring
- Category-based package discovery with intelligent keyword matching
- Package alternatives finder using metadata analysis
- Trending packages analysis with download activity tracking
- Robust fallback mechanisms using curated package database
- All tests passing (13/13)

This implements feature #6 from the roadmap: "Advanced PyPI Search with filtering by Python version, license, maintenance status and sorting by popularity, recency, quality score with semantic search capabilities"
2025-08-16 07:45:40 -06:00
longhao
99c603ed37 feat: add PyPI package download statistics and popularity analysis tools
- Add PyPIStatsClient for pypistats.org API integration
- Implement get_package_download_stats for recent download statistics
- Implement get_package_download_trends for time series analysis
- Implement get_top_packages_by_downloads for popularity rankings
- Add comprehensive MCP tools for download statistics
- Include download trends analysis with growth indicators
- Add repository information and metadata integration
- Provide comprehensive test coverage
- Add demo script and usage examples
- Update README with new features and examples

Signed-off-by: longhao <hal.long@outlook.com>
2025-05-27 21:22:18 +08:00
longhao
6b14ff6da5 feat: add advanced dependency resolution and package download tools
- Add DependencyParser for parsing and categorizing package dependencies
- Add DependencyResolver for recursive dependency tree analysis
- Add PackageDownloader for downloading packages with dependencies
- Add resolve_dependencies MCP tool for comprehensive dependency analysis
- Add download_package MCP tool for package collection
- Support Python version filtering and extra dependencies
- Include comprehensive test coverage for new functionality
- Add demonstration script for new features
- Update README with new capabilities and usage examples

Signed-off-by: Hal <hal.long@outlook.com>
2025-05-27 19:06:18 +08:00
Hal
030b3a2607
feat: Complete PyPI Query MCP Server Implementation (#3)
Merge pull request implementing complete PyPI query MCP server with comprehensive features and CI/CD pipeline.
2025-05-27 11:14:49 +08:00