Content
# Tool List
> Give Claude Code A-share data capability. Zero C dependency, pure Python + requests, dual-source fusion (Sina + East Money).
[](LICENSE)
[](https://www.python.org/)
## Why not AKShare?
AKShare is powerful but depends on numpy/pandas + cryptography (requires Rust compilation), which is difficult to install on Python 3.13. This project directly calls Sina Finance and East Money's public HTTP API, **zero C dependency, instant installation**.
## Quick Start
```bash
git clone https://github.com/YOUR_USERNAME/akshare-mcp.git
cd akshare-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install requests
```
## Configure Claude Code
```json
{
"mcpServers": {
"akshare": {
"command": "/path/to/akshare-mcp/.venv/bin/python",
"args": ["/path/to/akshare-mcp/server.py"],
"env": {
"HTTPS_PROXY": "http://127.0.0.1:7890"
}
}
}
}
```
> If the network can connect directly, remove the `env` field. If using Clash, add `DOMAIN-SUFFIX,eastmoney.com,DIRECT` rule.
## Tool List
| Category | Tool | Description |
|------|------|------|
| 🔭 Market | `market_overview` | Real-time market overview |
| 📈 Stock | `stock_spot` | Real-time stock quotes |
| | `stock_history` | Historical K-line (day/week/month) |
| | `quick_analysis` | Quick analysis of stock quotes and 30-day trend |
| 📊 ETF | `etf_spot` | Major broad-based and industry ETF quotes |
| | `etf_history` | ETF historical net value |
| 💰 Capital | `north_bound_flow` | Northbound capital daily net inflow |
| 🏭 Sector | `sector_detail` | Sector constituent stock list |
| 🐉 Dragon Tiger | `dragon_tiger` | Listed stocks and seats |
| 📰 Announcement | `stock_announcements` | Latest stock announcements |
| 📋 News | `financial_news` | Financial news (current placeholder) |
| 🎯 Sentiment | `margin_trading` | Margin trading (retail investor leverage sentiment) |
| | `market_breadth` | Market breadth and sentiment (up/down ratio/ETF sentiment) |
| | `dragon_tiger_seats` | Dragon Tiger seat details (institutional/retail investor split) |
| | `dragon_tiger_summary` | Dragon Tiger institutional and retail investor summary analysis |
| | `institution_visits` | Institutional survey records |
| | `guba_hot` | Hot posts on stock forums (retail investor discussion heat) |
## Usage Examples
```
"What's the market like today?" → market_overview
"What is the current price of Maotai?" → stock_spot 600519
"Quickly check Ningde Times for me" → quick_analysis 300750
"What ETFs are there in the Shanghai-Shenzhen 300 index?" → etf_spot Shanghai-Shenzhen 300
"What has Northbound capital been doing lately?" → north_bound_flow 10
"What stocks are in the semiconductor sector?" → sector_detail semiconductor
"Maotai's annual report" → stock_announcements 600519 keyword=annual report
"Dragon Tiger list today" → dragon_tiger
```
## Data Sources
| Data | Source | Delay |
|------|------|------|
| Real-time quotes/index/ETF | Sina Finance `hq.sinajs.cn` | ~3 seconds |
| Historical K-line | East Money `push2his.eastmoney.com` | Real-time |
| Announcements | East Money `np-anotice-stock.eastmoney.com` | Real-time |
| Sector/Dragon Tiger/Northbound | East Money `datacenter-web.eastmoney.com` | Real-time |
## Architecture
```
server.py (1165 lines of pure Python)
├── Sina API wrapper → Real-time quotes/index/ETF
├── East Money API wrapper → K-line/announcements/sector/Dragon Tiger/northbound capital
├── MCP JSON-RPC framework (handwritten, no mcp SDK dependency)
└── 17 tool registrations + routing
```
## Dependencies
- Python ≥ 3.11
- `requests` (only external dependency)
## Known Issues
- **Clash proxy**: Some rules may intercept `push2.eastmoney.com`, causing real-time quotes to be unavailable. Sina source is not affected.
- **Python 3.13**: This is the primary testing environment; 3.11/3.12 should also work normally.
- **Windows**: Need to convert `server.py` path to Windows format.
## Customization
### Add Favorite ETFs
Edit `server.py` `POPULAR_ETFS` list:
```python
POPULAR_ETFS = [
("sh510300", "SSE 300 ETF"),
("your code", "your ETF name"),
]
```
### Add Favorite Sectors
Edit `CONCEPT_BOARDS` dictionary:
```python
CONCEPT_BOARDS = {
"your sector name": "East Money sector code",
}
```
Sector codes can be found in the East Money concept sector page URL.
## Related Projects
- [East Money](https://www.eastmoney.com/) — Data source
- [Sina Finance](https://finance.sina.com.cn/) — Data source
- [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) — Protocol specification
## License
MIT