AKShare
A financial data server that provides real-time and historical data for A-shares, Hong Kong, and US markets using the AkShare library. It enables users to query market quotes, fundamental information, and technical indicators through the Model Contex
What is AKShare?
AKShare is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to financial data server that provides real-time and historical data for a-shares, hong kong, and us markets using the akshare library. it enables users to query market quotes, fundamental information, a...
A financial data server that provides real-time and historical data for A-shares, Hong Kong, and US markets using the AkShare library. It enables users to query market quotes, fundamental information, and technical indicators through the Model Contex
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A financial data server that provides real-time and historic
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx akshare-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use AKShare
AKShare MCP Server wraps the AKShare Python financial data library in an MCP interface, letting AI assistants query real-time and historical market data for Chinese A-shares, Hong Kong stocks, and US equities through natural conversation. It exposes tools for stock quotes, fund data, bond prices, futures, forex rates, and macroeconomic indicators — all sourced from AKShare's broad data aggregation layer. Analysts and developers use it to pull market data directly into Claude or other MCP clients without writing Python queries manually.
Prerequisites
- Python 3.10 or higher
- uv package manager (recommended) or pip
- Git to clone the repository
- An MCP-compatible client such as Claude Desktop or Cursor
- An AKShare API key if your chosen data sources require authentication (most public endpoints do not)
Clone the repository
Clone the AKShare MCP server repository from GitHub to your local machine.
git clone https://github.com/ttjslbz001/akshare_mcp_server.git
cd akshare_mcp_serverCreate a virtual environment
Create and activate a Python virtual environment to isolate dependencies.
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activateInstall dependencies with uv
Install the package and its dependencies. Using uv is recommended for faster installs; pip works equally well.
uv pip install -e .
# or with pip:
pip install -e .Verify the server starts
Run the server directly to confirm the installation is correct before wiring it into your MCP client.
python run_server.pyConfigure your MCP client
Add the server to your MCP client's configuration file. Replace /path/to/akshare_mcp_server with the absolute path where you cloned the repository. The AKSHARE_API_KEY env var is only needed for data sources that require authentication.
{
"mcpServers": {
"akshare-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/akshare_mcp_server",
"run",
"akshare-mcp"
],
"env": {
"AKSHARE_API_KEY": "<your_api_key_if_needed>"
}
}
}
}Restart Claude Desktop and verify connection
Restart your MCP client after saving the configuration. The AKShare tools (stock queries, fund queries, bond queries, etc.) should appear in the available tool list.
AKShare Examples
Client configuration (Claude Desktop)
Full claude_desktop_config.json entry for AKShare MCP server using uv to run from a cloned directory.
{
"mcpServers": {
"akshare-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/yourname/akshare_mcp_server",
"run",
"akshare-mcp"
],
"env": {
"AKSHARE_API_KEY": ""
}
}
}
}Prompts to try
These prompts exercise the main data categories the server supports — stock quotes, fund data, futures, forex, and macroeconomic indicators.
- "Get the latest stock quote for Kweichow Moutai (600519)"
- "Show me the historical daily prices for the Shanghai Composite Index for the past 30 days"
- "What are the top 10 performing mutual funds this month?"
- "Fetch current USD/CNY forex rate"
- "Give me recent macroeconomic data for China's CPI"Troubleshooting AKShare
Server fails to start with ModuleNotFoundError for akshare
Make sure you activated the virtual environment before running the server, and that 'uv pip install -e .' or 'pip install -e .' completed without errors. Run 'pip show akshare' to confirm the package is installed.
Data queries return empty results or timeout
AKShare fetches data from public Chinese financial data sources that can be rate-limited or temporarily unavailable. Try a different data source function, or add a small delay between rapid queries. Some premium data sources require a valid AKSHARE_API_KEY.
Claude Desktop does not see the server tools
Verify the absolute path in 'args' matches where you cloned the repo. On macOS, uv must be on the system PATH or specified as an absolute path (e.g. /Users/yourname/.local/bin/uv). Check Claude Desktop logs in ~/Library/Logs/Claude for connection errors.
Frequently Asked Questions about AKShare
What is AKShare?
AKShare is a Model Context Protocol (MCP) server that financial data server that provides real-time and historical data for a-shares, hong kong, and us markets using the akshare library. it enables users to query market quotes, fundamental information, and technical indicators through the model contex It connects AI assistants to external tools and data sources through a standardized interface.
How do I install AKShare?
Follow the installation instructions on the AKShare GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with AKShare?
AKShare works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is AKShare free to use?
Yes, AKShare is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
AKShare Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to AKShare? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up AKShare in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use AKShare?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.