bazha/football-mcp
3.1
If you are the rightful owner of football-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Football MCP is a server that provides access to football-data.org information using the Model Context Protocol.
Football MCP
Overview
Football MCP exposes football-data.org information through a Model Context Protocol server implemented in TypeScript. It boots an MCP server over stdio (src/server.ts) and requires a FOOTBALL_API_KEY environment variable for all outbound API calls.
Architecture
- Server layer –
src/server.tsconfigures theMcpServer, loads environment-backed config fromsrc/config.ts, and connects viaStdioServerTransport. - Tool registrations – Files under
src/toolsregister MCP tools, validate inputs withzod, and delegate to service functions;registerAllToolswires the exposed tool set. - Service layer –
src/serviceswrapsaxiosrequests against the football-data API for matches, statistics, and team data, formatting human-readable responses for MCP clients. - Shared utilities –
src/utilities/teams.tsandsrc/utils.tsprovide reusable helpers (team lookup, date formatting) whilesrc/types.tscentralises API response typing. - Configuration –
src/config.tsexports constants such as the API base URL, limits, and standard competition codes.
Development
- Install dependencies:
npm install. - Set
FOOTBALL_API_KEY(copy.env.exampleto.envand fill in the key). - Run the server in watch mode with
npm run dev, or compile withnpm run buildand start the compiled output vianpm start.
Notes & Thoughts
- The separation between tools, services, and utilities keeps concerns clear and makes it easy to extend with new MCP endpoints.
- Input validation via
zodand typed service contracts contribute to reliability when interacting with external APIs. - Consider wiring currently unused registrations (e.g. goal scorer and standings tools) into
registerAllToolsto expose the full feature set.