
whatshot-mcp
io.github.alisen39/whatshot-mcp
Chinese trending lists, newsflashes and their history from 400+ sites, for AI clients.
Documentation
🔥 WhatsHot MCP
Give Claude, Cursor, and any MCP client live access to trending lists, newsflashes, gold prices, and historical trends from 400+ Chinese & global tech sites.
Connect in 30 Seconds · What You Can Ask · Available Tools · Self-Host Locally · Architecture & Contract
whatshot-mcp is the official open-source Streamable HTTP MCP server for WhatsHot. It works in two ways:
- Hosted (Zero Setup): Point your AI client directly to
https://mcp.whatshot.top/mcpwith a free API key. - Self-Hosted (Unlimited): Install
whatshot-mcpfrom PyPI and connect it to your own local alisen39/whatshot backend.
What You Can Ask
Once connected to Claude Code, Cursor, OpenCode, or any Streamable HTTP MCP client, you can ask:
- "What is trending right now across Weibo, Zhihu, Bilibili, and GitHub?"
- "Track how long topic X stayed on hot lists over the last week, where it appeared first, and what rank it peaked at."
- "Summarize the most important Chinese financial newsflashes from Cailian Press and Wallstreetcn in the last 3 hours."
- "Compare today's retail gold prices across Chow Tai Fook, Lao Feng Xiang, and Lukfook."
Connect in 30 Seconds (Hosted)
No local installation required.
- Create a free API key at whatshot.top/account/developer (keys start with
wh_live_; standard accounts include 50 free calls/day, resetting at00:00 Asia/Shanghai). - Add the remote MCP server to your client config (setup guide: whatshot.top/developers):
{
"mcp": {
"whatshot": {
"type": "remote",
"url": "https://mcp.whatshot.top/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:WHATSHOT_API_KEY}"
}
}
}
}
Uses Streamable HTTP (
https://mcp.whatshot.top/mcp) withAuthorization: Bearer wh_live_.... Need higher volume or offline control? Self-host it in 3 commands below.
Self-Host Locally
Run whatshot-mcp against your own local alisen39/whatshot Core daemon with no daily quota.
Requirements: Python 3.12+. Standard installation has no optional extras.
# 1. Install
python -m pip install whatshot-mcp
# 2. Copy and edit config (point [backend] url to your local WhatsHot daemon, e.g. http://127.0.0.1:6690/api/v1)
cp config.example.toml config.toml
# 3. Validate backend contract & start Streamable HTTP server (default: http://127.0.0.1:6691/mcp)
whatshot-mcp backend check --config ./config.toml
whatshot-mcp serve --config ./config.toml
Useful operational CLI commands:
whatshot-mcp config validate --config ./config.toml
whatshot-mcp backend check --config ./config.toml # exit codes: 0 ok, 2 bad config, 3 unavailable, 4 bad contract, 5 version mismatch
whatshot-mcp version
Available Tools
At startup, whatshot-mcp fetches the backend's capability snapshot and registers only the tools supported by that backend.
Real-time Hot Lists & Discovery
| Tool | What it does |
|---|---|
whatshot_get_capabilities | Inspect backend version, enabled capabilities, and rate/result limits |
whatshot_list_sources | List available sites and boards |
whatshot_get_source_schema | Inspect parameters and board definitions for a specific site |
whatshot_get_current | Fetch the current hot list, newsflash stream, or gold prices for one board |
whatshot_get_current_batch | Fetch multiple boards in a single call |
History, Search & Event Analysis (requires backend history-read)
| Tool | What it does |
|---|---|
whatshot_query_history | Read historical snapshots of a board by time range |
whatshot_search_history | Search past hot-list items and newsflashes by keyword |
whatshot_get_trend_series | Get capture-by-capture rank/heat timeline for one item |
whatshot_get_data_coverage | Check historical coverage windows and index availability |
whatshot_analyze_hot_event | Aggregate cross-platform appearances, peak rank, and lifecycle for a topic |
whatshot_analyze_newsflash_coverage | Analyze newsflash coverage volume and timeline for a keyword |
Cloud Navigation (registered automatically when backend reports navigation=true)
| Tool | What it does |
|---|---|
whatshot_list_navigation | Cursor-paged category and site directory discovery |
whatshot_fetch_category_hotlists | Fetch bounded current boards for an entire category |
Architecture & Contract v1
AI Client ─Streamable HTTP (/mcp)→ whatshot-mcp ─HTTP Contract v1→ Local Core Daemon or WhatsHot Cloud
- Strict boundary:
whatshot-mcpnever imports Core and never touches DuckDB or PostgreSQL directly. All data flows through the versioned HTTP Contract v1 (src/whatshot_mcp/contracts/v1/). - Transport: Streamable HTTP only (
GET /healthis public;GET /readychecks backend reachability and requires a validwh_live_key inbearer_passthroughmode). - Per-request auth isolation: In hosted
bearer_passthroughmode, each client sends its ownAuthorization: Bearer wh_live_...header. Credentials are bound strictly to the current request, never shared across concurrent requests, and never logged or exposed in tool inputs/outputs.
Deployment, Security & Contract Technical Reference
Reverse Proxy & Non-Loopback Security
Unauthenticated Streamable HTTP is restricted to loopback binds. Non-loopback deployments require:
server.auth.mode = "bearer_passthrough"(forbids static backend keys so requests cannot silently fall back to a shared deployment identity;oauthis reserved and fails closed).server.allowed_hostsdeclaring the preserved publicHostheader for SDK DNS-rebinding protection:
[server]
allowed_hosts = ["mcp.whatshot.top"]
allowed_origins = []
Environment Variable Overrides
WHATSHOT_MCP_SERVER_BIND
WHATSHOT_MCP_SERVER_PORT
WHATSHOT_MCP_SERVER_PATH
WHATSHOT_MCP_SERVER_AUTH_MODE
WHATSHOT_MCP_BACKEND_URL
WHATSHOT_MCP_BACKEND_API_KEY
WHATSHOT_MCP_BACKEND_TIMEOUT_SECONDS
WHATSHOT_MCP_BACKEND_CAPABILITIES_TTL_SECONDS
Search, Analysis & Error Semantics
- Keyword matching: Matches title/description — Chinese by substring characters, non-CJK scripts by whole words (
GPTmatchesChatGPT,AIdoes not matchsaid). - Cloud search index: Returns one evidence record per hot-list item per day (
observedAt/firstSeenAt,lastSeenAt, bestrank) and one per newsflash for the last 90 days. Usewhatshot_get_trend_seriesfor every raw capture of one item. - Bounded analysis:
whatshot_analyze_hot_eventandwhatshot_analyze_newsflash_coverageseparatescanBudget(records examined) fromevidenceLimit(records returned) and always reportanalysisComplete,scannedCount, andcoverage. - Errors: Failed tool calls return
isError=truewith stable backend error codes (e.g.UNKNOWN_SOURCE,UPSTREAM_UNAVAILABLE,DAILY_QUOTA_EXCEEDEDwithRetry-AfterandresetsAt).
Contract v1 Invariants
- Single source of truth: Pydantic models in
src/whatshot_mcp/contracts/v1/(no hand-maintained duplicate schemas). - Public JSON fields use
camelCase, reject undeclared fields, and require timezone-aware timestamps. - Success envelopes use
{ "data": ..., "meta": ... }; failures useErrorEnvelope. boardKeyuses the canonical algorithm shared across local Core and Cloud backends.- Capability snapshot is validated and frozen at startup; user scopes (
data:read,live:fetch) are enforced per call by the backend and never altertools/list.
Development & Release
python -m pip install -e .
pytest
python -m build
PyPI releases use GitHub Actions Trusted Publishing (publish.yml) triggered by pushing a SemVer v<version> tag.
License
MIT License · Owned by alisen39.
No installation packages available.