eastmoney-skills2mcp

eastmoney-skills2mcp

Provides 11 MCP tools for querying A-share market data, financial reports, stock screening, hot topics, self-selected stocks, and LOF arbitrage using natural language, powered by East Money / Miaoxiang APIs.

Category
Visit Server

README

EastMoney Skills → MCP

基于 Model Context Protocol 的东方财富金融数据工具集,把东方财富 / 妙想的金融能力封装为 11 个 MCP Tool,可直接接入 Claude Code、Cursor 等 AI 客户端,用自然语言查询 A 股行情、财报、选股、热点、自选股、LOF 套利等。

功能(11 个 Tool)

Tool 说明 依赖
diagnose_stock 综合诊股:评分、五维图、估值状态、公司概况 公开接口
financial_data 财务数据:主要指标 / 利润表 / 现金流量表 公开接口
screen_stocks 智能选股:ROE、净利润增长、营收增长、股息率、市值等多条件筛选 公开接口
hotspot_discovery 热点发现:行业 / 概念 / 地域板块排行 公开接口
earnings_review 业绩点评:盈利预测 + 机构评级 公开接口
finance_news_search 金融资讯搜索:自然语言查询公告 / 研报 / 新闻 妙想 API Key
mx_data_query 妙想金融数据查询:自然语言查行情 / 财务 / 估值等 妙想 API Key
mx_stock_screen 妙想智能选股:自然语言描述条件选股 妙想 API Key
mx_self_select_query 查询我的自选股列表 妙想 API Key
mx_self_select_manage 管理自选股(自然语言添加 / 删除) 妙想 API Key
lof_arbitrage_report LOF 基金套利日报:场内外溢 / 折价率排行 公开接口

标注 妙想 API Key 的工具需配置环境变量 MX_APIKEY(见下)。

获取妙想 API Key

妙想官方申请入口:https://marketing.dfcfs.com/views/finskillshub/indexZfdcxNpu?appfenxiang=1

申请后将获得的 Key 配置到环境变量 MX_APIKEY

快速开始

# 安装依赖
npm install

# 编译
npm run build

# 配置环境变量
cp .env.example .env
# 编辑 .env 填入 MX_APIKEY、AUTH_TOKEN 等

# 启动服务
npm start

服务默认监听 http://0.0.0.0:9000/mcp

配置

通过 .env 文件或环境变量配置:

变量 默认值 说明
PORT 9000 服务端口
AUTH_TOKEN (空) Bearer token 认证密钥,留空则不启用认证
MX_APIKEY (空) 东方财富妙想 API Key,妙想系列工具必需
ALLOWED_HOSTS localhost,127.0.0.1,::1 允许访问的 Host(逗号分隔),公网 / 域名部署时按需添加

.env 示例:

PORT=9000
AUTH_TOKEN=your-secret-token
MX_APIKEY=your-miaoxiang-api-key

接入 Claude Code

方式一:stdio 模式(推荐,一行命令添加)

无需单独启动服务,Claude Code 会自动拉起进程:

claude mcp add miaoxiang -- node /path/to/eastmoney-skills2mcp/dist/index.js --stdio

-s user 全局生效(所有项目可用):

claude mcp add -s user miaoxiang \
  --env MX_APIKEY=your-key \
  --env AUTH_TOKEN=your-token \
  -- node /path/to/eastmoney-skills2mcp/dist/index.js --stdio

方式二:HTTP 模式(远程服务器部署)

需先启动服务(npm start),然后通过 URL 连接:

# 本机
claude mcp add --transport http miaoxiang http://localhost:9000/mcp \
  --header "Authorization: Bearer your-secret-token"

# 远程服务器
claude mcp add --transport http -s user miaoxiang http://YOUR_SERVER:9000/mcp \
  --header "Authorization: Bearer your-secret-token"

方式三:配置文件

在项目根目录创建 .mcp.json

{
  "mcpServers": {
    "miaoxiang": {
      "url": "http://localhost:9000/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

管理命令

claude mcp list              # 查看已添加的 MCP 服务
claude mcp remove miaoxiang  # 移除

接入 Cursor

在 Cursor Settings → MCP 中添加:

{
  "mcpServers": {
    "miaoxiang": {
      "url": "http://localhost:9000/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

使用示例

在 AI 客户端中直接用自然语言调用:

  • "帮我诊断一下贵州茅台,代码 600519"
  • "查一下宁德时代最近 4 期的财务数据"
  • "筛选 ROE 大于 15%、市值超 500 亿的半导体股票"
  • "今天 A 股行业板块热点有哪些"
  • "中国平安的机构评级怎么样"
  • "把贵州茅台加入我的自选股"
  • "今天 LOF 基金有哪些溢价套利机会"

技术栈

  • Node.js 18+ / TypeScript 5.x
  • @modelcontextprotocol/sdk v1.x (Streamable HTTP transport)
  • Express 5 + Zod

免责声明

本工具仅供学习交流,所有数据来自东方财富、新浪、天天基金等公开 / 第三方接口。使用者需自行遵守各数据源的服务条款与相关法律法规,本工具不提供任何投资建议,投资决策风险自负。

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