Skip to main content

AKShare MCP Server

Project description

AKShare MCP Server

An MCP stdio server for A-share market technical analysis powered by AkShare.

Features

  • Real-time A-share quotes with multi-source fallback and in-memory cache.
  • A-share historical K-line data (daily/weekly/monthly) with local cache.
  • A-share intraday minute K-line data (1/5/15/30/60).
  • Technical indicators (Bollinger, RSI, MACD, KDJ, ADX, EMA).
  • Index analysis, index/ETF spot, sector fund flow, northbound fund flow.
  • Market calendar and market status.
  • Export to CSV/Parquet in any user-specified directory.

Install

pip install stock-trading-mcp

Run

stock-trading-mcp

Cache directory

Historical K-line data is cached to a local directory. By default the cache is created under the current working directory as .akshare_cache. You can override this by setting AKSHARE_MCP_CACHE_DIR to any path you want.

Example tool calls

Intraday minutes (with export)

{
  "tool": "stock_intraday",
  "arguments": {
    "symbol": "601138",
    "period": "15",
    "raw_only": true,
    "save_dir": "./data",
    "save_format": "csv"
  }
}

Market calendar / market status

{
  "tool": "market_calendar",
  "arguments": {
    "start_date": "20260202",
    "end_date": "20260209"
  }
}
{
  "tool": "market_status",
  "arguments": {}
}

ETF list / ETF spot

{
  "tool": "etf_list",
  "arguments": {
    "category": "ETF基金",
    "keyword": "软件",
    "limit": 20
  }
}
{
  "tool": "etf_spot",
  "arguments": {
    "keyword": "软件",
    "limit": 20
  }
}

ETF history

{
  "tool": "etf_history",
  "arguments": {
    "symbol": "159xxx",
    "period": "daily",
    "start_date": "20260202",
    "end_date": "20260209"
  }
}

Index spot

{
  "tool": "index_spot",
  "arguments": {
    "category": "沪深重要指数",
    "limit": 20
  }
}

Stock analysis (with export)

{
  "tool": "stock_analysis",
  "arguments": {
    "symbol": "601138",
    "period": "daily",
    "days": 365,
    "raw_only": false,
    "save_dir": "./data",
    "save_format": "parquet"
  }
}

Index analysis (raw only, with export)

{
  "tool": "index_analysis",
  "arguments": {
    "symbol": "000001",
    "period": "daily",
    "raw_only": true,
    "save_dir": "./data",
    "save_format": "csv"
  }
}

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

stock_trading_mcp-0.2.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

stock_trading_mcp-0.2.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file stock_trading_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: stock_trading_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for stock_trading_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5bae8b777a019e45ebb2342fe6e2b6589ce8c7dd1ca652e9d817eee3eda262b6
MD5 db41c95ef59662bec5cc349412ff4e50
BLAKE2b-256 d18c9e8353a6863d87ab7d97d0923807e3aca40c635adb5301ee98c8de9f5231

See more details on using hashes here.

File details

Details for the file stock_trading_mcp-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stock_trading_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb72b2367f4e7f3a5a32bf387afa75861d26cc26301196f4942736f32bc80dc
MD5 095e62fc10edd15be1302b71de31f309
BLAKE2b-256 badbb848d121988194e93aa71aabf008e0473450dbe64e95a20b4db12f7339f9

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