Add your description here
Project description
SET-MCP
SET-MCP is a Python package that provides tools for serving Model Context Protocol which can access the Securities Exchange of Thailand (SET). It allows AI agents to retrieve comprehensive financial statements including income statements, balance sheets, and cash flow statements for listed companies.
Features
- Retrieve financial statements for SET-listed companies
- Support for multiple financial statement types:
- Income Statement
- Balance Sheet
- Cash Flow Statement
- Historical data retrieval with customizable date ranges
- Command-line interface for easy integration
- FastMCP integration for enhanced functionality
Installation
The package requires Python 3.11 or higher. You can install it using pip:
pip install set-mcp
Installing via Smithery
To install set-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install set-mcp --client claude
Usage
Command Line Interface
The package provides a command-line interface for easy access to financial data:
set-mcp --transport stdio
Using with uvx
Run
uvx set-mcp
Using with pipx
pipx install set-mcp
pipx run set-mcp
MCP.json example
{
"mcpServers": {
"set_mcp": {
"command": "/path/to/bin/uvx", // Edit to your uvx path
"args": [
"set-mcp"
],
}
}
}
Vercel
Coming soon
Available options:
--port: Port to listen on for SSE (default: 8000)--host: Host to listen on (default: 0.0.0.0)--transport: Transport type (choices: stdio, sse, default: stdio)
Note: SSE is not yet implemented
Python API
You can also use the package programmatically in your Python code:
from set_mcp import get_financial_statement
# Get financial statements for a specific company
result = await get_financial_statement(
symbol="PTT", # Company symbol
from_year=2023,
to_year=2024
)
Development
Setup Development Environment
- Clone the repository:
git clone https://github.com/yourusername/set-mcp.git
cd set-mcp
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install development dependencies:
pip install -e ".[dev]"
Running Tests
python test_client.py
The output should be no error
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
- Prem Chotipanit (prem.ch@ku.th | prem.chotepanit@gmail.com)
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 set_mcp-0.3.0.tar.gz.
File metadata
- Download URL: set_mcp-0.3.0.tar.gz
- Upload date:
- Size: 78.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ba94c350a098e600e77ebd93ea13dfe6b05a2fcf99651592094b7d03ae326c1
|
|
| MD5 |
d3061af922777c0d547a5984718af49a
|
|
| BLAKE2b-256 |
fa6f76b43b4946a3c4d82dfaaab6a12b42ea511fc32ffcde36ba49eaa684236d
|
Provenance
The following attestation bundles were made for set_mcp-0.3.0.tar.gz:
Publisher:
python-publish.yml on batprem/set-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
set_mcp-0.3.0.tar.gz -
Subject digest:
1ba94c350a098e600e77ebd93ea13dfe6b05a2fcf99651592094b7d03ae326c1 - Sigstore transparency entry: 198407418
- Sigstore integration time:
-
Permalink:
batprem/set-mcp@164d7eb04639327f08bc5b75bddefb818de9139c -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/batprem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@164d7eb04639327f08bc5b75bddefb818de9139c -
Trigger Event:
release
-
Statement type:
File details
Details for the file set_mcp-0.3.0-py3-none-any.whl.
File metadata
- Download URL: set_mcp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38982bb005e5e5fbb75a05ba7ecdfc08ab7d963e77129fc398fc2b50cfba73c7
|
|
| MD5 |
bb8e414010d72c7ed97b5a2e37923eab
|
|
| BLAKE2b-256 |
78345cc22fb658589a4440d2af0ad09fbf8953be3839eac5ba6d9a7fdb2e8971
|
Provenance
The following attestation bundles were made for set_mcp-0.3.0-py3-none-any.whl:
Publisher:
python-publish.yml on batprem/set-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
set_mcp-0.3.0-py3-none-any.whl -
Subject digest:
38982bb005e5e5fbb75a05ba7ecdfc08ab7d963e77129fc398fc2b50cfba73c7 - Sigstore transparency entry: 198407419
- Sigstore integration time:
-
Permalink:
batprem/set-mcp@164d7eb04639327f08bc5b75bddefb818de9139c -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/batprem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@164d7eb04639327f08bc5b75bddefb818de9139c -
Trigger Event:
release
-
Statement type: