Supports Docker deployment with container orchestration for the stock data service, including Redis caching layer
Provides RESTful API endpoints for stock data queries, financial analysis, and AI-powered research through FastAPI framework
Enables high-performance caching of stock market data with automatic fallback mechanisms for improved reliability and speed
Offers interactive API documentation and testing interface for all stock market data endpoints
📈 Stock MCP Server
基于 Model Context Protocol 的智能股票数据服务
一站式获取 A股/港股/美股实时数据 + AI 驱动的深度分析
✨ 为什么选择 Stock MCP?
🌐 全球市场覆盖 - 一键接入 A股、港股、美股数据
🤖 AI 智能分析 - 新闻情绪分析、深度研究报告、智能搜索
🚀 开箱即用 - Docker 一键部署,5分钟启动服务
📊 多数据源融合 - AKShare、Tushare、yFinance、Finnhub 智能聚合
💾 高性能缓存 - Redis 加速 + 自动降级,稳定可靠
🚀 快速开始
🎯 5分钟体验核心功能:
🎯 核心功能
📊 数据查询
✅ 实时行情 - 分钟级价格/成交量
✅ 历史数据 - K线图、复权价格
✅ 财务报表 - 资产负债表、现金流
✅ 技术指标 - MACD、RSI、布林带
✅ 资金流向 - 主力资金、北向资金
🤖 AI 增强
🔍 智能搜索 - Tavily 语义搜索
📰 情绪分析 - 多源新闻聚合 + 评分
📈 深度研究 - AI 生成研究报告
💡 决策辅助 - 数据驱动的投资建议
🌐 多语言支持 - 中英文自动识别
⚙️ 配置说明
核心配置(.env
文件)
配置项 | 说明 | 默认值 |
| Redis 主机 |
(Docker)/
|
| 是否启用缓存 |
|
| 缓存过期时间(秒) |
|
详见:配置指南
📡 API 使用
核心接口示例
📚 完整接口文档:启动服务后访问 http://localhost:9998/docs
🐳 Docker 部署
服务架构
端口 | 服务 | 说明 |
| FastAPI | RESTful API + Swagger 文档 |
| MCP Server | Model Context Protocol 服务 |
| Redis | 内部缓存(不对外暴露) |
常用命令
🛠️ 故障排查
确保 Token 有效且已配置到 .env
文件:
更多问题:完整故障排查指南
📚 文档
🤝 参与贡献
欢迎提交 Issue 和 Pull Request!
📄 开源协议
MIT License - 详见 LICENSE
🙏 致谢
本项目基于以下优秀开源项目构建
MCP • FastAPI • AKShare • Tushare • yFinance • Tavily
⭐️ 如果对你有帮助,请给个 Star ⭐️
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides real-time stock data and AI-powered analysis for A-shares, Hong Kong stocks, and US stocks. Features sentiment analysis of financial news, deep research reports, and comprehensive market data through multiple integrated data sources.