Skip to main content

Vietnamese Stock Market MCP Server - FastMCP 2.0

Project description

VNStock MCP Server

The unofficial MCP server that provides all the features of vnstock, allowing you to interact with your Claude Desktop using natural language processing capabilities.

Features

  • ๐Ÿš€ Direct MCP Integration: Connect to your vnstock MCP server via stdio
  • ๐Ÿค– LLM-Powered: Natural language processing with Anthropic Claude
  • ๐Ÿ’ฌ Interactive CLI: Rich terminal interface with auto-completion and history
  • ๐Ÿ“Š Beautiful Output: Formatted tables, charts, and data visualization
  • ๐Ÿ”ง Tool Management: Automatic tool discovery and validation
  • ๐ŸŽฏ Smart Parsing: Vietnamese stock symbol and date format support
  • โšก Error Handling: Robust error recovery and user-friendly messages

Quick Start

1. Installation

For End Users (Recommended)

# Install from PyPI and run directly
uvx vnstock-mcp

For Developers

# Clone the repository
git clone https://github.com/gahoccode/vnstock-mcp.git
cd vnstock-mcp

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
uv sync

2. Run the Server

End Users (uvx method)

# Run directly from PyPI
uvx vnstock-mcp

Developers (local development)

# Run from source
uv run python src/vnstock_mcp/server.py

Usage Examples

> What's the current price of VNM stock?
> Show me FPT's financial statements for 2024
> Get the latest SJC gold price
> What are HPG's key financial ratios?
> Show me dividend history for ACB stock

Project Structure

vnstock-mcp/
โ”œโ”€โ”€ pyproject.toml          # Project configuration and dependencies
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ vnstock_mcp/        # Python package
โ”‚       โ”œโ”€โ”€ __init__.py     # Package initialization
โ”‚       โ””โ”€โ”€ server.py       # Main MCP server
โ”œโ”€โ”€ tests/                  # Test suite
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ conftest.py         # Pytest configuration
โ”œโ”€โ”€ dist/                   # Built packages
โ”‚   โ”œโ”€โ”€ vnstock_mcp-0.1.0-py3-none-any.whl
โ”‚   โ””โ”€โ”€ vnstock_mcp-0.1.0.tar.gz
โ”œโ”€โ”€ sample questions/       # Usage examples
โ”‚   โ””โ”€โ”€ questions.md
โ”œโ”€โ”€ uv.lock                 # Dependency lock file
โ””โ”€โ”€ README.md               # This file

uv vs uvx: Which to Use?

uvx (Recommended for Users)

  • Purpose: Run Python packages directly from PyPI
  • Use case: End users who just want to use the MCP server
  • Command: uvx vnstock-mcp
  • Benefits:
    • No local setup required
    • Automatic dependency management
    • Isolated execution environment

uv (Recommended for Developers)

  • Purpose: Python project and package management
  • Use case: Developers who want to modify/contribute to the code
  • Command: uv run python src/vnstock_mcp/server.py
  • Benefits:
    • Full source code access
    • Development workflow
    • Ability to make changes

Claude Desktop Integration

To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

Method 1: Using uvx (if PATH configured)

{
  "mcpServers": {
    "vnstock-mcp": {
      "command": "uvx",
      "args": ["vnstock-mcp"]
    }
  }
}

Method 2: Using uvx (if PATH NOT configured)

{
  "mcpServers": {
    "vnstock-mcp": {
      "command": "/Users/YOUR_USERNAME/.local/bin/uvx",
      "args": ["vnstock-mcp"]
    }
  }
}

Method 3: Development from source

{
  "mcpServers": {
    "vnstock-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/USERNAME/PATH_TO/src/vnstock_mcp",
        "run",
        "server.py"
      ]
    }
  }
}

Note:

  • Replace YOUR_USERNAME with your actual username in Method 2
  • Replace USERNAME with your actual username in Method 3
  • After quitting and restarting Claude Desktop, if it still can't detect the mcp server, check if uvx is in your PATH. If not, add ~/.local/bin to your PATH:
# For zsh (macOS default)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

# For bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

License

This project is part of the vnstock-mcp ecosystem. See the main repository for licensing information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vnstock_mcp-0.1.4.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vnstock_mcp-0.1.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file vnstock_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: vnstock_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for vnstock_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6d730bffb2bd33996604f28bd228a5af7ab080b77e1412532f3546617859a1ec
MD5 d808126c1029c9227aaa043d11a79d9d
BLAKE2b-256 b413ca9ecd844c6997b1920bdce17faa57e906e954255e128ad7e8f0660055c9

See more details on using hashes here.

File details

Details for the file vnstock_mcp-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for vnstock_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0038f5dd26012570cc9eefea1f153b5d8926ee672037e0d9a4ce44d78edbdee8
MD5 ee64770c05b152c9a8c1df107591ceee
BLAKE2b-256 146ac6c389d3a2de3639879d05eeba7c87c21a5c0ab054bda26edbcf8386f6dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page