index-valuation
Enables querying index valuations (PE, PB, etc.) for 63 Chinese stock indices, with support for fuzzy search, batch queries, historical data, and trend analysis.
README
📈 指数估值查询服务
基于雪球 API 的指数估值查询 MCP Server,提供指数估值数据。
✨ 功能特性
- 🔄 权威数据:调用雪球基金指数估值数据 API,获取估值
- 🎯 63个指数:覆盖 行业、宽基、策略等类型指数
- 📊 最新查询:支持模糊匹配、批量查询、估值筛选
- 📈 历史估值:查询历史数据,分析估值趋势
- ⚡ MCP 协议:可集成到 Claude Code、Cursor 等 AI 工具
- 💾 自动缓存:1小时自动刷新,减少 API 调用
📦 快速开始
1. 安装依赖
cd /YOUR-PATH-TO/index_valuation
uv venv
source .venv/bin/activate
uv pip install mcp requests
2. 测试服务状态
source .venv/bin/activate
python3 tests/test_mcp_server.py
3. 配置 MCP
编辑 Claude Code 配置文件 ~/.claude/settings.json:
{
"mcpServers": {
"index-valuation": {
"command": "/YOUR-PATH-TO/index_valuation/.venv/bin/python",
"args": ["/YOUR-PATH-TO/index_valuation/mcp_server.py"],
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONPATH": "/YOUR-PATH-TO/index_valuation"
},
"description": "指数估值查询服务(支持最新+历史查询)"
}
}
}
4. 重启 Claude Code
配置完成后,重启 Claude Code。
开始享用
🛠️ 可用工具
| 工具 | 描述 | 使用场景 |
|---|---|---|
get_index_valuation |
查询单个指数估值(最新) | "沪深300估值如何" |
get_batch_indices |
批量查询多个指数估值 | "查询沪深300、中证红利" |
search_indices |
搜索指数(支持名称/代码) | "搜索中证银行" |
filter_by_valuation |
按估值状态筛选指数 | "找出低估指数" |
fetch_latest_data |
刷新最新估值数据 | "刷新最新估值" |
get_index_history |
查询单个指数的历史估值数据 | "沪深300最近7天的历史数据" |
get_trend_analysis |
分析指数估值趋势 | "分析沪深300的估值趋势" |
get_history_summary |
获取历史数据概况 | "查看历史数据总量" |
示例
在 Claude Code 中直接对话:
示例对话 1: 查询单个指数
帮我查询沪深300的估值
示例对话 2: 找出低估指数
列出所有估值偏低的指数
示例对话 3: 批量查询
查询沪深300、中证红利、中证白酒的估值情况
示例对话 4: 搜索指数
帮我找一下中证银行的估值
示例对话 5: 查询历史数据
帮我查询沪深300最近7天的历史估值数据
示例对话 6: 分析估值趋势
分析一下沪深300的估值趋势
🚀 历史估值查询功能
MCP Server 支持查询历史估值数据和分析趋势:
收集历史数据
收集历史数据
# 1. 抓取今日数据(创建 data/history_data.csv)
source .venv/bin/activate
python3 archive/history_data_manager.py
# 2. 查看数据概况
python3 archive/history_data_manager.py --list
# 3. 配置定时任务(每天自动抓取)
# 参考 HISTORY_README.md
💡 提示:历史数据需要每日手动抓取,建议配置定时任务自动收集。
更多详情:HISTORY_README.md
📈 数据来源
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.