Repolode
akfamily

akfamily/aktools

HTTP API and MCP server that exposes AKShare's financial data interfaces to any language or AI assistant like Claude and Cursor.

Stars
1,558
Forks
250
Open issues
0
Last commit
yesterday

Repolode describes open-source projects and does not give investment advice. Trading and investing can lose money: assess the risk yourself and follow the laws where you live before using this project.

What is it?

AKTools wraps the AKShare Python library, which provides over a thousand financial data interfaces, and serves them over HTTP. Each AKShare function is reachable at a path like /api/public/<interface name>, with query-string parameters passed straight through and JSON returned. It can also export results as CSV or Excel files.

The same service includes an MCP server, so AI assistants such as Claude Desktop, Claude Code and Cursor can search for interfaces, look up their parameters and fetch data from a natural-language request. Installation is a single pip command followed by python -m aktools, and the MCP setup can run through uvx without a separate server start.

The project adds a 60-second result cache by default, a token option for protecting the service, a Dockerfile for Gunicorn and Uvicorn deployment, and interactive API docs served by FastAPI.

Key features

  • 01Exposes every AKShare data interface as a plain HTTP GET endpoint returning JSON.
  • 02Provides an MCP server for Claude, Cursor and other MCP-compatible assistants.
  • 03Downloads results as CSV or Excel via the _format parameter.
  • 04Lists and searches interfaces and shows their parameters and defaults.
  • 05Caches identical requests for 60 seconds by default to reduce upstream load.
  • 06Supports optional access tokens, a proxy setting and a Dockerfile for deployment.

Use cases

  • Pulling A-share historical price data into a Python, R or MATLAB analysis script.
  • Letting an AI assistant answer questions about stocks or bonds by querying live data.
  • Exporting financial tables to Excel for reporting without writing scraping code.
  • Running a shared internal data service for a team with a token and Docker.

Quick start

  1. 1

    Install AKTools from PyPI

    pip install aktools
  2. 2

    Start the HTTP service

    python -m aktools
  3. 3

    Open the test URL in a browser to confirm the trade calendar data loads

Things to know

  • Data comes from public upstream websites, which can change or block access, so some interfaces may fail.
  • Requires Python 3.11 or newer (64-bit).

In collections

Topics

FAQ

What is aktools?
HTTP API and MCP server that exposes AKShare's financial data interfaces to any language or AI assistant like Claude and Cursor. AKTools wraps the AKShare Python library, which provides over a thousand financial data interfaces, and serves them over HTTP. Each AKShare function is reachable at a path like /api/public/<interface name>, with query-string parameters passed straight through and JSON returned. It can also export results as CSV or Excel files.
Is aktools free to use? What license does it have?
aktools is open source under the MIT license. Check the license terms before using it in commercial products.
Is aktools still maintained?
Actively maintained. The last commit to aktools was on Nov 6, 2026.
What can I use aktools for?
Pulling A-share historical price data into a Python, R or MATLAB analysis script. Letting an AI assistant answer questions about stocks or bonds by querying live data. Exporting financial tables to Excel for reporting without writing scraping code. Running a shared internal data service for a team with a token and Docker.
How do I install aktools?
Install AKTools from PyPI: pip install aktools Start the HTTP service: python -m aktools Open the test URL in a browser to confirm the trade calendar data loads
Where can I get aktools?
The source code and installation instructions are on GitHub: https://github.com/akfamily/aktools

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects