Skip to main content

akshare_mcp

AKShare数据接口的MCP Server封装

项目背景

AKShare提供了上千个数据接口,但Github上提供的服务都只支持少量接口,所以本项目将所有接口都暴露出来,方便用户使用。

安装

  1. 在虚拟环境下执行pip install akshare_mcp或uv pip install akshare_mcp,
  2. 运行python -m akshare_mcp -h检查是否安装成功,留意打印的配置文件路径

配置

{
  "mcpServers": {
    "akshare_mcp": {
      "command": "D:\\Users\\Kan\\miniconda3\\envs\\py312\\python.exe",
      "args": [
        "-m",
        "akshare_mcp",
        "--format",
        "markdown"
      ]
    }
  }
}

注意

  1. 1000+接口,全部暴露成工具,将会消耗大量Token
  2. 部分MCP客户端只支持少量的工具,例如Trae最多支持40个工具

所以,请一定在使用前配置需要使用的接口。

  1. 运行python -m akshare_mcp -h,查看配置文件的位置。例如d:\Users\Kan\miniconda3\envs\py312\Lib\site-packages\akshare_mcp\config.py
  2. 编辑配置文件config.py,添加需要使用的接口。接口名参考https://akshare.akfamily.xyz/data/index.html
  3. MCP客户端刷新重连服务端

如果site-packages\akshare_mcp\config.py无权限修改,可以从github上复制config.py文件到任意路径,然后使用--config参数

python -m akshare_mcp --config D:\config.py

Metadata

Release files for akshare-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akshare-mcp 0.1.3
File Size Uploaded Provenance
akshare_mcp-0.1.3.tar.gz 5.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for akshare-mcp 0.1.3
File Interpreter ABI Platform
akshare_mcp-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / akshare_mcp-0.1.3.tar.gz

Download URL akshare_mcp-0.1.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
62e98187f6fa7959cbf6f985b2e628b6f92ce925b89e60ea2d8650a713b920ea
BLAKE2b-256 checksum
How to use checksums
9d8dbb82e4d27cb51514d49f2dd8fe91f6271c119a780acda5340b0cd63e72ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / akshare_mcp-0.1.3-py3-none-any.whl

Download URL akshare_mcp-0.1.3-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bd089dfaddbb3e3a3008760182bf8b2c93761bcc446fd912399f15a4bbfce66
BLAKE2b-256 checksum
How to use checksums
b8420c646d52b99f242657493defea2b5eb9fd4fd30599b3c6a8069074633b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for akshare-mcp 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page