convez.ai
MCP ServerFinanceiroAvançado
Alucardzh

TradingAgents A-Stock MCP

Alucardzh/TradingAgentsAstockMcp

Dados de ações chinesas em tempo real para agentes de IA com 18 ferramentas técnicas

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP para dados do mercado de ações chinesas (A-Stock) com 18 ferramentas cobrindo cotações K-line, indicadores técnicos, demonstrativos financeiros, notícias, fluxo de capital e mais. Suporta múltiplas fontes de dados com fallback automático, cache local e proteção contra bloqueios. Integra-se nativamente com Claude, OpenClaw e Hermes para análise quantitativa e trading automático.

Instalação

$npx convez-ai Alucardzh/TradingAgentsAstockMcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
1
Acompanhando
0
Saúde
42%
Último commit
há 4 meses
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Análise técnica e fundamentalista de ações do mercado chinês
  • Monitoramento de fluxo de capital (northbound flow, dragon-tiger board)
  • Automação de pesquisa financeira e news monitoring
  • Desenvolvimento de estratégias de trading quantitativo assistidas por IA

Veredito

Ferramenta robusta e especializada para trading quantitativo no mercado chinês, com cobertura ampla de dados e proteção contra rate-limiting. Exige conhecimento técnico e contexto específico de mercado A-Stock para máxima utilidade.

README

A tradução para o português deste README ainda está na fila.

a-stock-mcp

A-share (China mainland) stock market data MCP server for AI coding agents. Standalone, zero framework dependency.

Features

  • 18 MCP tools — from K-line data to dragon-tiger board, covering market data, fundamentals, news, capital flow, and more
  • Multi-source with auto-fallback — mootdx TCP (primary), Sina/Tencent/Eastmoney/THS/Baidu/CLS as backup
  • Anti-ban built-in — Eastmoney requests are rate-limited with configurable minimum interval + random jitter
  • Smart ticker resolution — accepts Chinese names (e.g. "贵州茅台"), codes with prefixes (SH600519), or suffixes (600519.SH)
  • Local caching — OHLCV data cached per ticker; northbound flow self-builds history via daily snapshots

Quick Start

Prerequisites

  • Python >= 3.10
  • uv package manager

Install

git clone https://github.com/Alucardzh/TradingAgentsAstockMcp.git && cd TradingAgentsAstockMcp
uv sync

Run

uv run python -m a_stock_mcp.server

Or use the registered entry point:

uv run a-stock-mcp

Register with AI Agents

Claude Code

claude mcp add a-stock-data -- uv run --project /path/to/TradingAgentsAstockMcp python -m a_stock_mcp.server

Windows users: If the above fails in CMD/PowerShell, run it from Git Bash or edit ~/.claude.json directly.

OpenClaw / Hermes

Send the following prompt to the agent:

请 git clone https://github.com/Alucardzh/TradingAgentsAstockMcp 到合适的位置,然后添加此项目的 MCP 服务。

Tools Reference (18)

Market Data

ToolDescription
resolve_tickerResolve Chinese stock name or various code formats to a normalized 6-digit code
get_stock_dataOHLCV daily K-line data (up to 800 bars)
get_indicatorsTechnical indicators: SMA, EMA, MACD, RSI, Bollinger, ATR, VWMA, MFI, etc. (14 total)

Fundamentals & Financials

ToolDescription
get_fundamentalsPE/PB/market cap/revenue/EPS + consensus EPS forecast + forward PE/PEG
get_balance_sheetBalance sheet (quarterly or annual)
get_cashflowCash flow statement (quarterly or annual)
get_income_statementIncome statement (quarterly or annual)
get_profit_forecastAnalyst consensus EPS, forward PE, PEG, PE digestion
get_insider_transactionsShareholder research / insider activity

News & Sentiment

ToolDescription
get_newsStock-specific news articles
get_global_newsChina/global financial news (CLS + Eastmoney 7x24)
get_hot_stocksLimit-up stocks with curated reason tags + theme frequency

Capital Flow

ToolDescription
get_northbound_flowNorthbound capital (沪深股通) with minute-level realtime + 20-day history
get_fund_flowMinute-level main/large/medium/small/super order net inflow
get_dragon_tiger_boardDragon-tiger board (龙虎榜) with top buyer/seller seats

Sector & Schedule

ToolDescription
get_concept_blocksIndustry (申万) / concept themes / region blocks with daily changes
get_industry_comparisonAll ~90 THS industries ranked by performance
get_lockup_expiryLockup expiry (限售解禁) schedule with upcoming calendar

Data Sources

SourceProtocolUsage
mootdx (通达信)TCPK-line data, name-code map, F10 insider data
Sina FinanceHTTPK-line fallback, financial statements
Tencent FinanceHTTPPE/PB/market cap
EastmoneyHTTPNews search, fund flow, dragon-tiger, lockup, industry ranking
TongHuaShun (同花顺)HTTPProfit forecast, hot stocks, northbound flow
CLS (财联社)HTTPReal-time financial news wire
Baidu PAEHTTPConcept/sector block membership

Configuration

Environment Variables

VariableDefaultDescription
ASTOCK_CACHE_DIR~/.astock-mcp/cacheDirectory for OHLCV CSV cache and northbound daily cache
EM_MIN_INTERVAL1.0 (seconds)Minimum interval between Eastmoney API requests. Increase to 1.5–2.0 for multi-agent batch scenarios

Development

# Install with dev dependencies
uv sync --dev

# Lint & format
uv run ruff check .
uv run ruff format .

# Type check
uv run mypy src/

# Run tests
uv run pytest

Acknowledgements

The project idea and part of the code are derived from TradingAgents-astock. If you find this project useful, please go give the original repo a star.

License

Apache License 2.0

中文文档

README_CN.md

Ver o original no GitHub

Bom para

Relacionados