MCP Server AkShare
MCP Server AkShare
一个基于 Model Context Protocol (MCP) 的 AkShare 金融数据接口服务器。
安装
方式 1: 使用 uvx (推荐)
uvx mcp-server-akshare方式 2: 使用 pip
pip install mcp-server-akshare
mcp-server-akshare方式 3: 从源码安装
git clone <repository-url>
cd mcp-server-akshare
pip install -e .Related MCP server: FinData MCP Server
MCP 客户端配置
Claude Desktop
将以下配置添加到你的 Claude Desktop 配置文件中:
{
"mcpServers": {
"akshare": {
"command": "uvx",
"args": ["mcp-server-akshare"]
}
}
}其他 MCP 客户端
{
"command": "mcp-server-akshare",
"args": [],
"timeout": 30,
"transportType": "stdio"
}可用工具
核心工具
akshare_list_functions: 列出所有可用的 AkShare 函数akshare_get_categories: 获取所有函数分类akshare_call_function: 调用任意 AkShare 函数akshare_get_function_info: 获取函数详细信息
常用函数快捷工具
akshare_stock_zh_a_hist: 获取A股历史数据akshare_stock_info_a_code_name: 获取股票基本信息akshare_macro_china_gdp: 获取GDP数据akshare_futures_main_sina: 获取期货数据akshare_bond_zh_hs_cov_daily: 获取债券数据
使用示例
获取股票历史数据
{
"tool": "akshare_stock_zh_a_hist",
"arguments": {
"symbol": "000001",
"period": "daily",
"start_date": "20240101",
"end_date": "20241231"
}
}列出股票相关函数
{
"tool": "akshare_list_functions",
"arguments": {
"category": "stock"
}
}调用任意函数
{
"tool": "akshare_call_function",
"arguments": {
"function_name": "stock_zh_a_hist",
"parameters": {
"symbol": "000001",
"period": "daily"
}
}
}支持的数据类别
stock: 股票数据
futures: 期货数据
bond: 债券数据
macro: 宏观经济数据
energy: 能源数据
crypto: 加密货币数据
forex: 外汇数据
commodity: 商品数据
real_estate: 房地产数据
news: 新闻数据
other: 其他数据
开发说明
项目结构:
akshare_mcp/
├── src/akshare_mcp/
│ ├── __init__.py
│ ├── server.py # MCP服务器主程序
│ └── wrapper.py # AkShare接口包装器
├── main.py # 启动脚本
├── requirements.txt # 依赖列表
└── README.md # 说明文档核心组件:
AkShareWrapper: 自动发现和包装AkShare函数AkShareMCPServer: MCP协议服务器实现
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Financial data MCP server for global quotes, news, financials, funds, bonds, IPOs and macro data.
China A-share market data over MCP: 22 tools for quotes, K-line, financials, money flow, top-trader boards, sectors, macro, convertible bonds and factor screening. Five tools need no API key, so you can connect and try it immediately.
Financial Datasets AI MCP — wraps financialdatasets.ai
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables querying real-time and historical financial market data for stocks, options, forex, and crypto, including quotes, trades, technical indicators, and reference data through a set of MCP tools.713MIT
- AlicenseAqualityDmaintenanceProvides professional financial data access for LLMs via MCP, supporting providers like Tushare, Wind, and DataYes.1457Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI agents and backend integrations to access A-share, US equity, ETF, index, and crypto market data, technical indicators, fundamentals, money flow, filings, and news through MCP tools and standardized APIs.-
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants and MCP-compatible clients to access real-time and historical market data across A-shares, Hong Kong, US equities, funds, futures, and options, along with technical indicators, sector analysis, screening, prompts, and resources.140 npmISC