Skip to main content
Glama
essos-bot

eastmoney-skills2mcp

by essos-bot

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(见下)。

Related MCP server: Stock Data MCP Server

获取妙想 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

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    The MCP provides comprehensive financial data and analytical tool support for AI large language models, specifically including the following five core data capabilities: Stock Analysis/ETF Analysis/Public Funds/News & Information/General Tools More Info: https://github.com/shenqingtech/deepq-finan
    44
    10 npm
    7
    ISC
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables querying financial data including stocks, indices, funds, and futures from Chinese, Hong Kong, and US markets. Provides real-time market information, financial indicators, news, and trading suggestions through Eastmoney and Sina data sources.
    8 npm
    3
    ISC
  • A
    license
    A
    quality
    F
    maintenance
    Provides comprehensive stock market data (A-shares, Hong Kong, US) including real-time quotes, K-lines, technical indicators, sectors, futures, and options, with built-in AI Skills and MCP Prompts for financial analysis.
    69
    92 npm
    100
    ISC
  • F
    license
    Not graded
    quality
    C
    maintenance
    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.
    -