Stock MCP Server

Stock MCP Server

Provides real-time market data for A-shares, Hong Kong, and US stocks using the Tencent Finance API. It enables users to manage stock positions and watchlists through an AI assistant.

Category
Visit Server

README

Stock MCP Server

腾讯股票数据 MCP 服务器,为 AI 助手提供股票数据查询和持仓管理功能。

功能特性

股票行情查询

  • A股实时行情(上海、深圳)
  • 港股实时行情
  • 美股实时行情
  • 支持批量查询

持仓管理

  • 添加、更新、删除持仓
  • 查询持仓列表和详情

观察列表

  • 添加、更新、删除关注股票
  • 查询观察列表

支持的市场

代码 市场
sh 上海A股
sz 深圳A股
hk 港股
us 美股

快速开始

安装依赖

npm install

构建项目

npm run build

配置 MCP

在 Claude Code 或其他 MCP 客户端的配置文件中添加:

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

使用示例

// 查询股票行情
stock_get({ symbol: "sh000001" })

// 批量查询
stock_get_batch({ symbols: ["sh000001", "sz000001"] })

// 添加持仓
position_add({ symbol: "sz000001", shares: 100, cost: 10.5 })

// 添加观察
watch_add({ symbol: "hk00700", note: "腾讯控股" })

可用工具

工具 描述
stock_get 获取单只股票实时行情
stock_get_batch 批量获取多只股票行情
position_add 添加持仓
position_update 更新持仓
position_remove 删除持仓
position_list 获取所有持仓
position_get 获取单个持仓
watch_add 添加观察股票
watch_update 更新观察股票
watch_remove 删除观察股票
watch_list 获取所有观察
watch_get 获取单个观察

技术栈

  • TypeScript
  • Node.js
  • @modelcontextprotocol/sdk

数据来源

股票数据来自 腾讯财经 API

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