VNStock Agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@VNStock Agent get the historical prices for VNM stock this year"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
VNStock Agent
MCP server and CLI for Vietnamese stock market data. Integrates vnstock (hỗ trợ tác giả gốc thinh-vu) 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
Related MCP server: vnstock-mcp
Quick Start
Install
pip install vnstock-agentOr from source:
git clone https://github.com/anhnd2102/vnstock-mcp.git
cd vnstock-mcp
pip install -e .Set API Key
export VNSTOCK_API_KEY=your_api_key_hereGet 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 VNMMCP 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-mcpStreamable HTTP Transport
VNSTOCK_MCP_TRANSPORT=http VNSTOCK_MCP_PORT=8000 vnstock-mcpOr via CLI:
vnstock-agent serve --transport sse --port 8000
vnstock-agent serve --transport http --port 8000MCP Tools
Tool | Description |
| Historical OHLCV price data |
| Today's intraday trading data |
| Order book / bid-ask data |
| Company overview info |
| Major shareholders |
| Management team |
| Company news |
| Dividends, AGM, etc. |
| Balance sheet |
| Income statement |
| Cash flow statement |
| P/E, P/B, ROE, ROA, etc. |
| All listed symbols |
| VN30, HNX30, etc. |
| By exchange (HOSE, HNX, UPCOM) |
| ICB industry classification |
| Real-time price board |
| Forex historical data |
| Cryptocurrency data |
| World market indices |
| Mutual fund listing |
Environment Variables
Variable | Default | Description |
| (none) | VNStock API key |
|
| Default data source (VCI, KBS) |
|
| MCP transport (stdio, sse, http) |
|
| Server host |
|
| Server port |
Development
git clone https://github.com/anhnd2102/vnstock-mcp.git
cd vnstock-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/License
MIT
Available Tools
21 toolscompany_eventsC
Get company events (dividends, AGM, earnings, etc).
Inputs: symbol (required), source. Returns: result
company_newsB
Get latest news about a company.
Inputs: symbol (required), source. Returns: result
company_officersC
Get company officers / management team.
Inputs: symbol (required), source. Returns: result
company_overviewC
Get company overview information (industry, market cap, description, etc).
Inputs: symbol (required), source. Returns: result
crypto_historyB
Get cryptocurrency historical price data.
Inputs: end, start, symbol, interval. Returns: result
financial_balance_sheetC
Get balance sheet data for a company.
Inputs: symbol (required), period, source. Returns: result
financial_cash_flowC
Get cash flow statement for a company.
Inputs: symbol (required), period, source. Returns: result
financial_income_statementC
Get income statement data for a company.
Inputs: symbol (required), period, source. Returns: result
financial_ratioB
Get financial ratios (P/E, P/B, ROE, ROA, etc) for a company.
Inputs: symbol (required), period, source. Returns: result
fund_listingB
Get list of open-ended mutual funds available in Vietnam.
Inputs: no named parameters. Returns: result
fx_historyC
Get forex (currency pair) historical price data.
Inputs: end, start, symbol, interval. Returns: result
listing_all_symbolsA
Get all listed stock symbols on Vietnamese exchanges (HOSE, HNX, UPCOM).
Inputs: source. Returns: result
listing_industriesC
Get ICB industry classification for Vietnamese stocks.
Inputs: source. Returns: result
listing_symbols_by_exchangeA
Get stock symbols grouped by exchange (HOSE, HNX, UPCOM).
Inputs: source. Returns: result
listing_symbols_by_groupC
Get stock symbols in a market group.
Inputs: group, source. Returns: result
stock_historyB
Get historical OHLCV price data for a Vietnamese stock.
Inputs: symbol (required), end, start, source, +1 more. Returns: result
stock_intradayB
Get intraday (today's) trading data for a stock.
Inputs: symbol (required), source, page_size. Returns: result
stock_price_depthB
Get order book / price depth (bid/ask levels) for a stock.
Inputs: symbol (required), source. Returns: result
trading_price_boardB
Get real-time price board for multiple stocks.
Inputs: symbols (required), source. Returns: result
world_index_historyC
Get world market index historical data.
Inputs: end, start, symbol, interval. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct resource (stock, company, financial statement, listing, market data, fund) with a specific action. The prefixes stock_, company_, financial_, listing_, trading_, fx_, crypto_, world_index_, and fund_ cleanly separate domains with no overlapping purposes.
The naming follows a consistent category_prefix + noun pattern (stock_history, company_overview, financial_ratio, listing_all_symbols). The intraday vs history distinction is slightly odd (temporal vs derivative terms) but broadly consistent. Minor deviations like trading_price_board vs the rest don't undermine readability.
21 tools is on the upper boundary but the scope is genuinely broad: Vietnam stock market data (core), company fundamentals, financial statements, listing info, plus supplementary FX/crypto/world index/mutual fund data. Each tool maps to a distinct data category a Vietnam equity research agent would need.
The surface covers the full data stack for Vietnam equity research: market data (history, intraday, depth, price board), fundamentals (financial statements, ratios), company info (overview, shareholders, officers, news, events), and listings. Minor gaps include missing order/trade execution tools and no company_announcements separate from news, but these are not core to a data-provider role.
Related MCP Connectors
MCP server for Financial Modeling Prep API with 250+ financial data tools
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
A Model Context Protocol server exposing real-time and historical Colombo Stock Exchange (CSE) data to AI agents and LLM applications. Provides quotes and OHLCV price history, full financial statements (income, balance sheet, cash flow), pre-computed technicals (moving averages, RS ratings, volume signals), macroeconomic indicators, corporate actions, and rule-based screening across CSE stocks and sector indices, everything needed to build CSE-aware trading assistants, research tools, and market-analysis agents. This is the official MCP server of www.ceyloncharts.com
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Related MCP Servers
- AlicenseBqualityDmaintenanceVietnamese Financial Markets Data MCP Server providing real-time quotes, financials, and technical indicators.3559 npm1MIT
- AlicenseNot gradedqualityDmaintenanceUnofficial MCP server providing Vietnamese stock market financial data, enabling natural language interaction with Claude Desktop.29 PyPIMIT
- AlicenseBqualityDmaintenanceMCP server for Vietnamese stock market data, enabling AI assistants to access stock history, financials, company info, and global market data through 21 tools.21104MIT
- AlicenseBqualityDmaintenanceMCP server exposing 43 financial data tools for A-share, HK, US stocks, crypto, and market news via open-stock-data.4363 PyPI15MIT