SET-MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SET-MCP Show me the income statement for PTT from 2022 to 2024"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: edgar-mcp
Installation
The package requires Python 3.11 or higher. You can install it using pip:
pip install set-mcpInstalling via Smithery
To install set-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install set-mcp --client claudeUsage
Command Line Interface
The package provides a command-line interface for easy access to financial data:
set-mcp --transport stdioUsing with uvx
Run
uvx set-mcpUsing with pipx
pipx install set-mcp
pipx run set-mcpMCP.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-mcpCreate and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall development dependencies:
pip install -e ".[dev]"Running Tests
python test_client.pyThe 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)
Available Tools
1 toolget_financial_statementA
Get the balance sheet of stock in The Securities Exchange of Thailand (SET).
Args:
symbol (str): Stock symbol in The Securities Exchange of Thailand (SET).
from_year (int): The start YEAR of the financial statement for example 2024.
to_year (int): The end YEAR of the financial statement for example 2024.
Returns:
str: The constructed financial statement.
Include Income Statement, Balance Sheet, and Cash Flow Statement in CSV format with | as the delimiter.
Inputs: symbol (required), from_year (required), to_year (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no risk of confusion between tools. The tool's purpose is clearly defined.
The single tool name 'get_financial_statement' follows a consistent verb_noun pattern, which is clear and predictable.
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).
The tool returns comprehensive financial statements, but lacks supporting features like listing available symbols or filtering by statement type, which are notable gaps.
Maintenance
Related MCP Connectors
SEC filings and financial data for AI agents: 59 tools for statements, valuation and supply chains.
Agent-native SEC data, 20 tools: statements assembled, any line item, filings synthesized. No key.
SEC-filed company financials with filing citations, plus market data, for AI agents
SEC EDGAR financials, insider trading, and economic data for AI agents. US GAAP + IFRS.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides programmatic access to Japan's EDINET system to search for listed companies and retrieve annual or quarterly financial reports. It parses XBRL filings into structured data, enabling AI assistants to analyze balance sheets, income statements, and cash flows.143 PyPI19Apache 2.0
- AlicenseAqualityBmaintenanceProvides access to SEC EDGAR financial data, enabling AI agents to fetch company filings, financial metrics, and narrative sections. It supports natural-language metric searching and extracts structured data from 10-K, 10-Q, and 8-K reports.645 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceEnables access and analysis of Japanese corporate financial data (PL/BS/CF) via EDINET API. Supports searching companies, listing reports, and comparing financials through natural language queries.1MIT
- AlicenseAqualityBmaintenanceEnables LLM agents to retrieve normalized US-GAAP financial statements from SEC EDGAR—income statement, balance sheet, and cash flow—with point-in-time as-reported figures and per-value SEC source provenance for citation.642 PyPIMIT