SET-MCP
by batprem
README.md
# SET-MCP
[](https://smithery.ai/server/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:
```bash
pip install set-mcp
```
### Installing via Smithery
To install set-mcp for Claude Desktop automatically via [Smithery](https://smithery.ai/server/set-mcp):
```bash
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:
```bash
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
```json
{
"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:
```python
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
1. Clone the repository:
```bash
git clone https://github.com/yourusername/set-mcp.git
cd set-mcp
```
2. Create and activate a virtual environment:
```bash
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
```
3. Install development dependencies:
```bash
pip install -e ".[dev]"
```
### Running Tests
```bash
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)
TDQS
A3.7/5.0
Scored across 1 tool
Disambiguation5/5
With only one tool, there is no risk of confusion between tools. The tool's purpose is clearly defined.
Naming Consistency5/5
The single tool name 'get_financial_statement' follows a consistent verb_noun pattern, which is clear and predictable.
Tool Count3/5
One tool is borderline for the server's purpose. While it provides a specific function, the scope could warrant additional tools (e.g., listing stocks).
Completeness3/5
The tool returns comprehensive financial statements, but lacks supporting features like listing available symbols or filtering by statement type, which are notable gaps.
Maintenance
ActivityInactive
ResponsivenessNo issues