Skip to main content
Glama
firetix

MCP Vulnerability Checker Server

by firetix
test_package_vulnerability.py•1.36 kB
#!/usr/bin/env python3 """ Test script for the package vulnerability checking functionality. """ import asyncio import sys from pathlib import Path import pytest # Add parent directory to path so we can import mcp_simple_tool sys.path.append(str(Path(__file__).parent.parent)) from mcp_simple_tool.tools.package_vulnerability import ( check_package_vulnerabilities, ) @pytest.mark.asyncio async def test_package_vulnerability(): """Test the package vulnerability checking functionality.""" print("đź§Ş Testing Python Package Vulnerability Checker\n") # Test with a package known to have vulnerabilities (older django versions) print("1. Testing with 'requests' package...") result = await check_package_vulnerabilities("requests") print(result[0].text) print("\n" + "=" * 80 + "\n") # Test with a specific version print("2. Testing with 'django' package...") result = await check_package_vulnerabilities("django") print(result[0].text) print("\n" + "=" * 80 + "\n") # Test with a package that doesn't exist print("3. Testing with non-existent package 'nonexistent-package-xyz'...") result = await check_package_vulnerabilities("nonexistent-package-xyz") print(result[0].text) print("\n" + "=" * 80 + "\n") if __name__ == "__main__": asyncio.run(test_package_vulnerability())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/firetix/vulnerability-intelligence-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server