tsetmc-mcp: Tehran Stock Exchange MCP server for AI agents
An unofficial, read-only MCP server for TSETMC (مدیریت فناوری بورس تهران), the Tehran Stock Exchange and Iran Fara Bourse data portal: quotes, top movers, order book, daily history, real vs legal trading and indices.
For AI agents
- What: unofficial MCP server for tsetmc.com market data. Persian queries work for symbol search (Arabic ي/ك are accepted).
- Install:
uvx tsetmc-mcporclaude mcp add tsetmc -- uvx tsetmc-mcp. Transport: stdio. Needs uv (Python 3.10+). - Auth: none. Optional
TSETMC_MCP_PROXY(HTTP proxy URL, or a comma-separated list); system proxy settings are ignored. - Access: read-only, so no confirmation is needed before calling any tool.
- Tools: 8, all prefixed
ts_. Typical sequence:ts_indices->ts_market_movers->ts_get_quote->ts_price_history. - Output: compact JSON. Prices are in Rial (Toman = Rial / 10), volumes in shares, dates Gregorian.
- Network: tsetmc.com only answers some networks. If you get HTTP 403, try an Iranian connection or set
TSETMC_MCP_PROXY. - Machine-readable:
server.json.
Tools
| Tool | Purpose |
|---|---|
ts_search_symbols |
Find Tehran Stock Exchange instruments (shares, funds, rights, bonds) by ticker or name |
ts_get_quote |
Latest price, daily range, volume and key facts of one instrument on the Tehran Stock Exchange |
ts_market_movers |
Top traded instruments of a market today, ranked by gain, loss, volume, value or trade count |
ts_order_book |
Best five bid and ask levels (price, volume, order count) of one instrument |
ts_price_history |
Daily open, high, low, close, volume, trades and value of one instrument for its latest trading days, newest first |
ts_real_legal |
Buy and sell volume, value and buyer/seller counts split by real (individual) and legal (institutional) traders per day |
ts_indices |
TSE total index, market state and trading totals, plus every sector and market index with its change |
ts_index_history |
Daily close, high, low and percent change of a TSE index (total, equal-weight, sector...), newest first |
Reply size
Every reply stays under about 15 KB: ts_market_movers returns at most 30 rows, ts_price_history 50 days, ts_index_history 100 days, ts_real_legal 10 days.
The order book is empty outside trading hours (Saturday to Wednesday mornings); other tools then show the last session.
Development
uv sync
uv run ruff check . && uv run ruff format --check .
uv run python -m pytest -q # offline unit tests
uv run python -m pytest -m live -q # calls tsetmc.com
uv build
Not affiliated with TSETMC. Data is informational and may be delayed; not financial advice. MIT license.
Metadata
Release files for tsetmc-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tsetmc_mcp-0.1.0.tar.gz | 368.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tsetmc_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 384.1 kB
Release files / tsetmc_mcp-0.1.0.tar.gz
| Download URL | tsetmc_mcp-0.1.0.tar.gz |
|---|---|
| Size | 368.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b6a845c8a8f0067d33f1f41f4eb31abf1cb7a2ab707b7662eeb02ec7dd54561
|
|
BLAKE2b-256 checksum How to use checksums |
464dd998d886cb2b4ab19c92bcd8958175b0bc57ae572fe8d723d6efea16e7ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 22, 2026.
Transparency logRelease files / tsetmc_mcp-0.1.0-py3-none-any.whl
| Download URL | tsetmc_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8e8d2b667c6c1774f5776063934c4a29cd54b692a4fbc6ef213d391a44fe877
|
|
BLAKE2b-256 checksum How to use checksums |
169bc83803158cb98287c33d7d1c0dd927c5e44f28b49c44dea3b96df66735ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 22, 2026.
Transparency logSecurity for tsetmc-mcp 0.1.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.
Attestation for tsetmc_mcp-0.1.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 Oct 22, 2026.
Transparency logA 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.