SET-MCP
Click on "Install 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-MCPShow 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: MCP OpenDART
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.
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| from_year | Yes | ||
| to_year | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses output format (CSV with | delimiter) and content scope (three statements). No annotations exist, so the description provides basic behavioral info but lacks details on data recency, authorization, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is structured as a docstring with Args and Returns sections, making it easy to parse. Slight redundancy (first sentence vs Returns) prevents a 5, but overall concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (three parameters, no output schema), the description adequately covers input definitions and output description. Adding note on data temporal scope (e.g., real-time vs. delayed) would enhance completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage, but the description adds meaning for all three parameters: symbol context (SET stock), from_year and to_year with examples. This compensates strongly for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly identifies the tool as retrieving financial statements for SET stocks. However, the first sentence mentions only 'balance sheet' while the Returns section lists all three statements (income, balance, cash flow), creating minor inconsistency.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool or its alternatives. Since there are no sibling tools, the need is reduced, but describing typical use cases would improve clarity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
- First observed
get_financial_statement
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Official-source financial data for AI agents: Korea, US, Taiwan, Japan, Europe. 37 tools, free tier.
SEC filing intelligence for AI agents. Financials, screening, peer comparison for 5,000+ companies.
SEC filings and financial data for AI agents: 55 tools for financials, valuation and supply chains.
1SEC EDGAR financials, insider trading, and economic data for AI agents. US GAAP + IFRS.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query Korean listed companies' financial statements, public disclosures, executive information, and shareholder structures in real-time using the DART API.2-
- FlicenseCqualityNot gradedmaintenanceEnables AI assistants to access South Korea's financial disclosure system (OpenDART), allowing users to retrieve corporate financial reports, disclosure documents, shareholder information, and automatically extract and search financial statement notes through natural language queries.85-
- AlicenseNot gradedqualityAmaintenanceProvides 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.18Apache 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.6MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/batprem/set-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server