a-stock-data-mcp

a-stock-data-mcp

MCP server adapter that exposes A-share stock data tools, prompts, and resources via FastMCP, enabling querying of stocks, K-lines, financials, sectors, and market hot spots through natural language.

Category
访问服务器

README

a-stock-data-mcp

MCP Server adapter for simonlin1212/a-stock-data.

The upstream project is kept as a pinned Git submodule under vendor/a-stock-data. This project does not rewrite upstream A-share data-fetching logic; it exposes that logic through FastMCP tools, prompts, and resources.

Install

git submodule update --init --recursive
uv sync
cp .env.example .env

Run

uv run python -m mcp_server.server

The server uses stdio. SSE and Streamable HTTP are intentionally left as future entrypoints.

Claude Desktop

{
  "mcpServers": {
    "a-stock-data": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/a-stock-data-mcp",
        "run",
        "python",
        "-m",
        "mcp_server.server"
      ]
    }
  }
}

Cursor

Add the same command to Cursor MCP settings:

{
  "mcpServers": {
    "a-stock-data": {
      "command": "uv",
      "args": ["--directory", "/path/to/a-stock-data-mcp", "run", "python", "-m", "mcp_server.server"]
    }
  }
}

VS Code

{
  "servers": {
    "a-stock-data": {
      "type": "stdio",
      "command": "uv",
      "args": ["--directory", "/path/to/a-stock-data-mcp", "run", "python", "-m", "mcp_server.server"]
    }
  }
}

Cherry Studio

Use a stdio MCP server:

  • Command: uv
  • Args: --directory /path/to/a-stock-data-mcp run python -m mcp_server.server

Tools

  • Stock: search_stock, get_stock_quote, get_stock_basic, get_stock_news, get_stock_notice, get_stock_report
  • K-line: get_daily_kline, get_weekly_kline, get_monthly_kline, get_minute_kline
  • Finance: get_finance, get_income_statement, get_balance_sheet, get_cashflow, get_eps, get_roe, get_pe, get_pb
  • Sector: get_industry, get_concept, get_industry_members, get_concept_members
  • Hot: get_hot_rank, get_limit_up_pool, get_limit_down_pool, get_broken_limit, get_hot_concepts
  • Dragon tiger: get_dragon_tiger
  • Money: get_money_flow, get_main_force, get_north_money
  • ETF: get_etf, get_etf_components
  • Index: get_index_quote, get_index_kline
  • Notice and research: get_notice, get_research_report
  • Analysis: analyze_stock, analyze_market

All tools return:

{"success": true, "data": {}}

or:

{"success": false, "error": "...", "message": "..."}

Prompts

  • analyze_stock
  • daily_market_summary
  • analyze_sector
  • today_hot_stock

Resources

  • market://calendar
  • market://industry
  • market://concept
  • market://index
  • market://exchange
  • market://etf

Configuration

.env supports:

  • LOG_LEVEL
  • REQUEST_TIMEOUT
  • ENABLE_CACHE
  • CACHE_TTL_QUOTE
  • CACHE_TTL_NEWS
  • CACHE_TTL_FINANCE
  • CACHE_TTL_SECTOR
  • USER_AGENT

Development

uv run pytest
uv run ruff check .
uv run black --check .
uv run mypy .

Notes

a-stock-data currently publishes a Markdown Skill rather than a Python package. The adapter extracts allowlisted Python definitions from SKILL.md and ignores examples/top-level calls.

mootdx is not installed by default because current mcp and mootdx releases have incompatible httpx dependency pins. Quote/news/finance/sector tools run without it; K-line tools are registered and fail with a clear dependency message until upstream publishes a compatible dependency set.

Some requested MCP tools, such as ETF components or board member lists, have no exact upstream helper today. They are registered and return structured status instead of adding new scrapers outside the adapter boundary.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选