Skip to main content

A Model Context Protocol (MCP) server for TCInvest, enabling LLM-powered access to TCBS stock and bond data.

Project description

TCInvest MCP Server

This project is a Model Context Protocol (MCP) server for TCInvest, designed to help users build LLM-powered applications with real-time and historical stock and bond data from the TCBS API. The goal is to enable users to interact with financial data using large language models (LLMs), similar to how DeepSeek operates in the Chinese stock market—using LLMs to replace traditional brokers and provide intelligent, automated investment support.

Purpose

  • Enable seamless integration of LLMs (such as GPT, DeepSeek, etc.) with Vietnamese stock and bond data from TCBS.
  • Allow users to query, analyze, and visualize financial data using natural language.
  • Provide a foundation for building next-generation AI investment assistants and tools.
  • Continuously expand features and API coverage to support more financial products and use cases.

Features

  • Retrieve stock and bond data from the TCBS API
  • Loads configuration from a .env file
  • Logs activity to app.log
  • Exposes MCP tools to retrieve and visualize bond data
  • Generates charts (PNG, base64) for investment time by bond code
  • Designed for easy extension with new APIs and features

Project Structure

api/
  client.py         # API client for TCBS endpoints
business/
  bonds.py          # Business logic for bond products
constant.py         # API endpoint constants
server.py           # MCP server entry point
requirements.txt    # Python dependencies
.env                # Environment variables (API key, base URL)
app.log             # Log file

Getting Started

  1. Clone the repository
  2. Install dependencies
    pip install -r requirements.txt
    
  3. Configure environment
    • Copy .env and set your TCBS_API_KEY and BASE_URL.
  4. Run the server
    python -m tcinvest_mcp_server
    

Usage

  • The server exposes MCP tools for bond data retrieval and visualization.
  • Logs are written to app.log.
  • Visualizations are returned as base64-encoded PNG images for easy embedding in HTML.

Roadmap

  • Add more TCBS API endpoints for stocks, funds, and other financial products
  • Integrate advanced LLM-based query and reasoning capabilities
  • Support more visualization types and analytics
  • Enable conversational investment assistants and chatbots
  • Community contributions and feature requests welcome!

Disclaimer

See DISCLAIM.md for important legal and usage information.

License

This project is for educational and demonstration purposes only. See DISCLAIM.md for details.

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

tcinvest_mcp_server-0.1.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

tcinvest_mcp_server-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file tcinvest_mcp_server-0.1.2.tar.gz.

File metadata

  • Download URL: tcinvest_mcp_server-0.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tcinvest_mcp_server-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4b27725ec512d57fd9b530e25fdea46a8edd2d5a3ebc15e5ea9b51c7cecd3cd1
MD5 1adf92c0958c8225b8ff0314611ae794
BLAKE2b-256 1b589210e30aa048e3f2260c6022b7e2825a5f9c0e55e8c9a827d97fd8416bef

See more details on using hashes here.

File details

Details for the file tcinvest_mcp_server-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tcinvest_mcp_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd1cbbddfab4c88af28883bef30c91f6203de1162149c8eddb143e6a31d3429
MD5 cc4b1f7a97ee94d9a7391496e43b6a6c
BLAKE2b-256 f8c4f3f33e1a9b354ead8355202bca666eeb1e3cef6a34569769d51c92388b89

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