diff --git a/src/skill_seekers/mcp/tools/config_tools.py b/src/skill_seekers/mcp/tools/config_tools.py index 4090369..3482d32 100644 --- a/src/skill_seekers/mcp/tools/config_tools.py +++ b/src/skill_seekers/mcp/tools/config_tools.py @@ -13,7 +13,12 @@ from typing import Any, List try: from mcp.types import TextContent except ImportError: - TextContent = None + # Graceful degradation: Create a simple fallback class for testing + class TextContent: + """Fallback TextContent for when MCP is not installed""" + def __init__(self, type: str, text: str): + self.type = type + self.text = text # Path to CLI tools CLI_DIR = Path(__file__).parent.parent.parent / "cli" diff --git a/src/skill_seekers/mcp/tools/packaging_tools.py b/src/skill_seekers/mcp/tools/packaging_tools.py index c3421a7..e95f811 100644 --- a/src/skill_seekers/mcp/tools/packaging_tools.py +++ b/src/skill_seekers/mcp/tools/packaging_tools.py @@ -18,7 +18,12 @@ from typing import Any, List, Tuple try: from mcp.types import TextContent except ImportError: - TextContent = None # Graceful degradation + # Graceful degradation: Create a simple fallback class for testing + class TextContent: + """Fallback TextContent for when MCP is not installed""" + def __init__(self, type: str, text: str): + self.type = type + self.text = text # Path to CLI tools diff --git a/src/skill_seekers/mcp/tools/scraping_tools.py b/src/skill_seekers/mcp/tools/scraping_tools.py index 7c1ea4d..43bff70 100644 --- a/src/skill_seekers/mcp/tools/scraping_tools.py +++ b/src/skill_seekers/mcp/tools/scraping_tools.py @@ -19,7 +19,12 @@ from typing import Any, List try: from mcp.types import TextContent except ImportError: - TextContent = None # Graceful degradation for testing + # Graceful degradation: Create a simple fallback class for testing + class TextContent: + """Fallback TextContent for when MCP is not installed""" + def __init__(self, type: str, text: str): + self.type = type + self.text = text # Path to CLI tools CLI_DIR = Path(__file__).parent.parent.parent / "cli" diff --git a/src/skill_seekers/mcp/tools/source_tools.py b/src/skill_seekers/mcp/tools/source_tools.py index a207229..8d43a12 100644 --- a/src/skill_seekers/mcp/tools/source_tools.py +++ b/src/skill_seekers/mcp/tools/source_tools.py @@ -20,7 +20,12 @@ try: from mcp.types import TextContent MCP_AVAILABLE = True except ImportError: - TextContent = None + # Graceful degradation: Create a simple fallback class for testing + class TextContent: + """Fallback TextContent for when MCP is not installed""" + def __init__(self, type: str, text: str): + self.type = type + self.text = text MCP_AVAILABLE = False import httpx diff --git a/src/skill_seekers/mcp/tools/splitting_tools.py b/src/skill_seekers/mcp/tools/splitting_tools.py index d8d6e30..8bf1cd1 100644 --- a/src/skill_seekers/mcp/tools/splitting_tools.py +++ b/src/skill_seekers/mcp/tools/splitting_tools.py @@ -13,7 +13,12 @@ from typing import Any, List try: from mcp.types import TextContent except ImportError: - TextContent = None + # Graceful degradation: Create a simple fallback class for testing + class TextContent: + """Fallback TextContent for when MCP is not installed""" + def __init__(self, type: str, text: str): + self.type = type + self.text = text # Path to CLI tools CLI_DIR = Path(__file__).parent.parent.parent / "cli"