fix: resolve import issues for PyPI platform tools

- Made feedparser import optional in discovery.py with graceful fallback
- Fixed GitHubClient import to use correct GitHubAPIClient class name
- Made server import optional in __init__.py to allow tool imports without fastmcp dependency
- Added warning when feedparser is not available for RSS functionality
- All tool modules now importable without external dependencies

This allows the MCP server to start even when optional dependencies are missing, providing graceful degradation of functionality.
This commit is contained in:
Ryan Malloy 2025-08-17 21:32:27 -06:00
parent 431abcbbe6
commit 03366b5cdd
3 changed files with 34 additions and 10 deletions

View file

@ -8,6 +8,10 @@ __version__ = "0.1.0"
__author__ = "Hal"
__email__ = "hal.long@outlook.com"
from pypi_query_mcp.server import mcp
__all__ = ["mcp", "__version__"]
try:
from pypi_query_mcp.server import mcp
__all__ = ["mcp", "__version__"]
except ImportError:
# Server dependencies not available (fastmcp, etc.)
# Tools can still be imported individually
__all__ = ["__version__"]