Token导航 LogoToken导航TokenDH.com
MCP Stock Picker logo
金融服务stdio官方级别未说明来源级核验

MCP Stock Picker

MCP Server

一款基于FastMCP和LangGraph的股票分析工具,通过Model Context Protocol (MCP)提供实时市场数据分析,适用于金融投资和技术分析场景。

工具数

5

提示词数

0

GitHub Stars

0

资源数

0
金融数据技术分析PythonClaudeClaude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

aravind1808v

提供方

aravind1808v

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run python mcp_server.py

详细介绍

MCP库存分析仪

基于以下内容构建的股票分析工具 FastMCPLangGraph.通过公开市场数据工具 模型上下文协议(MCP),让任何兼容MCP的主机(Cursor、Claude Desktop等)直接从聊天中调用实时股票分析。

它的作用

  • 获取 价格历史, 财务数据,以及 新闻Polygon.io
  • 计算 50天SMA 本地技术信号
  • 运行a LangGraph代理 它将所有信号组合成一个 BUY / HOLD / SELL 按驾驶员细分进行评级

建筑

MCP Host (Cursor / Claude Desktop)
    └── FastMCP Server  (mcp_server.py)
            ├── price_history  → Polygon /v2/aggs
            ├── financials     → Polygon /vX/reference/financials
            ├── news           → Polygon /v2/reference/news
            ├── sma            → local computation over price history
            └── short_interest → placeholder (bring your own provider)

LangGraph Agent  (agent.py)
    ├── fetch_all  – calls all MCP tools in parallel
    └── decide     – deterministic scoring → BUY / HOLD / SELL

先决条件

设置

# 1. Clone the repo
git clone https://github.com/aravind1808v/MCP-Stocks.git
cd MCP-Stocks

# 2. Install dependencies
uv sync

# 3. Set your API key
export POLYGON_API_KEY=your_key_here
# or create a .env file:
echo "POLYGON_API_KEY=your_key_here" > .env

运行MCP服务器

uv run python mcp_server.py

服务器启动并通过stdio监听MCP工具调用。

连接到游标

将此添加到您的Cursor MCP配置中(~/.cursor/mcp.json):

{
  "mcpServers": {
    "stock-analyzer": {
      "command": "/path/to/MCP-Stocks/run_cursor_mcp.sh"
    }
  }
}

然后重新启动Cursor。你现在可以问这样的问题:

*“适用于NVDA的SMA-50是什么?”* *“给我TSLA的最新消息。”* *“获取AAPL过去4个季度的财务数据。”*

直接运行LangGraph代理

uv run python agent.py

这运行 analyze_stock("AAPL") 端到端并打印一个JSON评级对象:

{
  "ticker": "AAPL",
  "rating": "BUY",
  "score": 2,
  "drivers": {
    "technical": { "pct_vs_sma_50": 4.2, "signal": "bullish" },
    "fundamentals": "ok",
    "news": { "count": 10, "signal": "mixed" }
  },
  "sources": ["https://..."]
}

可用的MCP工具

工具描述关键参数
price_history每日OHLCV酒吧ticker, days (默认365)
financials收入/余额/现金流ticker, limit (默认值4)
news最近的新闻文章ticker, limit (默认值10)
sma简单移动平均线ticker, window (默认值50), days
short_interest短期利息占位符ticker

项目结构

mcp_server.py      – FastMCP server with all market data tools
agent.py           – LangGraph graph: fetch → decide → rating
main.py            – CLI entry point
run_cursor_mcp.sh  – Shell wrapper for Cursor MCP config
pyproject.toml     – Project metadata and dependencies

延伸

  • 更好的基本面评分 --解析收入增长、利润率和FCF financials 工具结果为 agent.py:decide()
  • 新闻情绪 --集成NLP模型或LLM调用以替换占位符 "mixed" 信号
  • 空头利息 --电线 short_interest 向Finviz或优质Polygon计划等提供商提供服务
  • LLM总结器 --替换确定性 decide 具有用于自然语言分析的Claude/GPT调用的节点

许可证

麻省理工学院

目录标签

目录标签

金融数据技术分析PythonClaude股票分析本地部署金融市场实时数据LangGraph

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP