Used for secure storage and management of Tushare API tokens in the user's home directory.
Server implementation requires Python 3.8+ to run the MCP service for Tushare data querying capabilities.
Tushare MCP Server
基于 Model Context Protocol (MCP) 的智能股票数据助手
🚀 核心功能
1. 股票基础信息查询
- 支持通过股票代码(如:000001.SZ)精确查询
- 支持通过股票名称(如:平安银行)模糊查询
- 返回信息包含:
- 股票代码和名称
- 所属行业和地区
- 上市日期
- 市场类型
- 交易状态
2. 智能股票搜索
- 支持模糊关键词搜索
- 同时匹配股票代码和名称
- 支持行业关键词搜索(如:"新能源"、"科技")
- 返回匹配度最高的股票列表
3. 财务报表分析
- 支持查询上市公司利润表数据
- 灵活的时间范围查询(年报、季报、半年报)
- 多种报表类型支持(合并报表、母公司报表等)
- 主要指标一目了然:
- 每股收益
- 营业收入和成本
- 期间费用
- 利润指标
- 支持历史数据对比分析
4. 安全的Token管理
- 交互式Token配置流程
- 本地安全存储(加密保存)
- Token有效性自动验证
- 定期Token状态检查
🎯 使用场景
- 投资研究
- 财务分析
- 行业分析
- 报表查询
🛠️ 技术特点
- 基于MCP协议,支持与Claude等AI助手自然对话
- 实时连接Tushare Pro数据源
- 智能错误处理和提示
- 支持并发请求处理
- 数据缓存优化
📦 安装说明
环境要求
- Python 3.8+
- Tushare Pro账号和API Token
快速开始
- 安装包
- 启动服务
- 在Claude中安装
🔑 首次配置
- 获取Token
- 访问 Tushare Token页面
- 登录获取API Token
- 配置Token
- 验证配置
📚 API参考
工具函数
- 股票查询
- 股票搜索
- 利润表查询
- Token管理
🔒 数据安全
- Token存储:用户主目录下的
.tushare_mcp/.env
- 环境变量:使用python-dotenv安全管理
- 数据传输:HTTPS加密
🤝 贡献指南
欢迎提交Issue和Pull Request!
📄 开源协议
MIT License - 详见 LICENSE 文件
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.
A server based on Model Context Protocol that enables AI assistants to query and search for stock information using the Tushare API.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with the Deriv trading API, providing access to active trading symbols and account balance information.Last updated -2Python
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI models to perform real-time internet and knowledge searches through Higress, enhancing model responses with up-to-date information from Google, Bing, Arxiv, and internal knowledge bases.Last updated -15PythonApache 2.0
- -securityAlicense-qualityMCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.Last updated -253PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to search and access information stored in Kibela, supporting note search, retrieval, creation and updating.Last updated -61079TypeScriptMIT License