VNStock Agent MCP Server
Click on "Install 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 MCP ServerWhat's the stock history for VNM 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 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: SSI Stock Data MCP Server
Quick Start
Install
pip install vnstock-agentOr 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_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/mrgoonie/vnstock-agent.git
cd vnstock-agent
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/License
MIT
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrgoonie/vnstock-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server