Skip to main content
Glama

mlb-api-mcp

MIT License
29
  • Apple
generic_api.py839 B
from datetime import datetime def setup_generic_tools(mcp): """Setup generic tools for the MCP server""" @mcp.tool() def get_current_date() -> str: """Get the current date. Returns: str: The current date in YYYY-MM-DD format """ try: current_date = datetime.now().strftime("%Y-%m-%d") return current_date except Exception as e: return f"Error getting current date: {e!s}" @mcp.tool() def get_current_time() -> str: """Get the current time. Returns: str: The current time in HH:MM:SS format """ try: current_time = datetime.now().strftime("%H:%M:%S") return current_time except Exception as e: return f"Error getting current time: {e!s}"

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/guillochon/mlb-api-mcp'

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