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 APIs. 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 - Designed for easy extension with new APIs and features
Project Structure
tcinvest_mcp_server/
__init__.py
__main__.py
constant.py
requirements.txt
server.py
api/
__init__.py
client.py # API client for TCBS endpoints
services/ # Business logic for tcinvest api will be added here
__init__.py
bond_trading.py
...
.env # Environment variables (API key, base URL)
app.log # Log file
PYTHON_SDK_README.md
llms-full.txt
README.md
Getting Started
Installation
Install from PyPI
To install the package directly from PyPI, run:
pip install tcinvest-mcp-server
Install from Source
Alternatively, clone the repository and install the dependencies manually:
git clone https://github.com/hoangWiki/tcinvest_mcp_server.git
cd tcinvest_mcp_server
pip install -r requirements.txt
Configuration
Set up your environment by copying the .env file and adding your TCBS_API_KEY:
TCBS_API_KEY=your_api_key_here
Running the Server
If installed from PyPI, you can start the server using:
python -m tcinvest_mcp_server --env path/to/your/.env
Or:
tcinvest-mcp-server --env path/to/your/.env
If installed from source, run:
python -m tcinvest_mcp_server --env path/to/your/.env
Usage
- The server exposes MCP tools for bond data retrieval.
- Logs are written to
app.log.
Roadmap
- Add more TCBS API endpoints for stocks, funds, and other financial products
- Community contributions and feature requests welcome!
Disclaimer
See disclaim.md for important legal and usage information.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for tcinvest-mcp-server 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tcinvest_mcp_server-0.1.3.tar.gz | 10.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tcinvest_mcp_server-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / tcinvest_mcp_server-0.1.3.tar.gz
| Download URL | tcinvest_mcp_server-0.1.3.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc21a8b19469b541d5a2bfb69bfcd0d21223d4343d9a9eb1a3b5954c1e44d87e
|
|
BLAKE2b-256 checksum How to use checksums |
87c4b600015a96e003593eb79316d07d950fa4eeeffd4804db3d0b3f12778941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / tcinvest_mcp_server-0.1.3-py3-none-any.whl
| Download URL | tcinvest_mcp_server-0.1.3-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72a48b3e2ce53de678dae67cbbfed02b6e83c27c88c5454c945df834e2d736c7
|
|
BLAKE2b-256 checksum How to use checksums |
b4a4edc81e5166a80ec409be5010156bff3ba7e89c41689038e5085e1841bc56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for tcinvest-mcp-server 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.