Complete MCP server for akshare - 100% API coverage
akshare-mcp is a Model Context Protocol (MCP) server that provides complete access to all akshare APIs. Unlike other solutions that manually define a handful of tools, this project dynamically generates MCP tools from all 995+ akshare functions.
- 100% API Coverage - All akshare functions become MCP tools automatically
- Dynamic Generation - No manual maintenance needed when akshare updates
- Smart Parameter Handling - Automatically extracts types, defaults, and documentation
- Built-in Discovery - Search and browse all available APIs
# Local development (from project directory)
uvx --from .
# Or install and run
uv venv .venv
source .venv/bin/activate
uv pip install -e .
akshare-mcppip install akshare-mcpNote: Docker image will be published after GitHub Actions is set up.
# Build locally
docker build -t akshare-mcp .
# Or pull from GitHub Container Registry (after CI is configured)
docker run -d -p 8000:8000 \
--name akshare-mcp \
ghcr.io/norci/akshare-mcp:latestakshare-mcp
# Or specify port
akshare-mcp --port 9000Add to claude_desktop_config.json:
{
"mcpServers": {
"akshare-mcp": {
"command": "path/to/.venv/bin/python",
"args": ["-m", "akshare_mcp"]
}
}
}Add to your OpenClaw agent skill:
mcp:
command: akshare-mcp
port: 8000| Tool | Description |
|---|---|
list_akshare_apis |
List all available APIs with optional category filter |
get_api_info |
Get detailed info about a specific API |
search_apis |
Search APIs by keyword |
get_time_info |
Get current time and trading calendar |
All 995+ akshare functions are automatically available as tools:
- Stock data (A-share, H-share, US, etc.)
- Fund data (ETF, mutual funds, etc.)
- Futures and options
- Bond data
- Economic data (GDP, CPI, PMI, etc.)
- Currency and forex
- And much more...
list_akshare_apis(category="stock", limit=20)
stock_zh_a_hist(symbol="000001", start_date="20250101", end_date="20251231", adjust="qfq")
search_apis(keyword="etf")
get_api_info(api_name="stock_zh_a_hist")
┌─────────────┐ ┌─────────────┐ ┌──────────┐
│ Client │────▶│ akshare-mcp│────▶│ akshare │
│ (MCP SDK) │ │ (Dynamic) │ │ (995+ APIs)
└─────────────┘ └─────────────┘ └──────────┘
Existing akshare MCP servers only expose a handful of manually-defined tools (typically 5-10). This project solves that by:
- Introspecting akshare at runtime using
inspectmodule - Extracting signatures including types, defaults, and docs
- Generating tools dynamically for each function
- Caching results for performance
MIT License - See LICENSE for details.
This project is for educational purposes. Financial data is provided by third-party sources and may have delays or inaccuracies. Use at your own risk.