AKQuant MCP

The local AKQuant MCP server: an agent looks up the API, checks a strategy file and backtests it on history, with no trading.

  • 2,591 ★ on the repository
  • Last commit
MCP serverOfficial

Extended access

Why this level

  • Runs a strategy file as ordinary Python code with no sandbox and with the user's rights.
All reasons and checks

akfamily/akquant

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/akquant

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Runs a strategy file as ordinary Python code with no sandbox and with the user's rights.

This is third-party code. Review the repository files before installing.

What it does

AKQuant is a research and backtesting framework for trading strategies built on Rust and Python. Its MCP server runs locally over stdio and gives the assistant six tools. `search_api` and `get_api` look up signatures in the installed version, `get_guide` returns strategy-writing notes, `check_strategy` statically checks a file without running it, `prepare_data` prepares data from CSV, Parquet, AKShare or synthetic series, `run_backtest` runs a test in a subprocess, and `get_run_details` pages through trades, orders, the equity curve and logs. The server starts through `uvx`, so AKQuant does not need to be installed beforehand. The project directory is set with `--root`, and results land in `.akquant-mcp` inside it. Together with the AKShare MCP the assistant goes from data to report on its own.

Who it is for. Researchers and students who test ideas on Chinese market daily bars and want an agent to write and debug strategies against the AKQuant API.

Good fit when

  • An agent writes a moving-average crossover for stock 000001 and reports return and maximum drawdown.
  • A strategy file is checked for method-name typos before it runs.
  • After the entry condition is edited, the test is rerun and compared with the previous run.
  • Trades 10 through 20 of a backtest are pulled out for review.

Not a fit when

  • You need trading on a live account: the server only computes backtests.
  • Strategies are written as plain functions: the first version accepts only `Strategy` subclasses.
  • You need parameter optimization or a chart report: the server does not have them.

Example request

Take three years of daily prices for 000001, run a 5 and 20 day crossover strategy and show return, drawdown and trade count.

MCP

Transport
stdio
Authentication
not required

Environment variables

UV_INDEX_URL
A PyPI mirror for a faster first download, for example in mainland China.
AKQUANT_MCP_HOME
Directory for the data cache and results, defaults to `.akquant-mcp` in the project root.

Limitations

There is no sandbox: `run_backtest` executes the strategy file in a subprocess with the same rights as `python strategy.py`, so run third-party code only after reading it. By default a test runs with no commission and no T+1 rule, so pass a `broker_profile` such as `cn_stock_t1_low_fee` to account for them. Transport is stdio only. The first `uvx` start downloads dependencies and may exceed a client timeout. Test results are not investment advice.

How to disable. Remove the akquant entry from the client MCP configuration. Clear the `.akquant-mcp` directory in the project root by hand, and add it to `.gitignore`.

FAQ

How do I connect AKQuant to Claude Code?

Run `claude mcp add akquant -- uvx --from "akquant[mcp]" akquant-mcp --root /path/to/akquant-demo`, replacing the path with your directory. For Cursor and Claude Desktop the same arguments go into `mcpServers`.

Can the server trade on an exchange?

No. The six tools cover API lookup, file checking, data preparation and backtesting. The server sends no orders to an account.

What if the server is slow to start?

The first start downloads AKQuant and AKShare. Run `uvx --from "akquant[mcp]" akquant-mcp --help` in a terminal once and restart the assistant.

Where does the data come from?

From local CSV and Parquet files, from AKShare (A-share daily bars) or from a synthetic generator. The `prepare_data` tool takes a source specification.

How do I use it with AKTools?

AKTools is the official AKShare MCP server. Connect both servers and the assistant fetches data, writes a strategy and runs the backtest itself. For assistants that can edit their own configuration the sentence "Install the official MCP servers of AKShare and AKQuant" is enough.

Discussion

No questions or reviews yet.

MCP server for backtesting trading strategies: the agent fetches quotes, runs a test from YAML and reads the metrics on the Backtrader engine

MCP serverExtended access1.1KRepository stars

An akshare-based MCP server with quotes, indicators and news for China, Hong Kong and US stocks, plus cryptocurrency data

MCP serverExtended access391Repository stars

MCP server and HTTP API on AKShare: the agent finds Chinese market data interfaces, reads their parameters and fetches tables

MCP serverExtended access1.6KRepository stars

An MCP server for market data and technical analysis: quotes, indicators, screeners and backtesting for stocks, crypto, forex and futures

MCP serverExtended access5.3KRepository stars

MCP server for Chinese stock market data on akshare-one: quotes, news, financial statements and insider trades

MCP serverMinimal access247Repository stars

Skill for the QMT terminal: turns a strategy description or research PDF into a daily factor backtest script

SkillExtended access170Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
AKQuant (this card)yesnot required2,591
PlainBacktestno529turns a plain-language idea into rules; AKQuant writes and checks code for its own Rust engine and AKShare
QuantGPT: alpha factor research for China A-sharesnonot required509invents alpha factors on Chinese stocks; AKQuant gives code checks and a backtest for a finished strategy

README in short

The server ships inside the akquant package and is published in the official MCP registry. Its documentation is written in Chinese and English.

README badge

Report a problem