We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FarhanAliRaza/claude-context-local'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_mcp_server.py•826 B
"""Unit tests for MCP server functionality."""
import pytest
import sys
from unittest.mock import MagicMock
# Mock FastMCP to avoid dependency issues in tests
sys.modules['mcp.server.fastmcp'] = MagicMock()
class TestMCPServerImport:
"""Test that MCP server can be imported."""
def test_mcp_server_can_import(self):
"""Test that MCP server module can be imported without errors."""
try:
import mcp_server.server
assert True # If we get here, import succeeded
except ImportError as e:
pytest.fail(f"Failed to import MCP server: {e}")
# Note: Most MCP server functionality is tested in integration tests
# where the actual decorators and FastMCP framework are working properly.
# Unit tests here would just be testing mocks, not real functionality.