Trading
Provides foundational trading utilities by fetching market data through Akshare and computing technical indicators like RSI and MACD using TA-Lib. It enables users to retrieve candlestick data and technical analysis series via a standardized MCP inte
What is Trading?
Trading is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides foundational trading utilities by fetching market data through akshare and computing technical indicators like rsi and macd using ta-lib. it enables users to retrieve candlestick data and tec...
Provides foundational trading utilities by fetching market data through Akshare and computing technical indicators like RSI and MACD using TA-Lib. It enables users to retrieve candlestick data and technical analysis series via a standardized MCP inte
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Provides foundational trading utilities by fetching market d
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx tradingConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Trading
The trading-mcp server provides a comprehensive suite of market data and technical analysis tools for both A-share (Chinese) and US stock markets, built on Akshare for data retrieval and TA-Lib for indicator computation. It exposes over 20 MCP tools covering candlestick (K-line) data, RSI, MACD, moving averages, volume analysis, fund flow rankings, sector summaries, and fundamental financials for both Chinese and US equities. Developers and analysts can integrate it with Claude or Cursor to query live market data and generate technical analysis in Markdown or JSON format through natural language.
Prerequisites
- Python 3.10+ and uv package manager installed
- TA-Lib system library installed (brew install ta-lib on macOS, apt-get install libta-lib0 libta-lib0-dev on Debian/Ubuntu)
- Git to clone the repository: https://github.com/tohsaka888/trading-mcp
- An MCP-compatible client such as Claude Desktop or Cursor
Clone the repository
Clone the trading-mcp repository to your local machine.
git clone https://github.com/tohsaka888/trading-mcp.git
cd trading-mcpInstall TA-Lib system dependency
TA-Lib requires a native C library in addition to the Python wrapper. Install it for your operating system before running uv sync.
# macOS
brew install ta-lib
# Debian/Ubuntu
sudo apt-get install libta-lib0 libta-lib0-devInstall Python dependencies
Use uv to install all Python dependencies including the dev extras.
uv sync --extra devStart the MCP server
Launch the server with Python. It starts in streamable HTTP mode by default on 0.0.0.0:8000.
python main.pyConfigure Claude Desktop
Add the server to your claude_desktop_config.json. The server runs as a subprocess started by the MCP client using uv run.
{
"mcpServers": {
"trading": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/absolute/path/to/trading-mcp",
"env": {
"TRADING_MCP_ENVIRONMENT": "prod"
}
}
}
}Trading Examples
Client configuration (Claude Desktop)
Configure Claude Desktop to launch the trading-mcp server. Set the cwd to the absolute path where you cloned the repo.
{
"mcpServers": {
"trading": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/Users/yourname/trading-mcp",
"env": {
"TRADING_MCP_ENVIRONMENT": "prod",
"TRADING_MCP_DEFAULT_SYMBOL": "000001"
}
}
}
}Prompts to try
Query candlestick data, technical indicators, and fundamentals for A-share or US stocks using natural language.
- "Show me the last 30 daily candles for stock 000001 (Ping An Bank)"
- "Calculate the 14-period RSI for AAPL.US over the past month"
- "Get the MACD signal for 600519 (Moutai) on daily bars"
- "Show me the top sector fund flows for today ranked by net inflow"
- "Fetch the latest annual balance sheet for Apple (AAPL.US)"Troubleshooting Trading
TA-Lib ImportError or missing shared library at startup
The Python wrapper requires the native TA-Lib C library. Install it first (brew install ta-lib on macOS), then reinstall the Python package with uv sync. On Windows, download a pre-compiled wheel matching your Python version.
Akshare data fetch fails or returns empty results for Chinese stocks
Some Akshare endpoints are rate-limited or require requests through a mainland China IP. If you are outside mainland China, set TRADING_MCP_AKSHARE_PROXY_ENABLED=true and configure TRADING_MCP_AKSHARE_PROXY_AUTH_IP with an authorized proxy gateway.
US stock symbol not recognized
US stocks must be suffixed with .US (e.g., AAPL.US, TSLA.US). The server supports symbol auto-normalization for A-share codes (000001, 000001.SZ, 600519.SH are all accepted).
Frequently Asked Questions about Trading
What is Trading?
Trading is a Model Context Protocol (MCP) server that provides foundational trading utilities by fetching market data through akshare and computing technical indicators like rsi and macd using ta-lib. it enables users to retrieve candlestick data and technical analysis series via a standardized mcp inte It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Trading?
Follow the installation instructions on the Trading GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Trading?
Trading works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Trading free to use?
Yes, Trading is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Trading Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to Trading? 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 Trading 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 Trading?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.