Content
🔧 Troubleshooting
<details>
<summary><strong> to do if it doesn't work after configuration?</strong></1. **Ensure Node.js is installed** (version >=)
```bash
v # Check version ```
2. **For Windows users**: Use `n instead of `npx`
```json
command": "npx.cmd",
"args-y", "finance-mcp"]
}
```
Recommended: Install globally and use**
```bash
-g finance-mcp
```
Then configure": "finance-mcp"`
4. **Check if TUSHARE_TOKEN is correctly filled**
5. **Restart Claude Desktop** or MCP client
6. **Check logs**:
- Windows:PDATA%\Claude\logs`
- macOS:Library/Logs/Claude`
</details>
#### Alternative Mode (Cloud Deployment or Remote Access Needed)
**Step HTTP Server**
```# Method 1:px
npx -y finance-mcp-http
# Method: Start after global installation
npm install -g finance-mfinance-mcp-http
# Method 3: Local development
npm run start:http
```
**Step 2: Configure Claude Desktop**
```{
"mcpServers": {
"finance-http": {
"type": "streamableHttp",
"url": "http://localhost:3000/mcp",
" 600,
"headers": {
"Xare-Token": "your_tushare_token_here"
}
}
}
```
**Advantages of HTTP Mode ✅ Supports remote access
- ✅ Supports multiple clients connected simultaneously
- ✅ Complete HTTP logs (refer to [LOGGING_GUIDE.md](./LOGGING_GUIDE.md))
- ✅ Easy to deploy on cloud platforms like Smithery
#### Ways to Pass Token
- **stdio mode**: Through `env.TUSHARE_TOKEN` environment variable
- **HTTP mode**:
- Prioritize reading from `X-Tushare-Token` Header - Or use `Authorization <token>`
- OrX-Api-Key`
- Finally, fallback to environment variable `TUSHARE_TOKEN`
(Cryptocurrency market default uses Binance public market interface, no cryptocurrency required)
> 📖 Documentation**: For more deployment, refer to [DEPLOYMENT_MODES.md](./DEPLOYMENT_MODES.md)
### Verify Installation
After configuration, restart Claude desktop and ask: "Get current time". If time information is returned, installation is successful.
</details>
## 🆕 Latest Updates
### 💰 Version 4.7.0 - Sector Fund Flow Function
**Latest Update**: The fund flow tool has been upgraded, adding Dongfang Fortune sector fund flow functionality!
<details>
<summary><strong>🎯 New Features in v4.7.0</strong></summary>
- **📊 Sector Fund Flow**: Supports querying Dongfang Fortune (DC) industry, concept, and regional sector fund flows
- **🎲 Intelligent Identification**: Automatically identifies query types (individual stocks/index/market sectors), codes starting with BK are automatically identified as sectors
- **📈 Multi-dimensional Analysis**: Sector gains and losses, fund inflow rankings, super large orders/large orders/medium orders/small orders details
- **🔍 Flexible Query**: Supports querying by sector code, trading date, and sector type (industry/concept/region)
- **📋 Complete Display**: Sector basic information, statistical summary, detailed table, fund flow trend
**Usage Example**:
```javascript
// Query specific sector fund flow
{
"ts_code": "BK0447", // Dongcai sector code
"start_date": "20240901",
"end_date": "20240930"
}
// Query all industry sector fund flows on a certain day
{
"query_type": "sector",
"trade_date": "20240927",
"content_type": "industry",
"start_date": "20240927",
"end_date": "20240927"
}
```
**API Integration**: Based on [Tushare Dongcai Sector Fund Flow API](https://tushare.pro/document/2?doc_id=344) (`moneyflow_ind_dc`)
</details>
### 🚀 Version 4.3.0 - Cryptocurrency Minute Line and Binance Optimization
**Major Update**: Released v4.3.0, `stock_data_minutes` adds `market_type` parameter, supports cryptocurrency market (Binance) minute-level K-line; also optimizes cryptocurrency daily line.
<details>
<summary><strong>🎯 New Features in v4.3.0</strong></summary>
- **⏱ Enhanced Minute K-line**: `stock_data_minutes` adds `market_type` (`cn`/`crypto`), supports Binance minute line
- **🪙 Cryptocurrency Minute Line**: Compatible with `BTCUSDT`/`BTC-USDT`/`BTC/USDT`/`coinid.USDT`; frequency mapping `1MIN/5MIN/15MIN/30MIN/60MIN → 1m/5m/15m/30m/1h`
- **📦 Automatic Pagination**: Binance's maximum of 1000 K-lines per request, automatically paginates until the complete interval is covered
- **🧭 Intelligent Data Extension (Daily Line)**: Automatically extends the start date when requesting technical indicators to ensure a sufficient calculation window
- **🧩 Friendly Error Prompt**: Invalid trading pairs return 400, clearly prompting "The currency pair does not exist on Binance or has been delisted"
- **📈 A-Share Forward Adjustment (Daily Line)**: Automatically applies forward adjustment (based on the latest trading day factor)
Other capabilities remain unchanged: Web online experience, NPM package, Streamable HTTP, stable session management, etc.
**Migration Guide**: After upgrading to v4.3.0, minute line adds required `market_type`: A-share pass `cn`, cryptocurrency pass `crypto`.
</details>
### 🧱 CSI Index Component Summary Tool Enhanced (NEW!)
- Index interval market + component stock weight and interval gain/loss
- Added valuation/financial indicators: PE(TTM), PB, dividend yield, ROE, ROA, net profit margin, operating cash flow per share, asset-liability ratio, revenue growth rate, asset turnover rate, gross margin, three expense ratio, cash dividend ratio
- Supports `.SH/.SZ` form of CSI index codes (e.g., `399975.SZ`), automatically fallback to find the latest weight day and valuation day
### 🇺🇸 US Stock Financial Analysis Module (NEW!)
**Latest Addition**: We've added a complete US stock financial analysis feature!
<details>
<summary><strong>📊 New Features</strong></summary>
- **🇺🇸 company_performance_us** - Professional US stock financial analysis tool
- **📈 Profit Statement Analysis** - Revenue, gross margin, net profit, earnings per share analysis
- **💰 Balance Sheet Analysis** - Assets, liabilities, shareholder equity structure, and financial ratios
- **💸 Cash Flow Statement Analysis** - Operating, investing, financing cash flows, and free cash flow
- **📊 Comprehensive Financial Indicators** - ROE, ROA, profitability, growth, debt-paying ability, etc.
- **🎯 Intelligent Data Processing** - Multi-period comparison analysis, trend calculation, key indicator extraction
- **🌟 Chinese and English Compatibility** - Supports intelligent recognition of Chinese and English financial subjects
**Supported Companies**: Covers major US stocks and Chinese concept stocks, including NVIDIA (NVDA), Apple (AAPL), Tesla (TSLA), Microsoft (MSFT), etc.
**API Integration**: Based on [Tushare US Stock Financial Data API](https://tushare.pro/document/2?doc_id=394), complete integration of 4 data interfaces.
</details>
### 🏛️ Hong Kong Stock Financial Analysis Module
**Added**: We've added a comprehensive Hong Kong stock financial analysis feature!
<details>
<summary><strong>📊 Features</strong></summary>
- **🏛️ company_performance_hk** - Specialized Hong Kong stock financial analysis tool
- **📈 Profit Statement Analysis** - Revenue, profit margin, earnings per share, comprehensive income analysis
- **💰 Balance Sheet Analysis** - Assets, liabilities, equity structure, and key financial ratios
- **💸 Cash Flow Statement Analysis** - Operating, investing, financing activities, and free cash flow calculation
- **🎯 Intelligent Data Processing** - Automatic financial ratio calculation and multi-period comparison analysis
- **🌟 Enhanced User Experience** - Structured tables, intelligent classification, trend analysis
**Supported Companies**: All Hong Kong Exchange-listed companies, including Tencent (00700.HK), Alibaba (09988.HK), Bank of Construction (00939.HK), etc.
**API Integration**: Based on [Tushare Hong Kong Stock Financial Data API](https://tushare.pro/document/2?doc_id=389), complete data format optimization.
</details>
## ⏱ Minute K-line Tool
`stock_data_minutes`: A-share (Tushare) and cryptocurrency (Binance) minute-level K-line.
- Frequency: `1MIN/5MIN/15MIN/30MIN/60MIN` (case-insensitive)
- Parameters:
- `market_type`: `cn` | `crypto`
- `code`: A-share e.g., `600519.SH`; cryptocurrency e.g., `BTCUSDT`/`BTC-USDT`/`BTC/USDT`/`bitcoin.USDT`
- `start_datetime`: `YYYYMMDDHHmmss` or `YYYY-MM-DD HH:mm:ss`
- `end_datetime`: Same as above
- `freq`: e.g., `1MIN`
- Returns: Reverse chronological order table (time/open/high/low/close/volume; A-share includes turnover (10,000 yuan))
Example (A-share):
```
name: stock_data_minutes
arguments:
market_type: cn
code: 600519.SH
start_datetime: 2024-09-01 09:30:00
end_datetime: 2024-09-01 10:30:00
freq: 1MIN
```
Example (cryptocurrency):
```
name: stock_data_minutes
arguments:
market_type: crypto
code: BTCUSDT
start_datetime: 2025-09-01 00:00:00
end_datetime: 2025-09-01 12:00:00
freq: 15MIN
```
## 📄 License
This project is licensed under the MIT License. See [LICENSE](LICENSE) file.
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
git
A Model Context Protocol server for Git automation and interaction.
everything
Model Context Protocol Servers
chrome-devtools-mcp
Chrome DevTools for coding agents
claude-plugins-official
A directory of trusted plugins for Claude Code, including internal and...
python-sdk
The official Python SDK for Model Context Protocol servers and clients