feat(docs): add .gitignore and enhance README with data source details
- Introduced a .gitignore file to exclude environment variables, logs, and temporary files. - Updated README.md to reflect the new description and added a detailed table of 72+ data sources across 5 categories. - Enhanced documentation in multiple languages (Japanese, Korean, Chinese) to include the new data source information.
This commit is contained in:
@@ -33,8 +33,29 @@ async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
|
||||
|
||||
|
||||
# ---------- FastMCP instance ----------
|
||||
_INSTRUCTIONS = """\
|
||||
OpenNews MCP — Real-time crypto & financial news aggregator powered by 6551.io.
|
||||
|
||||
Aggregates 72+ data sources across 5 engine categories:
|
||||
- NEWS (53 sources): Bloomberg, Reuters, Financial Times, CNBC, CNN, BBC, Fox Business, \
|
||||
CoinDesk, Cointelegraph, The Block, Blockworks, Decrypt, DlNews, A16Z, TechCrunch, Wired, \
|
||||
Politico, Business Insider, Twitter/X, Telegram, Weibo, Truth Social, U.S. Treasury, ECB, \
|
||||
TASS, Handelsblatt, Welt, Ambrey, Morgan Stanley, PR Newswire, Coinbase, Phoenixnews, and more.
|
||||
- LISTING (9 sources): Binance, Coinbase, OKX, Bybit, Upbit, Bithumb, Robinhood, \
|
||||
Hyperliquid, Aster — new token listing announcements.
|
||||
- ONCHAIN (3 sources): Hyperliquid Whale Trade, Hyperliquid Large Position, \
|
||||
KOL Trade — on-chain whale & KOL activity.
|
||||
- MEME (1 source): Twitter meme coin social sentiment.
|
||||
- MARKET (6 sources): Price Change, Funding Rate, Funding Rate Difference, \
|
||||
Large Liquidation, Market Trends, OI Change — quantitative market signals.
|
||||
|
||||
All articles are AI-analyzed with impact score (0-100), trading signal (long/short/neutral), \
|
||||
and bilingual summaries (EN/ZH).
|
||||
"""
|
||||
|
||||
mcp = FastMCP(
|
||||
"opennews-6551",
|
||||
instructions=_INSTRUCTIONS,
|
||||
lifespan=app_lifespan,
|
||||
json_response=True,
|
||||
)
|
||||
|
||||
@@ -9,10 +9,27 @@ from opennews_mcp.app import mcp
|
||||
async def get_news_sources(ctx: Context) -> dict:
|
||||
"""Get all available news source categories and their metadata.
|
||||
|
||||
Returns a tree structure with engine types (news, listing, onchain, meme, market)
|
||||
and their sub-categories (Bloomberg, Reuters, Binance, etc.).
|
||||
This platform aggregates 72+ real-time data sources across 5 engine categories:
|
||||
|
||||
Use this first to understand what news sources are available before searching.
|
||||
NEWS (53 sources): Bloomberg, Reuters, Financial Times, CNBC, CNN, BBC, Fox Business,
|
||||
CoinDesk, Cointelegraph, The Block, Blockworks, Decrypt, DlNews, A16Z, TechCrunch,
|
||||
Wired, Politico, Business Insider, Twitter/X, Telegram, Weibo, Truth Social,
|
||||
U.S. Treasury, ECB, TASS, Handelsblatt, Welt, Ambrey, Morgan Stanley (MS NOW),
|
||||
PR Newswire, Coinbase, Phoenixnews, and more.
|
||||
|
||||
LISTING (9 sources): Binance, Coinbase, OKX, Bybit, Upbit, Bithumb, Robinhood,
|
||||
Hyperliquid, Aster — new token listing announcements from major exchanges.
|
||||
|
||||
ONCHAIN (3 sources): Hyperliquid Whale Trade, Hyperliquid Large Position,
|
||||
KOL Trade — on-chain whale & KOL activity alerts.
|
||||
|
||||
MEME (1 source): Twitter — meme coin social sentiment tracking.
|
||||
|
||||
MARKET (6 sources): Price Change, Funding Rate, Funding Rate Difference,
|
||||
Large Liquidation, Market Trends, OI Change — quantitative market anomaly signals.
|
||||
|
||||
Returns a tree structure with all engine types and their sub-categories.
|
||||
Use this first to discover what sources are available before searching.
|
||||
"""
|
||||
api = ctx.request_context.lifespan_context.api
|
||||
|
||||
@@ -55,6 +72,7 @@ async def list_news_types(ctx: Context) -> dict:
|
||||
Returns a flat list of news source codes that can be used with
|
||||
the newsType parameter in search_news.
|
||||
"""
|
||||
# See get_news_sources for the full 72+ source catalog.
|
||||
api = ctx.request_context.lifespan_context.api
|
||||
|
||||
try:
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
"""News content tools — search and retrieve crypto news via REST API.
|
||||
"""News content tools — search and retrieve news from 72+ sources via REST API.
|
||||
|
||||
Covers 5 engine categories: news (53 premium media & social sources), listing (9 exchanges),
|
||||
onchain (whale & KOL trades), meme (social sentiment), market (6 anomaly signals).
|
||||
Uses POST /open/news_search as the primary data source.
|
||||
Returns raw article data as-is from the API.
|
||||
"""
|
||||
|
||||
from mcp.server.fastmcp import Context
|
||||
@@ -14,7 +15,8 @@ from opennews_mcp.config import clamp_limit, make_serializable, MAX_ROWS
|
||||
async def get_latest_news(ctx: Context, limit: int = 10) -> dict:
|
||||
"""Get the most recent crypto news articles, newest first.
|
||||
|
||||
Returns news with title text, source, link, related coins, AI rating, and tags.
|
||||
Returns news from 72+ sources across all 5 categories (news, listing, onchain,
|
||||
meme, market) with title text, source, link, related coins, AI rating, and tags.
|
||||
|
||||
Args:
|
||||
limit: Maximum number of articles to return (default 10, max 100).
|
||||
@@ -36,6 +38,9 @@ async def get_latest_news(ctx: Context, limit: int = 10) -> dict:
|
||||
async def search_news(keyword: str, ctx: Context, limit: int = 10) -> dict:
|
||||
"""Search crypto news by keyword in text content.
|
||||
|
||||
Searches across all 72+ sources including Bloomberg, Reuters, CoinDesk,
|
||||
Twitter/X, on-chain alerts, exchange listings, and market signals.
|
||||
|
||||
Args:
|
||||
keyword: Search term (e.g. "bitcoin", "SEC", "ETF").
|
||||
limit: Maximum results (default 10, max 100).
|
||||
@@ -57,6 +62,9 @@ async def search_news(keyword: str, ctx: Context, limit: int = 10) -> dict:
|
||||
async def search_news_by_coin(coin: str, ctx: Context, limit: int = 10) -> dict:
|
||||
"""Search news related to a specific cryptocurrency coin/token.
|
||||
|
||||
Finds all mentions across 72+ sources: media coverage, exchange listings,
|
||||
whale trades, meme sentiment, and market anomalies for the given coin.
|
||||
|
||||
Args:
|
||||
coin: Coin symbol or name (e.g. "BTC", "ETH", "SOL", "TRUMP").
|
||||
limit: Maximum results (default 10, max 100).
|
||||
@@ -83,6 +91,12 @@ async def get_news_by_source(engine_type: str, news_type: str, ctx: Context, lim
|
||||
Args:
|
||||
engine_type: The engine type (e.g. "news", "listing", "onchain", "meme", "market").
|
||||
news_type: The news source code (e.g. "Bloomberg", "Reuters", "Coindesk").
|
||||
For listing: "Binance", "Coinbase", "OKX", "Bybit", "Upbit", "Bithumb",
|
||||
"Robinhood", "Hyperliquid", "Aster".
|
||||
For onchain: "Hyperliquid Whale Trade", "Hyperliquid Large Position", "KOL Trade".
|
||||
For meme: "Twitter".
|
||||
For market: "Price Change", "Funding Rate", "Funding Rate Difference",
|
||||
"Large Liquidation", "Market Trends", "OI Change".
|
||||
limit: Maximum results (default 10, max 100).
|
||||
"""
|
||||
api = ctx.request_context.lifespan_context.api
|
||||
@@ -103,6 +117,11 @@ async def get_news_by_engine(engine_type: str, ctx: Context, limit: int = 10) ->
|
||||
"""Get news articles filtered by engine type.
|
||||
|
||||
Engine types: "news", "listing", "onchain", "meme", "market".
|
||||
- "news": 53 sources — Bloomberg, Reuters, FT, CNBC, CNN, BBC, CoinDesk, Twitter/X, etc.
|
||||
- "listing": 9 exchanges — Binance, Coinbase, OKX, Bybit, Upbit, Bithumb, Robinhood, etc.
|
||||
- "onchain": Whale trades & KOL activity on Hyperliquid.
|
||||
- "meme": Meme coin social sentiment from Twitter.
|
||||
- "market": Price changes, funding rates, liquidations, OI changes, market trends.
|
||||
|
||||
Args:
|
||||
engine_type: The engine type code.
|
||||
@@ -132,6 +151,9 @@ async def search_news_advanced(
|
||||
) -> dict:
|
||||
"""Advanced news search with multiple filters.
|
||||
|
||||
Combines coin, keyword, engine type, and source filters for precise queries
|
||||
across the full 72+ source catalog.
|
||||
|
||||
Args:
|
||||
coins: Comma-separated coin symbols (e.g. "BTC,ETH").
|
||||
keyword: Optional search keyword.
|
||||
@@ -174,6 +196,9 @@ async def search_news_advanced(
|
||||
async def get_high_score_news(ctx: Context, min_score: int = 70, limit: int = 10) -> dict:
|
||||
"""Get highly-rated news articles (by AI score), sorted by score descending.
|
||||
|
||||
AI scores range 0-100 and reflect potential market impact.
|
||||
All articles from 72+ sources are AI-analyzed with score, grade, signal, and summary.
|
||||
|
||||
Args:
|
||||
min_score: Minimum score threshold (default 70).
|
||||
limit: Maximum results to return (default 10, max 100).
|
||||
@@ -204,6 +229,8 @@ async def get_high_score_news(ctx: Context, min_score: int = 70, limit: int = 10
|
||||
async def get_news_by_signal(signal: str, ctx: Context, limit: int = 10) -> dict:
|
||||
"""Get news filtered by trading signal type.
|
||||
|
||||
Each article from 72+ sources is AI-analyzed for trading direction.
|
||||
|
||||
Args:
|
||||
signal: The signal type: "long" (bullish), "short" (bearish), or "neutral".
|
||||
limit: Maximum results (default 10, max 100).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Real-time news tools — WebSocket subscription for live news updates."""
|
||||
"""Real-time news tools — WebSocket subscription for live updates from 72+ sources."""
|
||||
|
||||
from mcp.server.fastmcp import Context
|
||||
|
||||
@@ -20,6 +20,10 @@ async def subscribe_latest_news(
|
||||
Connects to the WebSocket feed, subscribes to news with optional filters,
|
||||
and collects incoming messages for the specified duration.
|
||||
|
||||
Streams live data from 72+ sources across 5 categories:
|
||||
news (Bloomberg, Reuters, etc.), listing (Binance, Coinbase, etc.),
|
||||
onchain (whale trades), meme (Twitter sentiment), market (price/funding/liquidation alerts).
|
||||
|
||||
Args:
|
||||
wait_seconds: How long to listen for news (default 10, max 30 seconds).
|
||||
max_items: Maximum news items to collect (default 5, max 20).
|
||||
|
||||
Reference in New Issue
Block a user