Skip to main content

全市场金融数据 MCP Server — A股/港股/美股/期货 行情/K线/技术指标/选股/回测 基于 easy-tdx + AKShare + yfinance 三数据源

Project description

mcp-finance

MCP Server = 全市场金融数据
A股/港股/美股/期货 · 行情/K线/指标/选股/回测/分析

English · GitHub

Python MCP v0.9.0 MIT


工具列表 (29 tools)

类别 工具
行情 get_realtime_quote batch_quotes get_market_indices get_futures_list search_stock
K线 get_kline get_minute_kline
技术 get_technical_indicators plot_kline comparison_chart
财务 get_financials
市场 get_sector_ranking get_north_flow get_dragon_tiger get_block_trades get_margin_trading
资金 get_fund_flow get_institutional_holdings
宏观 get_macro_data(GDP/CPI/PMI)
研报 get_research_reports
选股 stock_screener factor_screener(五因子打分)
回测 backtest_strategy optimize_strategy portfolio_backtest
分析 analyze_stock(综合评分)compare_stocks(横向对比)correlation_matrix
系统 test_data_sources

安装配置

pip install mcp-markets

Claude Desktop / Codex:

{
  "mcpServers": {
    "mcp-finance": {
      "command": "python",
      "args": ["-m", "mcp_finance.server"]
    }
  }
}

数据源

easy-tdx(通达信毫秒级)+ AKShare + yfinance 三源兜底。


使用示例

场景 跟 AI 说
行情 "查一下茅台最新价"
K线 "画茅台最近120天K线图,带MACD"
选股 "涨超3%、量比>1.5的A股"
回测 "双均线(5,20)回测美的集团2024年"
分析 "综合分析一下茅台"
对比 "对比茅台、五粮液、泸州老窖"
组合 "茅台+美的等权组合回测"
宏观 "最近CPI数据"
研报 "茅台最新研报"

项目结构

mcp_finance/
  server.py        # MCP 路由
  api.py           # 三数据源封装
  api_extended.py  # 分钟K线/资金流/机构/宏观/研报
  analysis.py      # 综合评分/多因子/多股对比
  portfolio.py     # 组合回测/相关性
  indicators.py    # 技术指标
  backtest.py      # 回测引擎
  chart.py         # K线图/对比图
  screener.py      # 选股器
  cache.py         # 缓存
  validators.py    # 参数校验

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_markets-0.9.0.tar.gz (74.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_markets-0.9.0-py3-none-any.whl (76.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_markets-0.9.0.tar.gz.

File metadata

  • Download URL: mcp_markets-0.9.0.tar.gz
  • Upload date:
  • Size: 74.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mcp_markets-0.9.0.tar.gz
Algorithm Hash digest
SHA256 885609947451d24433054d818f6f87e30300fc4412e21812f543fc120e6e4107
MD5 6c5cda629f3a32d58bcc165ad1a295e0
BLAKE2b-256 33866cadd770317ed8618b11ae58d562d3ebc34486e12a1a971727f964407cb9

See more details on using hashes here.

File details

Details for the file mcp_markets-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_markets-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mcp_markets-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c99c6133385b975cae58929e4168e422c1db637160b4ecc0ea0b997411c8eb98
MD5 f43867dc595f6d130e64f89790d13aa4
BLAKE2b-256 286017b922c57e32ca2ec10ee8bb42b0dd675ba047b271650e1e6381bcde4ce2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page