Skip to main content

AKShare MCP Server

Project description

akshare_mcp

AKShare数据接口的MCP Server封装

项目背景

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

安装

  1. 在虚拟环境下执行pip install akshare_mcpuv 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akshare_mcp-0.1.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akshare_mcp-0.1.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file akshare_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: akshare_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for akshare_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 62e98187f6fa7959cbf6f985b2e628b6f92ce925b89e60ea2d8650a713b920ea
MD5 c0e77222c0aa1ac158842b5f6c15a228
BLAKE2b-256 9d8dbb82e4d27cb51514d49f2dd8fe91f6271c119a780acda5340b0cd63e72ef

See more details on using hashes here.

File details

Details for the file akshare_mcp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: akshare_mcp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for akshare_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1bd089dfaddbb3e3a3008760182bf8b2c93761bcc446fd912399f15a4bbfce66
MD5 934f16bec2a4c625cb27f28e66bb9e01
BLAKE2b-256 b8420c646d52b99f242657493defea2b5eb9fd4fd30599b3c6a8069074633b99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page