#!/usr/bin/env python3
"""
Minimal MCP server for testing tool registration in Cursor
"""
from fastmcp import FastMCP
# Initialize FastMCP server
mcp = FastMCP("License Scanner")
@mcp.tool()
def scan_dependencies(project_path: str) -> str:
"""
Scan a project for dependencies and return license information.
Args:
project_path: Path to the project directory to scan
Returns:
JSON string containing dependency and license information
"""
return f"Scanning dependencies in: {project_path}"
@mcp.tool()
def generate_license_report(project_path: str, output_file: str = None) -> str:
"""
Generate a markdown license report for a project.
Args:
project_path: Path to the project directory to scan
output_file: Optional path to save the markdown report
Returns:
Markdown content of the license report
"""
return f"Generating license report for: {project_path}"
@mcp.tool()
def list_package_managers(project_path: str) -> str:
"""
List all package manager files found in a project.
Args:
project_path: Path to the project directory to scan
Returns:
JSON string containing list of package manager files
"""
return f"Listing package managers in: {project_path}"
if __name__ == "__main__":
mcp.run()
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/RyanCadby/mcp-license-scanner'
If you have feedback or need assistance with the MCP directory API, please join our Discord server