同花顺iFinD金融数据MCP工具。用于查询A股股票、公募基金、宏观经济和新闻资讯数据。当用户需要查询股票、基金、宏观经济指标或新闻资讯时使用。
同花顺 iFinD MCP 服务,提供专业金融数据查询。
bash
# 安装 Node.js (如果没有)
# macOS: brew install node
# Linux: sudo apt install nodejs
# 安装 mcporter
npm install -g mcporter
将密钥配置到 ~/.openclaw/mcporter.json(推荐,跨平台兼容):
bash
mkdir -p ~/.openclaw
cat > ~/.openclaw/mcporter.json << 'EOF'
{
"mcpServers": {
"hexin-ifind-stock": {
"url": "https://api-mcp.51ifind.com:8643/ds-mcp-servers/hexin-ifind-ds-stock-mcp",
"headers": {
"Authorization": "Bearer <你的密钥>"
}
},
"hexin-ifind-fund": {
"url": "https://api-mcp.51ifind.com:8643/ds-mcp-servers/hexin-ifind-ds-fund-mcp",
"headers": {
"Authorization": "Bearer <你的密钥>"
}
},
"hexin-ifind-edb": {
"url": "https://api-mcp.51ifind.com:8643/ds-mcp-servers/hexin-ifind-ds-edb-mcp",
"headers": {
"Authorization": "Bearer <你的密钥>"
}
},
"hexin-ifind-news": {
"url": "https://api-mcp.51ifind.com:8643/ds-mcp-servers/hexin-ifind-ds-news-mcp",
"headers": {
"Authorization": "Bearer <你的密钥>"
}
}
}
}
密钥获取:在 iFinD 终端下载 MCP 配置文件(tonghuashun_token.rtf),提取 JSON 中的 Authorization 字段值。
bash
mcporter --config ~/.openclaw/mcporter.json list
# 应显示 4 个健康的服务器
bash
# 使用配置文件的路径
mcporter --config ~/.openclaw/mcporter.json call <server>.<tool>
bash
# 修改脚本中的配置路径
sed -i 's|~/.config|~/.openclaw|' scripts/query.sh
./scripts/query.sh stock "贵州茅台"
服务器用途hexin-ifind-stockA股股票数据hexin-ifind-fund公募基金数据hexin-ifind-edb宏观经济数据hexin-ifind-news公告资讯
工具说明get_stock_summary股票信息摘要search_stocks智能选股get_stock_perfomance历史行情与技术指标get_stock_info基本资料查询get_stock_shareholders股本结构与股东数据get_stock_financials财务数据与指标get_risk_indicators风险指标get_stock_events公开披露事件get_esg_dataESG评级
bash
# 查询股票概况
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-stock.get_stock_summary query:"贵州茅台"
# 智能选股
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-stock.search_stocks query:"新能源汽车行业市值大于1000亿"
# 历史行情
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-stock.get_stock_perfomance query:"宁德时代最近5日涨跌幅"
# 财务数据
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-stock.get_stock_financials query:"比亚迪2025年ROE"
工具说明search_funds模糊基金名称匹配get_fund_profile基金基本资料get_fund_market_performance行情与业绩get_fund_ownership份额与持有人结构get_fund_portfolio投资标的与资产配置get_fund_financials基金财务指标get_fund_company_info基金公司信息
bash
# 查询基金
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-fund.search_funds query:"易方达科技ETF"
# 基金业绩
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-fund.get_fund_market_performance query:"富国天惠近一年收益率"
# 持仓明细
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-fund.get_fund_portfolio query:"中欧医疗健康混合A2025Q2持仓"
bash
# 宏观经济
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-edb.get_macro_data query:"中国GDP增速"
# 新闻资讯
mcporter --config ~/.openclaw/mcporter.json call hexin-ifind-news.get_company_news query:"华为最新公告"
详细 API 说明见 references/API.md