About mcp_akshare
mcp_akshare wraps AKShare data interfaces as an MCP server, making its extensive set of interfaces available as tools. Users can configure which interfaces are exposed to limit tool count and token use.
Key features
- 01Expose AKShare interfaces as MCP tools
- 02Configure which interfaces are enabled
- 03Provide a custom config file path
Use cases
- 01Querying selected AKShare data through an MCP client
- 02Reducing exposed tools for clients with tool limits
MCP support
Exposes configured AKShare data interfaces as tools for MCP clients. The README cautions that exposing all interfaces can consume many tokens and exceed some clients' tool limits.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEakshare_mcp
AKShare数据接口的MCP Server封装
项目背景
AKShare提供了上千个数据接口,但Github上提供的服务都只支持少量接口,所以本项目将所有接口都暴露出来,方便用户使用。
安装
- 在虚拟环境下执行
pip install akshare_mcp或uv pip install akshare_mcp, - 运行
python -m akshare_mcp -h检查是否安装成功,留意打印的配置文件路径
配置
{
"mcpServers": {
"akshare_mcp": {
"command": "D:\\Users\\Kan\\miniconda3\\envs\\py312\\python.exe",
"args": [
"-m",
"akshare_mcp",
"--format",
"markdown"
]
}
}
}
注意
- 1000+接口,全部暴露成工具,将会消耗大量
Token - 部分MCP客户端只支持少量的工具,例如
Trae最多支持40个工具
所以,请一定在使用前配置需要使用的接口。
- 运行
python -m akshare_mcp -h,查看配置文件的位置。例如d:\Users\Kan\miniconda3\envs\py312\Lib\site-packages\akshare_mcp\config.py - 编辑配置文件
config.py,添加需要使用的接口。接口名参考https://akshare.akfamily.xyz/data/index.html - MCP客户端刷新重连服务端
如果site-packages\akshare_mcp\config.py无权限修改,可以从github上复制config.py文件到任意路径,然后使用--config参数
python -m akshare_mcp --config D:\config.py
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.