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
.envfile - 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
- Clone the repository
- Install dependencies
pip install -r requirements.txt
- Configure environment
- Copy
.envand set yourTCBS_API_KEYandBASE_URL.
- Copy
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b27725ec512d57fd9b530e25fdea46a8edd2d5a3ebc15e5ea9b51c7cecd3cd1
|
|
| MD5 |
1adf92c0958c8225b8ff0314611ae794
|
|
| BLAKE2b-256 |
1b589210e30aa048e3f2260c6022b7e2825a5f9c0e55e8c9a827d97fd8416bef
|
File details
Details for the file tcinvest_mcp_server-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tcinvest_mcp_server-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cd1cbbddfab4c88af28883bef30c91f6203de1162149c8eddb143e6a31d3429
|
|
| MD5 |
cc4b1f7a97ee94d9a7391496e43b6a6c
|
|
| BLAKE2b-256 |
f8c4f3f33e1a9b354ead8355202bca666eeb1e3cef6a34569769d51c92388b89
|