MV

mrgoonie/vnstock-agent

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

104 stars 44 forks 质量 64 趋势 0

mrgoonie/vnstock-agent 是一个从 https://github.com/mrgoonie/vnstock-agent. 导入的 MCP 服务器候选

概览

mrgoonie/vnstock-agent 是一个从 https://github.com/mrgoonie/vnstock-agent. 导入的 MCP 服务器候选

概述(AI 翻译)

用于越南股市数据的MCP服务器和CLI。通过模型上下文协议(MCP)将vnstock与AI工具集成。

特色

  • 21 个 MCP 工具 用于 AI 助手(Claude、GPT 等)
  • 22 个终端使用的 CLI 命令
  • 3 MCP 传输:stdio、SSE、可流式 HTTP
  • 越南股票、外汇、加密货币、世界指数、共同基金
  • 历史价格、财务、公司信息、交易数据

快速启动

安装

或者引用来源:

设置API密钥

在 vnstocks.com/login 获取免费API密钥。

CLI 使用

MCP服务器

标准(用于 Claude 桌面、光标等)

添加到你的MCP客户端配置中:

SSE运输

可流式HTTP传输

或者通过CLI:

MCP工具

工具 描述
stock_history 历史OHLCV价格数据
stock_intraday 今日盘中交易数据
stock_price_depth 订单簿 / 买卖数据
company_overview 公司概览信息
company_shareholders 主要股东
company_officers 管理团队
company_news 公司新闻
company_events 股息、股东股东大会等
financial_balance_sheet 资产负债表

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

VNStock Agent

MCP server and CLI for Vietnamese stock market data. Integrates vnstock with AI tools via Model Context Protocol (MCP).

Features

  • 21 MCP tools for AI assistants (Claude, GPT, etc.)
  • 22 CLI commands for terminal use
  • 3 MCP transports: stdio, SSE, Streamable HTTP
  • Vietnamese stocks, forex, crypto, world indices, mutual funds
  • Historical prices, financials, company info, trading data

Quick Start

Install

pip install vnstock-agent

Or from source:

git clone https://github.com/mrgoonie/vnstock-agent.git
cd vnstock-agent
pip install -e .

Set API Key

export VNSTOCK_API_KEY=your_api_key_here

Get a free API key at vnstocks.com/login.

CLI Usage

# Stock history
vnstock-agent history VNM --start 2025-01-01 --end 2025-03-31

# Company overview
vnstock-agent overview FPT

# Financial statements
vnstock-agent balance-sheet VCB --period quarter
vnstock-agent income VCB --period annual
vnstock-agent cashflow VCB
vnstock-agent ratio VCB

# Market data
vnstock-agent symbols                    # All listed symbols
vnstock-agent group --group VN30         # VN30 stocks
vnstock-agent board "VNM,FPT,ACB,VCB"   # Price board
vnstock-agent industries                 # ICB industries

# Company details
vnstock-agent shareholders FPT
vnstock-agent officers FPT
vnstock-agent news FPT
vnstock-agent events FPT

# Intraday & depth
vnstock-agent intraday VNM --page-size 200

# Global markets
vnstock-agent fx EURUSD --start 2025-01-01
vnstock-agent crypto BTC --start 2025-01-01
vnstock-agent index DJI --start 2025-01-01

# Mutual funds
vnstock-agent funds

# JSON output
vnstock-agent --format json history VNM

MCP Server

stdio (for Claude Desktop, Cursor, etc.)

Add to your MCP client config:

{
  "mcpServers": {
    "vnstock": {
      "command": "vnstock-mcp",
      "env": {
        "VNSTOCK_API_KEY": "your_api_key_here"
      }
    }
  }
}

SSE Transport

VNSTOCK_MCP_TRANSPORT=sse VNSTOCK_MCP_PORT=8000 vnstock-mcp

Streamable HTTP Transport

VNSTOCK_MCP_TRANSPORT=http VNSTOCK_MCP_PORT=8000 vnstock-mcp

Or via CLI:

vnstock-agent serve --transport sse --port 8000
vnstock-agent serve --transport http --port 8000

MCP Tools

Tool Description
stock_history Historical OHLCV price data
stock_intraday Today’s intraday trading data
stock_price_depth Order book / bid-ask data
company_overview Company overview info
company_shareholders Major shareholders
company_officers Management team
company_news Company news
company_events Dividends, AGM, etc.
financial_balance_sheet Balance sheet
financial_income_statement Income statement
financial_cash_flow Cash flow statement
financial_ratio P/E, P/B, ROE, ROA, etc.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "vnstock": { "command": "vnstock-mcp", "env": { "VNSTOCK_API_KEY": "your_api_key_here" } } } }