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状态检查
🎯 使用场景
投资研究
"帮我查找所有新能源相关的股票" "查询比亚迪的基本信息" "获取平安银行2023年的利润表"财务分析
"查看腾讯控股最新一期合并报表" "对比阿里巴巴近三年的利润变化" "分析小米集团的季度利润趋势"行业分析
"列出所有医药行业的股票" "查找深圳地区的科技公司"报表查询
"查询平安银行2023年第一季度的利润表" "获取比亚迪的母公司报表" "查看茅台近5年的年度利润表"
🛠️ 技术特点
基于MCP协议,支持与Claude等AI助手自然对话
实时连接Tushare Pro数据源
智能错误处理和提示
支持并发请求处理
数据缓存优化
📦 安装说明
环境要求
Python 3.8+
Tushare Pro账号和API Token
快速开始
安装包
启动服务
在Claude中安装
🔑 首次配置
获取Token
登录获取API Token
配置Token
对Claude说:请帮我配置Tushare token验证配置
对Claude说:请检查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
- AsecurityAlicenseAqualityMCP 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 -11543MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server providing tools for querying A-share stock market data, including historical prices, financial reports, market indices, and macroeconomic indicators.Last updated -27429MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides intelligent stock data assistance through Tushare's financial data API, enabling users to query comprehensive stock information, financial data, and market indices through natural language.Last updated -15MIT License
OpenTofu MCP Serverofficial
AsecurityFlicenseAqualityA Model Context Protocol server that allows AI assistants to search for and retrieve information about OpenTofu providers, modules, resources, and data sources from the OpenTofu Registry.Last updated -52860