Skip to main content
Glama

MCP-Soccerdata

by yeonupark
MIT License
19
  • Apple
server.py718 B
from mcp.server.fastmcp import FastMCP import httpx import os mcp = FastMCP("soccer-data") API_END_POINT = "https://api.soccerdataapi.com/" AUTH_KEY = os.environ.get("AUTH_KEY") if not AUTH_KEY: raise EnvironmentError("AUTH_KEY is not set in .env") @mcp.tool() async def get_livescores(): async with httpx.AsyncClient() as client: response = await client.get( API_END_POINT+"livescores/", params={"auth_token": AUTH_KEY}, headers={ "Content-Type": "application/json", "Accept-Encoding": "gzip", }, ) response.raise_for_status() return response.text 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/yeonupark/mcp-soccer-data'

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