cd /news/ai-agents/how-ai-agents-pull-a-share-heat-data… · home › topics › ai-agents › article
[ARTICLE · art-163582] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How AI Agents Pull A-Share Heat Data via MCP in About Five Minutes

Lava (熔岩), a read-only data service, exposes structured A-share stock and concept-board heat signals over both MCP and a REST API sharing a single schema, letting LLM agents query market attention data in minutes. The service counts and weights mentions across institutional notes, commentators and mainstream financial news, anonymizing sources into stable IDs, and offers tools for hot stocks, accelerating heat, first mentions, per-stock heat windows, concept mappings, source coverage and daily panels for backtests. It returns attention data only, with no bullish/bearish labels, original text or price targets.

by read5 min views6 publishedNov 4, 2026

Most LLM agents that touch Chinese equities hit the same wall: the model can reason about a sector, but it has no structured, timely view of what the market is actually talking about. Scraping forums and news sites is brittle, slow, and full of raw text you probably should not be redistributing.

Lava (熔岩) is a read-only data service that turns A-share news flow into structured heat signals for stocks and concept boards, exposed over both MCP and REST. This post walks through what the data means, which tools exist, and how to wire an agent to it quickly.

Lava returns attention/heat data only. No bullish/bearish labels, no original text, no price targets, and nothing in this article is investment advice.

Lava counts and weights mentions of A-share stocks and concept boards across institutional notes, commentators, and mainstream financial news. Sources are anonymized into stable IDs (for example an agency ID), so you can track source quality without seeing names or source text.

Three data categories matter most for agents:

A-share narratives move through concept boards (AI computing, solid-state batteries, low-altitude economy, etc.). Lava tracks:

Comparing those across windows gives you a rotation view: attention leaving one board and arriving at another.

A first-mention is a stock that had zero mentions in the previous 7 days and just got its first one. It is a novelty signal: useful for "what entered the conversation today" digests, and a natural input for research triage.

The MCP server and the REST API share one schema. Tool names below match the OpenAPI operationId s, so an agent can resolve them deterministically.

Tool ( operationId ) Path Key params Returns
listHotStocks GET /hot/stocks window ,market ,min_score ,limit Most-mentioned stocks in window
listHotConcepts GET /hot/concepts window ,min_score ,limit Hottest concept boards
listWeightedHotStocks GET /hot/weighted as_of_date ,days ,min_score ,order ,market ,limit Heat weighted by source score
listAcceleratingHotStocks GET /hot/accelerating window ,order ,min_mentions ,market ,limit Momentum-sorted heat changes
listFirstMentions GET /hot/first-mentions hours ,min_score ,limit Stocks first mentioned after 7 quiet days
Tool Path Key params Returns
getStockHeatWindows GET /heat/windows stock_name orts_code ,min_score Heat for 1h…7d windows + hourly last 24h
listOpinionsByStock GET /opinions ts_code ,days ,start_date ,end_date ,only_this_stock ,limit Mention records (structured, no text)
listConceptStocks GET /concepts/stocks concept ,days ,limit Top-mentioned stocks inside a concept
listStockConcepts GET /concepts/by-stock ts_code ,days ,limit Hottest concepts linked to a stock
getStockAgencyCoverage GET /coverage/stocks ts_code ,days ,min_score Source-coverage time series
listNewsStockHits GET /news/hits ts_code ,hours ,src ,limit Stocks named in mainstream news
Tool Path Key params Returns
getDailyHeatPanel GET /panel/daily type ,codes ,names ,from ,to Daily panel (mentions, source count, weighted heat) for backtests
listAgencyRanking GET /agencies/ranking order ,min_score ,limit ,offset Current source scores
listAgencyPit GET /agencies/pit as_of_date ,agency_id ,min_score Point-in-time source scores
getAgencyHistory GET /agencies/{agency_id}/history start_date ,end_date Score history of one source
searchOpinions GET /opinions/search keyword ,since ,limit Keyword search over mention records
getAccount GET /account — Balance and usage (free call)

ts_code uses the Tushare-style format, e.g. 300750.SZ, 688256.SH.

Point-in-time (PIT) scores matter if you backtest: listAgencyPit gives source scores as they were on as_of_date, so weighted heat in your backtest does not leak future information.

Sign up, copy your API key (format lvk_…), and note the MCP endpoint URL from the docs. Keys go in a header:

Authorization: Bearer lvk_xxxxxxxx

Never commit the key; read it from an environment variable.

Most MCP clients (Claude Desktop, Cursor, Cline, custom agents) accept a remote HTTP server entry like this:

{
  "mcpServers": {
    "lava": {
      "url": "<LAVA_MCP_URL>",
      "headers": {
        "Authorization": "Bearer ${LAVA_API_KEY}"
      }
    }
  }
}

Restart the client; it should list the tools above.

Call getAccount first. It costs nothing and confirms auth. Then try:

listHotConcepts(window="24h", limit=10)

If your agent framework does not speak MCP, the same data is plain HTTP:

curl -s "$LAVA_BASE/hot/first-mentions?hours=24&min_score=60&limit=20" \
  -H "Authorization: Bearer $LAVA_API_KEY"
python
import os, requests

BASE = os.environ["LAVA_BASE"]
H = {"Authorization": f"Bearer {os.environ['LAVA_API_KEY']}"}

def lava(path, **params):
    r = requests.get(f"{BASE}{path}", headers=H, params=params, timeout=20)
    r.raise_for_status()
    return r.json()

concepts = lava("/hot/concepts", window="24h", limit=10)

Goal: a short brief of "what the market is discussing", generated before the open.

listHotConcepts(window="24h", limit=10) → top boards.listConceptStocks(concept=..., days=1, limit=5). listFirstMentions(hours=24, min_score=60, limit=10) → new names.listAcceleratingHotStocks(window="24h", min_mentions=3, limit=10) → movers in attention. Prompt the model to describe attention only: "rank by heat, note rotation versus yesterday, list first-mentions". Instruct it explicitly not to produce buy/sell language.

Run listHotConcepts at window="24h" and window="7d" and diff the ranks. A concept high on 24h but low on 7d is newly rotating in; the reverse is cooling off. Store daily snapshots, or skip the bookkeeping and pull getDailyHeatPanel(type="concept", names=...) for history.

When a user asks about a ticker, have the agent fetch:

getStockHeatWindows(ts_code=...) for the 1h–7d curve;listStockConcepts(ts_code=..., days=7) for which narratives it is riding;getStockAgencyCoverage(ts_code=..., days=30, min_score=60) to see if coverage breadth is growing or shrinking. This gives the model grounded context ("heat is concentrated in the last 6 hours, mainly via the AI computing board, with coverage from more high-score sources than last week") instead of hallucinated sentiment.

min_score`` ts_code over nameslimit and avoid loops that fan out over every stock in a board. If you want to see the data before writing code, the AI board heat monitor (https://lava.ai-dolphin.com/monitor/board-ai-heat) shows a concept heat series built from these same endpoints.

An agent with Lava attached can answer "what is the A-share market paying attention to, and how is that changing?" with structured numbers instead of guesses. Setup is one header and one server entry; the useful part is combining heat, concept rotation, and first-mention into workflows.

Research notes, methodology, and worked examples are here: https://lava.ai-dolphin.com/research

── more in #ai-agents 4 stories · sorted by recency
── more on @lava 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-ai-agents-pull-a…] indexed:0 read:5min 2026-11-04 · —