agu-mcp

agu-mcp

查询和分析A股数据的MCP服务器,支持实时行情、K线、技术指标、基本面和AI选股等功能。

Category
Visit Server

README

agu-mcp — A股行情分析 MCP Server

让 Claude 直接查询和分析 A 股数据!实时行情、K线、技术指标、基本面、AI选股,一站式搞定。

✨ 功能

工具 说明
get_realtime_quote 实时行情(价格、涨跌幅、PE/PB、市值、52周高低)
get_batch_quotes 批量行情查询
get_kline K线数据(日/周/月,支持前复权)
get_technical_indicators 技术指标(MACD/RSI/KDJ/布林带/均线系统)
search_stocks 股票搜索(代码/名称/拼音)
get_sector_performance 行业/概念板块涨跌排行
get_money_flow 资金流向(主力/散户/大单/中单/小单)
get_fundamentals 基本面数据(ROE/毛利率/负债率/营收/利润)
get_stock_news 新闻公告
ai_stock_screening 智能选股(PE、PB、技术指标、均线排列等条件)

🚀 快速开始

安装

# 克隆项目
cd agu-mcp
npm install
npm run build

配置 Claude Code

项目自带了 .mcp.json,重启 Claude Code 即可自动加载。

或者在 ~/.claude/mcp.json 中添加全局配置:

{
  "mcpServers": {
    "agu": {
      "command": "node",
      "args": ["path/to/agu-mcp/dist/index.js"]
    }
  }
}

使用示例

"查一下贵州茅台的实时行情"
"分析600519的MACD和RSI指标"
"今天哪些行业板块涨得好?"
"筛选PE在10-20之间、MACD金叉的股票"
"查看宁德时代近5日的资金流向"

🏗 技术架构

agu-mcp/
├── src/
│   ├── index.ts              # 入口 + 服务注册
│   ├── config.ts             # 配置(缓存TTL、数据源)
│   ├── tools/                # 10个MCP工具实现
│   │   ├── quote.ts          # 实时行情
│   │   ├── kline.ts          # K线数据
│   │   ├── indicators.ts     # 技术指标
│   │   ├── search.ts         # 股票搜索
│   │   ├── sector.ts         # 板块行情
│   │   ├── moneyflow.ts      # 资金流向
│   │   ├── fundamentals.ts   # 基本面
│   │   ├── news.ts           # 新闻公告
│   │   ├── screening.ts      # AI选股
│   │   └── formatters.ts     # 输出格式化
│   ├── data/
│   │   ├── eastmoney.ts      # 东方财富HTTP适配器
│   │   └── cache.ts          # 内存+SQLite缓存
│   ├── analysis/
│   │   ├── indicators.ts     # 技术指标计算引擎
│   │   └── screening.ts      # 选股筛选引擎
│   └── utils/
│       ├── stockCode.ts      # 股票代码解析
│       └── logger.ts         # 日志工具
└── dist/                     # 编译输出

📊 数据来源

  • 东方财富 HTTP API(免费,无需注册,无需API Key)
  • 腾讯行情接口(备用)
  • 所有数据均为公开行情数据

💡 注意事项

  • 数据源为东方财富公开接口,仅供个人学习研究使用
  • 高频请求可能被限流,缓存策略已内置(实时行情5秒,K线1分钟等)
  • 非交易时段返回的是最近一个交易日的数据
  • 本工具不构成任何投资建议

📜 License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured