Stock Analysis MCP Server

Stock Analysis MCP Server

An MCP server that provides real-time stock data, technical indicators, and financial metrics using the date.590.net data source. It enables AI-powered intelligent analysis and batch reporting through integration with the Deepseek API.

Category
Visit Server

README

股票分析 MCP 服务器

基于 date.590.net 数据源的股票分析 MCP 服务,支持 AI 智能分析。

功能特性

工具 功能
analyze_stock 获取股票完整分析报告(支持AI分析)
get_raw_stock_data 获取股票原始数据
quick_analysis 快速股票点评
batch_analyze 批量分析多只股票

数据覆盖

  • 实时交易数据(价格、成交量、换手率)
  • 30日历史数据
  • 技术指标(MACD、KDJ、RSI、多周期DMI
  • 筹码分布
  • 神奇九转
  • 资金流向(主力/超大单/大单/中单/小单)
  • 融资融券
  • 龙虎榜
  • 财务指标(ROE、PE、PB等)
  • 公司公告
  • 互动易问答

快速开始

1. 安装

# Windows
install.bat

# Linux/Mac
./install.sh

2. 配置

编辑 config.json,填入 Deepseek API Key:

{
  "ai": {
    "enabled": true,
    "api_key": "your-deepseek-api-key"
  }
}

3. 启动

# Windows
start.bat

# Linux/Mac
./start.sh

4. Claude Desktop 配置

编辑 claude_desktop_config.json

{
  "mcpServers": {
    "stock-analyzer": {
      "command": "D:\\ai\\stock-analysis-mcp\\venv\\Scripts\\python.exe",
      "args": ["D:\\ai\\stock-analysis-mcp\\server.py"]
    }
  }
}

使用方法

分析单只股票

用户:分析一下福建金森
AI:我来获取福建金森的完整分析报告...
[调用 analyze_stock("002679")]

快速点评

用户:看看贵州茅台怎么样
AI:[调用 quick_analysis("600519")]

批量分析

用户:对比一下这几只股票:002679, 600519, 000001
AI:[调用 batch_analyze("002679,600519,000001")]

只获取原始数据

用户:获取福建金森的原始数据,我自己分析
AI:[调用 get_raw_stock_data("002679")]

部署到服务器

部署到 193.112.101.212

# 1. 上传代码到服务器
scp -r stock-analysis-mcp root@193.112.101.212:/www/wwwroot/

# 2. SSH登录服务器安装
ssh root@193.112.101.212
cd /www/wwwroot/stock-analysis-mcp
./install.sh

# 3. 配置API Key
vi config.json

# 4. 测试启动
./start.sh

使用域名

配置 Nginx 反向代理:

server {
    listen 80;
    server_name mcp.590.net;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

后台运行(Systemd)

创建服务文件 /etc/systemd/system/stock-mcp.service

[Unit]
Description=Stock Analysis MCP Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/www/wwwroot/stock-analysis-mcp
ExecStart=/www/wwwroot/stock-analysis-mcp/venv/bin/python server.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

启动服务:

systemctl daemon-reload
systemctl enable stock-mcp
systemctl start stock-mcp
systemctl status stock-mcp

文件结构

stock-analysis-mcp/
├── server.py           # MCP服务器主代码
├── config.json         # 配置文件
├── requirements.txt    # Python依赖
├── install.bat         # Windows安装脚本
├── install.sh          # Linux安装脚本
├── start.bat           # Windows启动脚本
├── start.sh            # Linux启动脚本
├── logs/               # 日志目录
└── README.md           # 使用文档

技术栈

  • MCP: Model Context Protocol
  • Data Source: date.590.net (Tushare Pro + 实时数据)
  • AI: Deepseek API
  • Transport: stdio / SSE

注意事项

  1. API Key 安全: 不要将包含API Key的config.json上传到公开仓库
  2. 网络依赖: 需要能访问 date.590.net 和 Deepseek API
  3. 并发限制: 根据 date.590.net 的性能调整并发请求数

更新日志

v1.0.0 (2025-01-29)

  • 初始版本
  • 支持4个核心工具
  • 集成AI分析功能

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