- This skill provides a unified query entry point for data such as stocks, funds, macroeconomic and industry indicators, and news and announcements
- Main capabilities include natural language stock and fund screening, financial indicator retrieval, announcement and information retrieval, and economic indicator search
- Available data covers common research scenarios such as securities, funds, economic indicators, and public information
How to Call
This skill wraps calls to the Tonghuashun financial data MCP service and can be used via Python or Node.js:
- Node.js Solution: Use the
call-node.jsscript (no additional dependencies required, uses built-in modules) - Python Solution: Use the
call.pyscript (requires installing therequestslibrary) - Recommended Solution: When the user does not specify python, or is unsure about the python environment, prioritize the Node.js solution
- query: The query parameter of stock and fund data query tools generally supports multiple entities and multiple indicators, but should not exceed 10
First Use
- Configure Key: config.json is used to store the user key. If no valid key exists, prompt the user to obtain a key from "iFinD Terminal - Tools - Common Tools - Data MCP" and help them complete the key writing, or write it manually
Queryable Content
- Stock Data: Can handle securities screening, company profiles, financial indicators, market performance, shareholder structure, risk data, ESG, and corporate events
- Fund Data: Covers product search, basic profiles, net value and performance, portfolio holdings, holders, and manager information
- Macroeconomic Data: Supports economic series such as GDP, CPI, PPI, industry indicators, and commodities
- News and Announcements: Used to retrieve financial reports, listed company disclosures, and market hotspots
Query Suggestions
- 1.Locate Indicators First: When the meaning of a macroeconomic or industry indicator is unclear, first call
search_edbto obtain candidates, then useget_edb_datain context to retrieve data - 2.Merge Requests Moderately: Stock and fund tools allow querying multiple entities and indicators at the same time, for example
{"query":"贵州茅台、五粮液、泸州老窖在2025-09-30的净利润增速、ROE、ROA"}; it is recommended that the number of entities and the number of indicators each not exceed 5 - 3.Control Sector Scope: Industries or sectors can be used as stock query entities, but the scope and time span should not be too large, to avoid truncated results, for example
{"query":"光伏设备行业股票的今日涨跌幅"}
Core Functions
call(server_type, tool_name, params)
Send a financial data query to the specified service.
Parameters:
server_type(str): Service type, value range:"stock"- Stock service"fund"- Fund service"edb"- Macroeconomic/industry economic indicator service"news"- News and announcement service
tool_name(str): Tool name, see the tool list below for detailsparams(dict): Request parameters, which differ by tool
Return Value:
{
"ok": True/False,
"status_code": HTTP状态码,
"data": ..., # ok=True时返回
"error": ..., # ok=False时返回
"raw": ... # 原始响应
}
list_tools(server_type)
Return the list of tools currently callable under the specified service category.
Stock Service Tools (server_type="stock")
| Tool Name | Function Description | Typical parameters |
|---|---|---|
search_stocks |
Smart stock selection | {"query": "自然语言选股条件"} such as "电子行业市值大于100亿" |
get_stock_summary |
Stock information summary | {"query": "股票简称+查询内容"} such as "茅台财务状况" |
get_stock_info |
Stock basic information, daily frequency quotes and technical indicators | {"query": "股票简称+指标名称+时间"} such as "格力电器上市时间"or"三花智控近5日涨跌幅" |
get_stock_shareholders |
Share capital structure and shareholder data | {"query": "股票简称+指标"} such as "光明乳业流通股占比" |
get_stock_financials |
Financial data and indicators | {"query": "股票简称+财务指标+财报日期"} such as "科大讯飞2025年三季度的ROE" |
get_risk_indicators |
Quantitative risk indicators | {"query": "股票+时间+指标"} such as "航天电子在2026-03-19的夏普比率" |
get_stock_events |
Major event indicators for listed companies | {"query": "股票+事件相关指标"} such as "摩尔线程IPO首发股本数量" |
get_esg_data |
ESG rating data | {"query": "股票+ESG评级指标"} such as "诚意药业中诚信ESG评级" |
Stock selection query examples
# 智能选股
call("stock", "search_stocks", {"query": "汽车零部件行业市值大于1000亿的股票"})
Fund service tools (server_type="fund")
| Tool name | Function description | Typical parameters |
|---|---|---|
search_funds |
Fund search | {"query": "模糊基金名称或选基需求"} such as "南方基金新能源ETF" |
get_fund_profile |
Fund basic information | {"query": "基金名称+指标"} such as "工银双盈债券A(010068)的发行日期与发行费率" |
get_fund_market_performance |
Fund quotes and performance | {"query": "基金名称+时间范围+指标"} such as "方正富邦策略精选A(010072)在近一月收益率" |
get_fund_ownership |
Fund shares and holders | {"query": "基金名称+日期+指标"} such as "湘财长弘灵活配置混合A(010076)在2025-06-30的申购总份额和赎回总份额" |
get_fund_portfolio |
Fund holdings details | {"query": "基金名称+日期+指标"} such as "工银优质成长混合A(010088)在2025-06-30披露报告中的股票投资占比" |
get_fund_financials |
Fund financial indicators | {"query": "基金名称+日期+指标"} such as "泰康浩泽混合A(010081)在2025-06-30的利润" |
get_fund_company_info |
Fund company information | {"query": "基金名称+所属基金公司维度指标"} such as "蜂巢丰瑞的所属基金公司基金经理数量" |
Macroeconomic/industry economic indicator service (server_type="edb")
- Macro and industry series are suitable for a two-step process of "search for candidate indicators, then obtain specific data"
| Tool name | Function description | Typical parameters |
|---|---|---|
search_edb |
Indicator search | {"query": "行业/产品/指标描述"} such as "光模块产业链相关指标" |
get_edb_data |
Indicator data query | {"query": "指标名称+时间范围"} such as "光伏电池产量202301-202506" |
EDB query examples
# 搜索可能的指标
call("edb", "search_edb", {"query": "新能源汽车产量相关指标"})
# 获取具体数据
call("edb", "get_edb_data", {"query": "新能源汽车产量当月值(202301-202506)"})
News announcement service (server_type="news")
- News and announcement tools match relevant fragments semantically; the returned content is not equivalent to the entire original text
- Hotspot retrieval emphasizes timeliness; too many conditions may lead to empty results, so you can reduce restrictions or switch to ordinary information search
queryYou can describe both the report scope and the content of interest, for example{"query":"宁德时代2025年年度报告 储能业务相关"}
| Tool name | Function description | Typical parameters |
|---|---|---|
search_news |
News information semantic retrieval | {"query": "内容", "time_start": "开始日期", "time_end": "结束日期", "size": 数量} |
search_notice |
Announcement semantic retrieval | {"query": "内容", "time_start": "开始日期", "time_end": "结束日期", "size": 数量} |
search_trending_news |
Hot event information query | {"keyword": "关键词", "industry_name": "行业", "time_scope": "时效范围", "size": 数量} |
News query examples
# 财经新闻
call("news", "search_news", {
"query": "脑机接口技术最新进展",
"time_start": "2025-01-01",
"time_end": "2026-01-01",
"size": 5
})
# 上市公司公告
call("news", "search_notice", {
"query": "光迅科技2024年度报告 光模块技术",
"time_start": "2025-01-01",
"time_end": "2026-01-01",
"size": 5
})
# 热点事件
call("news", "search_trending_news", {
"keyword": "智能体",
"industry_name": "计算机",
"time_scope": "24小时",
"size": 5
})
Usage examples
This skill provides two script entry points, which can be selected according to the runtime environment; when the user does not specify and the Python environment is unclear, prioritize the Node.js solution:
Option 1: Node.js script invocation method
const { call, listTools } = require('./call-node.js');
async function main() {
// 查询股票数据
const result1 = await call("stock", "search_stocks", { query: "电子行业市值排名前20的股票" });
console.log(JSON.stringify(result1, null, 2));
// 查询基金数据
const result2 = await call("fund", "search_funds", { query: "南方基金的新能源ETF" });
console.log(JSON.stringify(result2, null, 2));
// 查询宏观经济数据
const result3 = await call("edb", "get_edb_data", { query: "光伏电池产量当月值(202301-202506)" });
console.log(JSON.stringify(result3, null, 2));
// 查询新闻
const result4 = await call("news", "search_news", {
query: "人工智能行业动态",
time_start: "2025-01-01",
time_end: "2026-01-01",
size: 5
});
console.log(JSON.stringify(result4, null, 2));
}
main().catch(console.error);
Option 2: Python script invocation method
from call import call, list_tools
# 查询股票数据
result = call("stock", "search_stocks", {"query": "电子行业市值排名前20的股票"})
print(result)
# 查询基金数据
result = call("fund", "search_funds", {"query": "南方基金的新能源ETF"})
print(result)
# 查询宏观经济数据
result = call("edb", "get_edb_data", {"query": "光伏电池产量当月值(202301-202506)"})
print(result)
# 查询新闻
result = call("news", "search_news", {
"query": "人工智能行业动态",
"time_start": "2025-01-01",
"time_end": "2026-01-01",
"size": 5
})
print(result)
Features of the Node.js solution:
- No additional dependency libraries need to be installed; use Node.js built-in
http/httpsmodule - Asynchronous function design, supporting
async/awaitsyntax - Uses the same configuration file as the Python solution
mcp_config.json
Notes
- Configuration file
mcp_config.jsonneeds to contain a validauth_token(shared by both solutions) - The request address is already built into the request scripts call.py and call-node.js, and the key in the configuration file is also already referenced in the script, so you can call it directly without needing to reread or generate the URL and key
- All function return results need to be checked for
okField confirms whether the request is successful - Time parameter format:
YYYY-MM-DD search_edbCan be used for fuzzy search when the specific metric name is uncertain- If there is no Python environment, you can use the Node.js solution (
call-node.js), no dependencies need to be installed - After a single request is completed, please help the user delete the data-fetching script you temporarily generated