{"slug": "how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes", "title": "How AI Agents Pull A-Share Heat Data via MCP in About Five Minutes", "summary": "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.", "body_md": "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.\n\nLava (熔岩) 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.\n\nLava returns attention/heat data only. No bullish/bearish labels, no original text, no price targets, and nothing in this article is investment advice.\n\nLava 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.\n\nThree data categories matter most for agents:\n\nA-share narratives move through **concept boards** (AI computing, solid-state batteries, low-altitude economy, etc.). Lava tracks:\n\nComparing those across windows gives you a rotation view: attention leaving one board and arriving at another.\n\nA **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.\n\nThe MCP server and the REST API share one schema. Tool names below match the OpenAPI `operationId` s, so an agent can resolve them deterministically.\n\n| Tool ( `operationId` ) | Path | Key params | Returns | \n|---|---|---|---|\n| `listHotStocks` | `GET /hot/stocks` | `window` ,`market` ,`min_score` ,`limit` | Most-mentioned stocks in window | \n| `listHotConcepts` | `GET /hot/concepts` | `window` ,`min_score` ,`limit` | Hottest concept boards | \n| `listWeightedHotStocks` | `GET /hot/weighted` | `as_of_date` ,`days` ,`min_score` ,`order` ,`market` ,`limit` | Heat weighted by source score | \n| `listAcceleratingHotStocks` | `GET /hot/accelerating` | `window` ,`order` ,`min_mentions` ,`market` ,`limit` | Momentum-sorted heat changes | \n| `listFirstMentions` | `GET /hot/first-mentions` | `hours` ,`min_score` ,`limit` | Stocks first mentioned after 7 quiet days | \n\n| Tool | Path | Key params | Returns | \n|---|---|---|---|\n| `getStockHeatWindows` | `GET /heat/windows` | `stock_name` or`ts_code` ,`min_score` | Heat for 1h…7d windows + hourly last 24h | \n| `listOpinionsByStock` | `GET /opinions` | `ts_code` ,`days` ,`start_date` ,`end_date` ,`only_this_stock` ,`limit` | Mention records (structured, no text) | \n| `listConceptStocks` | `GET /concepts/stocks` | `concept` ,`days` ,`limit` | Top-mentioned stocks inside a concept | \n| `listStockConcepts` | `GET /concepts/by-stock` | `ts_code` ,`days` ,`limit` | Hottest concepts linked to a stock | \n| `getStockAgencyCoverage` | `GET /coverage/stocks` | `ts_code` ,`days` ,`min_score` | Source-coverage time series | \n| `listNewsStockHits` | `GET /news/hits` | `ts_code` ,`hours` ,`src` ,`limit` | Stocks named in mainstream news | \n\n| Tool | Path | Key params | Returns | \n|---|---|---|---|\n| `getDailyHeatPanel` | `GET /panel/daily` | `type` ,`codes` ,`names` ,`from` ,`to` | Daily panel (mentions, source count, weighted heat) for backtests | \n| `listAgencyRanking` | `GET /agencies/ranking` | `order` ,`min_score` ,`limit` ,`offset` | Current source scores | \n| `listAgencyPit` | `GET /agencies/pit` | `as_of_date` ,`agency_id` ,`min_score` | Point-in-time source scores | \n| `getAgencyHistory` | `GET /agencies/{agency_id}/history` | `start_date` ,`end_date` | Score history of one source | \n| `searchOpinions` | `GET /opinions/search` | `keyword` ,`since` ,`limit` | Keyword search over mention records | \n| `getAccount` | `GET /account` | — | Balance and usage (free call) | \n\n`ts_code` uses the Tushare-style format, e.g. `300750.SZ`, `688256.SH`.\n\nPoint-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.\n\nSign up, copy your API key (format `lvk_…`), and note the MCP endpoint URL from the docs. Keys go in a header:\n\n```\nAuthorization: Bearer lvk_xxxxxxxx\n```\n\nNever commit the key; read it from an environment variable.\n\nMost MCP clients (Claude Desktop, Cursor, Cline, custom agents) accept a remote HTTP server entry like this:\n\n```\n{\n  \"mcpServers\": {\n    \"lava\": {\n      \"url\": \"<LAVA_MCP_URL>\",\n      \"headers\": {\n        \"Authorization\": \"Bearer ${LAVA_API_KEY}\"\n      }\n    }\n  }\n}\n```\n\nRestart the client; it should list the tools above.\n\nCall `getAccount` first. It costs nothing and confirms auth. Then try:\n\n```\nlistHotConcepts(window=\"24h\", limit=10)\n```\n\nIf your agent framework does not speak MCP, the same data is plain HTTP:\n\n```\ncurl -s \"$LAVA_BASE/hot/first-mentions?hours=24&min_score=60&limit=20\" \\\n  -H \"Authorization: Bearer $LAVA_API_KEY\"\npython\nimport os, requests\n\nBASE = os.environ[\"LAVA_BASE\"]\nH = {\"Authorization\": f\"Bearer {os.environ['LAVA_API_KEY']}\"}\n\ndef lava(path, **params):\n    r = requests.get(f\"{BASE}{path}\", headers=H, params=params, timeout=20)\n    r.raise_for_status()\n    return r.json()\n\nconcepts = lava(\"/hot/concepts\", window=\"24h\", limit=10)\n```\n\nGoal: a short brief of \"what the market is discussing\", generated before the open.\n\n`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.\nPrompt 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.\n\nRun `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.\n\nWhen a user asks about a ticker, have the agent fetch:\n\n`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.\nThis 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.\n\n`min_score`` ts_code` over names`limit` and avoid loops that fan out over every stock in a board.\nIf you want to see the data before writing code, the AI board heat monitor ([https://lava.ai-dolphin.com/monitor/board-ai-heat](https://lava.ai-dolphin.com/monitor/board-ai-heat)) shows a concept heat series built from these same endpoints.\n\nAn 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.\n\nResearch notes, methodology, and worked examples are here: [https://lava.ai-dolphin.com/research](https://lava.ai-dolphin.com/research)", "url": "https://wpnews.pro/news/how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes", "canonical_source": "https://dev.to/dustinliang/how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes-5dkm", "published_at": "2026-11-04 03:41:04+00:00", "updated_at": "2026-11-04 03:56:01.403742+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "structured-data", "ai-infrastructure"], "entities": ["Lava", "MCP", "Tushare"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes", "markdown": "https://wpnews.pro/news/how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes.md", "text": "https://wpnews.pro/news/how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes.txt", "jsonld": "https://wpnews.pro/news/how-ai-agents-pull-a-share-heat-data-via-mcp-in-about-five-minutes.jsonld"}}