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 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.
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.3.tar.gz.
File metadata
- Download URL: tcinvest_mcp_server-0.1.3.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc21a8b19469b541d5a2bfb69bfcd0d21223d4343d9a9eb1a3b5954c1e44d87e
|
|
| MD5 |
f702c3f60d3b7326f375841f95eb3eab
|
|
| BLAKE2b-256 |
87c4b600015a96e003593eb79316d07d950fa4eeeffd4804db3d0b3f12778941
|
File details
Details for the file tcinvest_mcp_server-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tcinvest_mcp_server-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.6 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 |
72a48b3e2ce53de678dae67cbbfed02b6e83c27c88c5454c945df834e2d736c7
|
|
| MD5 |
c7dd60f8e33ecfabcf0883a2d39845a6
|
|
| BLAKE2b-256 |
b4a4edc81e5166a80ec409be5010156bff3ba7e89c41689038e5085e1841bc56
|