Skip to main content

SET-MCP

smithery badge

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

  1. Clone the repository:
git clone https://github.com/yourusername/set-mcp.git
cd set-mcp
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 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

Metadata

Release files for set-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for set-mcp 0.3.0
File Size Uploaded Provenance
set_mcp-0.3.0.tar.gz 78.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for set-mcp 0.3.0
File Interpreter ABI Platform
set_mcp-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 85.4 kB

Release files / set_mcp-0.3.0.tar.gz

Download URL set_mcp-0.3.0.tar.gz
Size 78.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1ba94c350a098e600e77ebd93ea13dfe6b05a2fcf99651592094b7d03ae326c1
BLAKE2b-256 checksum
How to use checksums
fa6f76b43b4946a3c4d82dfaaab6a12b42ea511fc32ffcde36ba49eaa684236d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 17, 2025.

Transparency log

Release files / set_mcp-0.3.0-py3-none-any.whl

Download URL set_mcp-0.3.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38982bb005e5e5fbb75a05ba7ecdfc08ab7d963e77129fc398fc2b50cfba73c7
BLAKE2b-256 checksum
How to use checksums
78345cc22fb658589a4440d2af0ad09fbf8953be3839eac5ba6d9a7fdb2e8971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 17, 2025.

Transparency log

Security for set-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for set_mcp-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 17, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page