Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Ashare Mcp

    通过 MCP (Model Context Protocol) 提供 A 股市场的行情数据查询功能。

    9 stars
    Python
    Updated Sep 29, 2025

    Table of Contents

    • 特性
    • 安装
    • 使用方法
    • 作为 MCP 服务使用
    • 作为独立服务运行
    • MCP 工具函数
    • 示例
    • 依赖
    • 贡献
    • 许可证

    Table of Contents

    • 特性
    • 安装
    • 使用方法
    • 作为 MCP 服务使用
    • 作为独立服务运行
    • MCP 工具函数
    • 示例
    • 依赖
    • 贡献
    • 许可证

    Documentation

    Ashare-MCP

    Ashare-MCP 是一个基于 mpquant/Ashare 的股票行情数据服务,通过 MCP (Model Context Protocol) 提供 A 股市场的行情数据查询功能。

    特性

    • 支持多种周期的行情数据:分钟线(1m, 5m, 15m, 30m, 60m)、日线(1d)、周线(1w)、月线(1M)
    • 支持多种股票代码格式:通达信格式(sh000001)、聚宽格式(000001.XSHG)
    • 双核心数据源:新浪财经和腾讯财经,提高数据获取的稳定性
    • 异步处理,提高性能
    • 简单易用的 API 接口

    安装

    bash
    # 通过 GitHub 安装
    pip install git+https://github.com/RusianHu/Ashare-mcp.git
    
    # 如果需要使用代理
    pip install git+https://github.com/RusianHu/Ashare-mcp.git --proxy socks5://127.0.0.1:10808
    
    # 通过本地安装(开发模式)
    git clone https://github.com/RusianHu/Ashare-mcp.git
    cd Ashare-mcp
    pip install -e .

    使用方法

    作为 MCP 服务使用

    在 MCP 配置文件中添加服务配置:

    json
    {
      "mcpServers": {
        "ashare-mcp": {
          "command": "python",
          "args": [
            "-m",
            "ashare_mcp"
          ],
          "alwaysAllow": [
            "get_price"
          ],
          "disabled": false
        }
      }
    }

    作为独立服务运行

    bash
    # 使用标准输入输出模式
    ashare-mcp
    
    # 使用 HTTP 模式
    fastmcp serve ashare_mcp

    MCP 工具函数

    get_price - 获取股票行情数据

    获取股票行情数据,支持分钟线、日线、周线、月线。

    参数说明类型默认值
    code证券代码,如'sh000001'或'000001.XSHG'string-
    end_date结束日期,格式为'YYYY-MM-DD'string当前日期
    count获取的K线数量integer10
    frequencyK线周期,可选值:'1m', '5m', '15m', '30m', '60m', '1d', '1w', '1M'string'1d'
    fields返回字段列表array全部

    返回值: 包含股票代码、行情数据和处理消息的对象。

    示例

    代码示例

    python
    # 获取上证指数最近5天的日线数据
    result = await get_price_ashare_mcp(code="sh000001", count=5, frequency="1d")
    
    # 获取贵州茅台指定日期的历史数据
    result = await get_price_ashare_mcp(code="sh600519", end_date="2023-01-01", count=10, frequency="1d")
    
    # 获取分钟线数据
    result = await get_price_ashare_mcp(code="sh600519", count=5, frequency="15m")

    依赖

    • fastmcp>=0.1.0
    • pandas
    • requests

    贡献

    欢迎提交 Issues 和 Pull Requests 来帮助改进这个项目!

    许可证

    MIT

    Copyright © 2025 RusianHu

    Similar MCP

    Based on tags & features

    • ES

      Esp Rainmaker Mcp

      Python·
      9
    • PE

      Personalizationmcp

      Python·
      12
    • FA

      Fal Mcp Server

      Python·
      8
    • GG

      Gget Mcp

      Python·
      17

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • ES

      Esp Rainmaker Mcp

      Python·
      9
    • PE

      Personalizationmcp

      Python·
      12
    • FA

      Fal Mcp Server

      Python·
      8
    • GG

      Gget Mcp

      Python·
      17

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k