← Back to Portfolio Aggregator · Sports

MCP Sports Aggregator

An MCP server that aggregates and ranks Indian sports news for LLM agents

Overview

An MCP (Model Context Protocol) server — not a chatbot UI, but a tool-calling backend meant to be registered with an LLM agent like Claude. It aggregates top stories from three Indian news sites, caches at least 30 of them, refreshes hourly in the background, and ranks sports stories first so an agent's queries return relevant results immediately rather than triggering a live scrape.

Default sources — Times of India, Hindustan Times, and NDTV — are all overridable via environment variables with no code changes.

How it works

A five-stage pipeline: a scraper fetches each site's homepage and extracts headlines with a layered selector strategy that degrades gracefully if a site's markup changes; a classifier labels each headline "sports" or "general" using Groq's LLM when a key is configured, falling back to a keyword/URL heuristic otherwise; a thread-safe in-memory cache merges new stories with old (deduped by URL), sorts sports-first and most-recent, and snapshots to disk so a restart isn't a cold start; a scheduler refreshes that cache on an hourly background job; and a FastMCP server exposes it all over Streamable HTTP.

On startup, the server runs one synchronous fetch immediately so the cache is already populated before the first tool call, then hands off to the hourly background job.

MCP tools exposed

Visit Project