FastMCP-based MCP server that turns news feeds into deduplicated, enriched clusters.
cd news-mcp
source .venv/bin/activate
pip install -r requirements.txt
./run.sh
Default SSE mount (FastMCP):
http://127.0.0.1:8506/mcp/sseHealth:
http://127.0.0.1:8506/healthNEWS_FEED_URL / NEWS_FEED_URLS)1) get_latest_events(topic, limit)
topic is a coarse category: crypto | macro | regulation | ai | otherOptional boolean:
include_articles (default: false) — when true, includes articles[].url + minimal fields per returned cluster.2) get_events_for_entity(entity, limit)
entitiesOptional boolean:
include_articles (default: false) — when true, includes articles[].url + minimal fields per returned cluster.The server keeps a conservative alias map in config/entity_aliases.json for obvious shorthands
like btc -> Bitcoin, eth -> Ethereum, and ether -> Ethereum. Keep this map tight; it is meant
to reduce false misses, not to rewrite every possible name variant.
3) get_event_summary(event_id)
cluster_idOptional boolean:
include_articles (default: false) — when true, includes the underlying articles list (with url) from the stored cluster.4) detect_emerging_topics(limit)
5) get_news_sentiment(entity, timeframe)
See news-mcp/.env.
Key variables:
NEWS_EXTRACT_PROVIDER, NEWS_EXTRACT_MODELNEWS_SUMMARY_PROVIDER, NEWS_SUMMARY_MODELGROQ_API_KEY, OPENAI_API_KEYENTITY_BLACKLIST (comma-separated, case-insensitive exact entity match)NEWS_PROMPTS_DIR (override prompt directory)NEWS_ENTITY_ALIASES_FILE (override entity alias JSON file)NEWS_FEED_URL (single feed fallback)NEWS_FEED_URLS (comma-separated feed URLs; overrides NEWS_FEED_URL)NEWS_REFRESH_INTERVAL_SECONDS (default 900)NEWS_BACKGROUND_REFRESH_ON_START (default true)NEWS_BACKGROUND_REFRESH_ENABLED (default true)NEWS_CLUSTERS_TTL_HOURSGROQ_ENRICH_OTHER_ONLY (default false; set true for cost control)Run a standardized, fabricated extraction test against the currently configured provider/model:
./live_tests.sh
The script reads ./.env, selects OpenAI or Groq based on the configured keys, and checks that the core expected entities are extracted.
Use your existing config path:
CONFIG=/home/lucky/.openclaw/workspace/config/mcporter.json
Inspect server + tools:
mcporter --config "$CONFIG" list news --schema
mcporter --config "$CONFIG" call news.get_latest_events topic=crypto limit=10
mcporter --config "$CONFIG" call news.get_latest_events topic=macro limit=5
mcporter --config "$CONFIG" call news.get_events_for_entity entity=Bitcoin limit=10
mcporter --config "$CONFIG" call news.get_events_for_entity entity=ETH limit=10
mcporter --config "$CONFIG" call news.get_events_for_entity entity=ETF limit=10
# First fetch an event id
mcporter --config "$CONFIG" call news.get_latest_events topic=crypto limit=1
# Then summarize it
mcporter --config "$CONFIG" call news.get_event_summary event_id=<cluster_id>
mcporter --config "$CONFIG" call news.detect_emerging_topics limit=10
mcporter --config "$CONFIG" call news.get_news_sentiment entity=Bitcoin timeframe=24h
mcporter --config "$CONFIG" call news.get_news_sentiment entity=Ethereum timeframe=72h