- Explore MCP Servers
- stock-mcp
Stock Mcp
What is Stock Mcp
stock-mcp is a stock management and analysis tool based on the open-source library akshare, designed to facilitate stock and fund analysis using large language models (LLMs).
Use cases
Use cases for stock-mcp include developing trading algorithms, creating financial dashboards, conducting market research, and providing insights for investment decisions.
How to use
To use stock-mcp, clone the repository from GitHub, navigate to the stock-mcp directory, and run the server using the command ‘uv async’. Configure the MCP by adding the appropriate settings in your client configuration.
Key features
Key features of stock-mcp include integration with akshare for stock data retrieval, tools for analyzing stocks and funds, and support for LLMs to enhance data interpretation.
Where to use
stock-mcp can be used in finance and investment sectors, particularly in applications requiring stock market analysis, fund performance evaluation, and automated trading strategies.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Stock Mcp
stock-mcp is a stock management and analysis tool based on the open-source library akshare, designed to facilitate stock and fund analysis using large language models (LLMs).
Use cases
Use cases for stock-mcp include developing trading algorithms, creating financial dashboards, conducting market research, and providing insights for investment decisions.
How to use
To use stock-mcp, clone the repository from GitHub, navigate to the stock-mcp directory, and run the server using the command ‘uv async’. Configure the MCP by adding the appropriate settings in your client configuration.
Key features
Key features of stock-mcp include integration with akshare for stock data retrieval, tools for analyzing stocks and funds, and support for LLMs to enhance data interpretation.
Where to use
stock-mcp can be used in finance and investment sectors, particularly in applications requiring stock market analysis, fund performance evaluation, and automated trading strategies.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Stock MCP 文档
基于开源akshare的股票和基金数据分析MCP服务器,为LLM提供丰富的金融数据分析工具。
功能概述
- 股票数据:获取个股历史行情、PE/PB估值数据
- 基金数据:查询基金净值、申购状态、持仓信息
- 市场指标:获取指数估值、基金仓位数据
- 新闻数据:个股新闻、新闻联播文字稿
工具目录
股票数据工具
get_single_stock_info: 获取个股历史数据(含PE/ROE)get_stock_indicator: 获取指数成分股估值数据get_stock_pe: 获取市场PE历史数据get_stock_pb: 获取市场PB历史数据
基金数据工具
fund_purchase_em: 查询基金申购状态fund_info_index_em: 获取指数基金信息fund_portfolio_hold_em: 查询基金持仓fund_etf_spot_em: 获取ETF实时行情
其他工具
stock_news_em: 获取个股新闻news_cctv: 获取新闻联播文字稿
详细使用说明
股票数据示例
# 获取贵州茅台历史数据
result = await get_single_stock_info(
stock_code="600519",
start_date="20240101",
end_date="20240430",
condition="pe < 40 AND roe > 20"
)
参数说明:
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| stock_code | str | 是 | 股票代码,如"600519" |
| start_date | str | 是 | 开始日期,格式"yyyyMMdd" |
| end_date | str | 是 | 结束日期,格式"yyyyMMdd" |
| condition | str | 否 | 筛选条件,如"pe < 20" |
基金数据示例
# 查询沪深300指数基金
result = await fund_info_index_em(
symbol="沪深指数",
indicator="被动指数型",
condition="近3年 > 10 AND 手续费 < 1.2"
)
最佳实践
- 日期格式统一使用"yyyyMMdd"
- 条件筛选支持复杂逻辑组合
- 大数据量查询建议分时间段获取
- 实时数据注意市场交易时间
安装配置
git clone [email protected]:shuoyueqishi/stock-mcp.git cd stock-mcp uv async
配置Cline MCP:
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










