Skip to main content
Glama
sepehr071

tsetmc-mcp

by sepehr071

tsetmc-mcp: Tehran Stock Exchange MCP server for AI agents

Let your AI agent read the Tehran Stock Exchange (بورس تهران). An unofficial, read-only MCP server for TSETMC, the data portal of the Tehran Stock Exchange and Iran Fara Bourse: quotes, top movers, order book, daily history, real vs legal trading and market indices, from Claude, Cursor or Copilot.

PyPI Python CI MCP Registry License: MIT

Install in VS Code

For AI agents · Quick start · What it can do · Tools · FAQ · فارسی


For AI agents

  • What: unofficial MCP server (model context protocol) for tsetmc.com, the Tehran Stock Exchange and Iran Fara Bourse market data. Symbol search takes Persian names (Arabic ي/ك are accepted).

  • Install: uvx tsetmc-mcp or claude mcp add tsetmc -- uvx tsetmc-mcp. Transport: stdio. Needs uv (Python 3.10+).

  • Auth: none, no API key or account. Optional TSETMC_MCP_PROXY (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.

  • Access: read-only. It cannot log in, trade or place orders, 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. If you only have a name, call ts_search_symbols first and pass its symbol or ins_code to the other tools.

  • Use when: the user asks about Tehran Stock Exchange or Fara Bourse prices, movers, sector indices, order book or real vs legal money flow.

  • Do not use when: the user wants to trade, needs fundamentals or Codal filings, or asks about other exchanges.

  • Output: compact JSON. Prices in Rial (Toman = Rial / 10), volumes in shares, dates Gregorian (YYYY-MM-DD).

  • Network: tsetmc.com answers only some networks. On HTTP 403, try an Iranian connection or set TSETMC_MCP_PROXY.

  • Machine-readable: server.json and the iran-mcp catalog.

Related MCP server: Financial Modeling Prep MCP Server

Why

TSETMC is the place Iranian traders look at, but it is a heavy web page built for human eyes. Asking "which sectors are up today, which stocks hit the daily limit, and are individual investors buying or selling Foolad?" means opening several screens. With tsetmc-mcp an agent answers it in a few calls and returns a short summary instead of tables of raw numbers.

You: How is the market today, and what are the biggest gainers?

Agent: calls ts_indices(limit=5) -> ts_market_movers(market="bourse", sort_by="gain", limit=5)

It reads the total index, the market state and the strongest sector indices, then lists the top gainers with their last price, change and whether they are stuck at the upper price limit.

Every reply is trimmed to stay under about 15 KB, so it does not flood the agent's context.

What it can do

  • Look up any share, fund, rights issue or bond on the Tehran Stock Exchange or Iran Fara Bourse by ticker or name

  • Quote one instrument: last trade, closing price, daily range, volume, trades, value, allowed price range, week and year range, shares outstanding and market cap

  • Rank movers of Bourse, Fara Bourse, rights or bonds by gain, loss, volume, value or trade count, with a flag for prices at the daily limit

  • Read the order book: best five bid and ask levels with price, volume and order count, including buy and sell queues

  • Pull daily history: open, high, low, close, volume, trades and value for up to 50 trading days

  • Track real vs legal trading (حقیقی و حقوقی): buy and sell volume, value and counts per day, plus net individual volume

  • Scan indices: the total index, equal-weight index, market state and every sector index, and up to 100 days of any index's history

  • Read-only by design: no login, no orders

Example prompts:

  • "Which TSE sectors are leading today?"

  • "Top 10 Fara Bourse stocks by traded value."

  • "Show the order book for فولاد."

  • "Last 20 trading days of وبملت, and did individual investors buy or sell over the last 3 days?"

  • "How has the total index moved over the last 30 days?"

  • شاخص کل امروز چقدر تغییر کرده و کدام صنعت‌ها بیشترین رشد را داشتند؟

  • ورود و خروج پول حقیقی فولاد در سه روز اخیر چطور بوده؟

  • بیشترین حجم معاملات امروز فرابورس مربوط به کدام نمادهاست؟

Quick start

You need uv. No API key or account.

claude mcp add tsetmc -- uvx tsetmc-mcp

Settings → Developer → Edit Config, then add:

{
  "mcpServers": {
    "tsetmc": { "command": "uvx", "args": ["tsetmc-mcp"] }
  }
}

Add the Claude Desktop block above to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).

Click Install in VS Code above, or add to .vscode/mcp.json:

{
  "servers": {
    "tsetmc": { "type": "stdio", "command": "uvx", "args": ["tsetmc-mcp"] }
  }
}
codex mcp add tsetmc -- uvx tsetmc-mcp

Or in ~/.codex/config.toml:

[mcp_servers.tsetmc]
command = "uvx"
args = ["tsetmc-mcp"]

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "tsetmc": { "command": "uvx", "args": ["tsetmc-mcp"] }
  }
}

Add the Claude Desktop block to ~/.codeium/windsurf/mcp_config.json.

It is a standard stdio MCP server: run uvx tsetmc-mcp, or pip install tsetmc-mcp and run tsetmc-mcp.

Tools

Pass a ticker (فولاد), an exact name, or a numeric ins_code as symbol. Index tools take an index name such as شاخص کل.

Tool

What it does

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

All 8 tools are annotated readOnlyHint: true.

How it works

  AI agent  (Claude, Cursor, Copilot, ...)
      │
      │  MCP over stdio
      ▼
  tsetmc-mcp  (runs on your machine)
      │
      │  HTTPS
      └──────▶  cdn.tsetmc.com   quotes, market watch, order book, indices

tsetmc-mcp runs locally and calls the same endpoints the tsetmc.com site uses. It has no hosted server in between and no API key. The TSETMC API is undocumented and blocks plain HTTP clients, so requests go out through a Chrome-impersonating client. It sends at most 2 requests at a time with a little jitter, keeps answers for 15 seconds, retries a failed GET up to twice, and only talks to cdn.tsetmc.com. It only reads.

Good to know

  • Prices are in Rial, as TSETMC quotes them. Divide by 10 for Toman. Volumes are in shares.

  • Prices are not adjusted for capital increases or dividends, so long histories can show jumps.

  • last vs close: last is the last trade, close the closing (volume-weighted) price; change_pct compares last with yesterday's close.

  • Trading hours: the market trades Saturday to Wednesday, in the morning. Outside those hours the order book is empty and other tools show the last session.

  • Network: tsetmc.com blocks some networks with HTTP 403. It worked from an Iranian line; a foreign exit may or may not be accepted. If you get 403, set TSETMC_MCP_PROXY to an HTTP proxy with an Iranian exit. System proxy variables are ignored on purpose.

  • Reply caps: ts_market_movers returns at most 30 rows, ts_price_history 50 days, ts_index_history 100 days, ts_real_legal 10 days, ts_indices 60 indices.

  • ts_real_legal makes one upstream call per day, so ask for few days. Days with no data are listed under unavailable_dates.

  • Movers cover four markets: bourse, farabourse, rights and bonds. Only instruments that traded today are ranked.

  • Names: Arabic ي/ك and Persian ی/ک both match, and answers use the Persian forms. An ambiguous name returns an error listing candidates; pass the exact ticker or ins_code.

  • What it does not do: no trading or orders, no company fundamentals or Codal filings, no options or futures movers, no adjusted prices, no Jalali dates. Rate limits of TSETMC are unknown, so keep requests reasonable.

FAQ

TSETMC has no documented public API. tsetmc-mcp is an unofficial MCP server with 8 read-only tools that calls the same endpoints the tsetmc.com web app uses and returns compact JSON for AI agents.

Yes. ts_market_movers accepts market="farabourse", and ts_search_symbols finds Fara Bourse instruments; each match shows its market.

Add the server with claude mcp add tsetmc -- uvx tsetmc-mcp, or use the matching config in Quick start, then ask in plain language, in Persian or English.

Rial. Every tool reports unit: "rial" where it returns prices. Divide by 10 for Toman.

The order book is only open while the market is. TSETMC trades Saturday to Wednesday mornings; after the close, or for an instrument that did not trade today, ts_order_book returns no levels and a note.

tsetmc.com blocks some networks. Try from an Iranian connection, or set TSETMC_MCP_PROXY to an HTTP proxy with an Iranian exit. Plain curl is always refused because the site checks the TLS fingerprint; the server handles that itself.

No. It has no login and no trading calls, it only reads public market data. Nothing it returns is financial advice.

It is what TSETMC serves, kept for up to 15 seconds in a local cache, and it may be delayed. Check the date and time fields in a quote for the moment of the last trade.

npx @modelcontextprotocol/inspector uvx tsetmc-mcp

Configuration

Variable

Default

Meaning

TSETMC_MCP_PROXY

unset

Optional HTTP proxy URL for tsetmc.com requests; system proxy settings are ignored. A comma-separated list is used one at a time: the next proxy takes over when one is blocked or cannot connect

فارسی: سرور MCP بورس تهران (TSETMC)

tsetmc-mcp یک سرور MCP غیررسمی و فقط‌خواندنی برای سامانه TSETMC (مدیریت فناوری بورس تهران) است. این سرور به دستیار هوش مصنوعی شما (Claude، Cursor، Copilot و ...) اجازه می‌دهد قیمت نماد، شاخص کل، دفتر سفارش و آمار معاملات بورس تهران و فرابورس را بخواند.

چه کارهایی می‌کند

  • جستجوی نماد سهام، صندوق، حق تقدم و اوراق (با نام یا نماد فارسی؛ «ي» و «ك» عربی هم پذیرفته می‌شود).

  • قیمت لحظه‌ای نماد: آخرین معامله، قیمت پایانی، بازه روز، حجم، ارزش، بازه مجاز قیمت و ارزش بازار.

  • پرمعامله‌ها و بیشترین رشد و افت در بورس، فرابورس، حق تقدم و اوراق، با نشانه صف خرید یا فروش (قیمت در سقف یا کف مجاز).

  • دفتر سفارش با ۵ سطح بهترین خرید و فروش.

  • تاریخچه روزانه قیمت تا ۵۰ روز معاملاتی (قیمت‌ها تعدیل نشده‌اند).

  • حقیقی و حقوقی: حجم و ارزش خرید و فروش و تعداد خریدار و فروشنده به تفکیک حقیقی و حقوقی، تا ۱۰ روز.

  • شاخص‌ها: شاخص کل، شاخص هم‌وزن، وضعیت بازار و شاخص همه صنعت‌ها، و تاریخچه تا ۱۰۰ روز.

نکته‌ها

  • فقط خواندنی است: وارد حساب نمی‌شود و سفارش ثبت نمی‌کند. توصیه سرمایه‌گذاری نیست.

  • قیمت‌ها به ریال است؛ برای تومان تقسیم بر ۱۰ کنید. تاریخ‌ها میلادی هستند.

  • بازار شنبه تا چهارشنبه، صبح‌ها باز است؛ بعد از بسته شدن بازار دفتر سفارش خالی است.

  • اگر سایت خطای ۴۰۳ داد، از اینترنت ایران استفاده کنید یا متغیر TSETMC_MCP_PROXY را روی یک پراکسی HTTP با خروجی ایران بگذارید.

  • کلید API لازم نیست و روی سیستم خود شما اجرا می‌شود.

نصب (اول uv را نصب کنید). در Claude Code:

claude mcp add tsetmc -- uvx tsetmc-mcp

در Claude Desktop، Cursor و بقیه برنامه‌ها همان تنظیم بخش Quick start را بگذارید.

نمونه پرسش‌ها

  • «شاخص کل امروز چقدر تغییر کرده و کدام صنعت‌ها جلوتر هستند؟»

  • «دفتر سفارش فولاد را نشان بده.»

  • «پرمعامله‌ترین نمادهای فرابورس امروز کدام‌اند؟»

  • «ورود و خروج پول حقیقی وبملت در ۵ روز اخیر چطور بوده؟»

  • «تاریخچه ۳۰ روزه شاخص کل را بده.»

Development

git clone https://github.com/sepehr071/tsetmc-mcp && cd tsetmc-mcp
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

All tools live in src/tsetmc_mcp/markets.py; each is a typed async function with a docstring that tells the agent when to use it. Issues and PRs are welcome.

Releases: bump the version in pyproject.toml and server.json, then push a v* tag. GitHub Actions publishes to PyPI.

Disclaimer

Unofficial and not affiliated with or endorsed by TSETMC or the Tehran Securities Exchange Technology Management Co. It is read-only and uses the endpoints of the tsetmc.com web app, which can change without notice. Data is informational and may be delayed. Nothing here is financial advice.

Author

Built and maintained by Sepehr Radmard (سپهر رادمرد). Connect on LinkedIn or follow @sepehr071 on GitHub for more MCP servers for Iranian websites, all listed in iran-mcp. If this saves you time, a star on the repo helps other people find it.

License

MIT

Available Tools

8 tools
ts_get_quoteStock quoteA
Read-onlyIdempotent

Latest price, daily range, volume and key facts of one instrument on the Tehran Stock Exchange.

last is the last trade, close the closing (volume-weighted) price; change_pct is last vs yesterday's close. Prices are in Rial. Use ts_order_book for bids and asks, ts_price_history for earlier days.

NameRequiredDescriptionDefault
symbolYesTicker or exact name, e.g. 'فولاد', 'وبملت', or a numeric ins_code.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this as read-only, idempotent and non-destructive. The description adds useful domain context: price field meanings, volume-weighted close, and Rial currency. It stops short of discussing market-session timing or stale-data caveats, but it adds enough beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, then adds field semantics and sibling routing in a compact block. Every sentence contributes useful information with no repetition or padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter quote tool with rich annotations and no output schema, the description gives enough context to call it correctly: it explains the main return fields, the currency, and where to go for related data. No critical details are missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single symbol parameter is fully described with examples in the schema. The description does not add further parameter semantics beyond what the schema already provides, so it meets the baseline for a fully documented parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: latest price, daily range, volume and key facts for one TSE instrument. It also names sibling tools for adjacent tasks, so an agent can distinguish this quote lookup from order-book and historical-data tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly routes the agent to ts_order_book for bids/asks and ts_price_history for earlier days. It does not mention ts_market_movers or ts_search_symbols, leaving some sibling selection implicit, but the main alternatives are clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ts_index_historyIndex historyA
Read-onlyIdempotent

Daily close, high, low and percent change of a TSE index (total, equal-weight, sector...), newest first.

Find index names with ts_indices.

NameRequiredDescriptionDefault
daysNoLatest trading days to return (1-100).
indexNoIndex name or part of it (default total index), e.g. 'شاخص کل', 'بانک', 'خودرو', or a numeric ins_code.شاخص کل

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context: the return shape (close, high, low, percent change) and the ordering (newest first), which an agent needs to interpret results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: the return payload and ordering come first, the lookup helper second. No filler, and the most decision-relevant information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read-only history tool with full schema coverage and no output schema, the description covers purpose, output fields, ordering, and the name-resolution path. Nothing essential is missing, though a note on grain (daily bars) versus sibling tools could sharpen it further.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented with ranges and defaults. The description adds only that indices may be total, equal-weight, or sector-based, which slightly clarifies the domain of the 'index' argument but adds nothing about 'days'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb set (returns daily close, high, low and percent change) for a specific resource (a TSE index), and explicitly scopes the index universe (total, equal-weight, sector). This clearly separates it from ts_price_history (per-symbol prices) and ts_indices (name lookup).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent to ts_indices when the index name is unknown, which is the main prerequisite for calling this tool. It does not state when-not to use it (e.g. versus ts_price_history for equities), so it stops short of full alternative coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ts_indicesMarket indicesA
Read-onlyIdempotent

TSE total index, market state and trading totals, plus every sector and market index with its change.

Use to see which sectors lead or lag today. Pass an index name to ts_index_history for its past values.

NameRequiredDescriptionDefault
limitNoMax indices, strongest change first.
queryNoOptional part of an index name, e.g. 'بانک', 'خودرو', 'شاخص کل', 'هم وزن'. Omit for all.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered structurally. The description adds only the 'today' currency framing; it says nothing about result size, pagination, or what market state/trading totals actually contain. Adequate but thin given annotations carry most of the burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both front-loaded with the highest-value information: what it returns, then when to use it and where to go for history. No filler or restatement of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter, zero-required, read-only listing tool with no output schema, the description covers purpose, scope and sibling routing sufficiently to invoke correctly. Only minor gaps remain around result volume and the meaning of 'market state'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% – both `limit` ('max indices, strongest change first') and `query` (with Persian example fragments) are well documented in the schema. The description adds no parameter detail of its own, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the specific resource and its contents precisely: TSE total index, market state, trading totals, and every sector/market index with its change. It is clearly distinguishable from ts_index_history, though the verb is implicit (it describes the payload rather than saying 'lists'/'returns').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit use case ('Use to see which sectors lead or lag today') and routes the agent to the correct sibling for historical values ('Pass an index name to ts_index_history for its past values'). It does not address overlap with other siblings like ts_market_movers, so it stops short of full when-not-to-use coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ts_market_moversMarket moversA
Read-onlyIdempotent

Top traded instruments of a market today, ranked by gain, loss, volume, value or trade count.

Only instruments that traded are listed. limit_up/limit_down marks a price stuck at its daily limit. Prices are in Rial. Pass a row's symbol to ts_get_quote or ts_order_book.

NameRequiredDescriptionDefault
limitNoMax rows (30 keeps the reply under 15 KB).
marketNobourse = Tehran Stock Exchange shares, farabourse = Iran Fara Bourse shares, rights = rights issues, bonds.bourse
sort_byNogain/loss = biggest last-trade change vs yesterday, volume = shares traded, value = Rial traded, trades = trade count.gain

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint/idempotentHint, so safety is covered. The description adds genuine domain context the annotations can't: only instruments that traded are listed, limit_up/limit_down flags mark a price stuck at its daily limit, and prices are denominated in Rial. It doesn't mention ordering/page behavior beyond limit, but the added semantics are substantive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the core purpose, followed by the traded-only constraint, the limit flag semantics, currency units, and the sibling hand-off. No filler or repetition of schema fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies exactly the row-level semantics an agent needs (traded-only listing, limit_up/limit_down flags, Rial pricing) and tells it how to drill down via siblings. A note on row ordering/pagination or the columns returned would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already defines limit, market enum values, and sort_by semantics. The description's phrase 'ranked by gain, loss, volume, value or trade count' restates the sort_by enum without adding format or constraint detail, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Top traded instruments of a market today') plus the ranking dimensions, so the agent knows this is a ranked leaderboard endpoint. Sibling tools like ts_indices and ts_price_history cover different resources, and the description's 'top traded instruments of a market' scope is clearly distinct from a single-symbol quote lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the discovery use case and explicitly routes follow-up work: 'Pass a row's `symbol` to ts_get_quote or ts_order_book.' It doesn't state when NOT to use this (e.g. use ts_price_history for a time series), but the context is clear enough for correct selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ts_order_bookOrder bookA
Read-onlyIdempotent

Best five bid and ask levels (price, volume, order count) of one instrument.

Empty outside trading hours. A level with ask price 0 means a buy queue (no sellers), bid price 0 a sell queue. Prices are in Rial.

NameRequiredDescriptionDefault
symbolYesTicker or exact name, e.g. 'فولاد', or a numeric ins_code.

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly, idempotent and non-destructive semantics, so the description earns credit for the operational details it adds: empty results outside trading hours, the meaning of a zero ask price (buy queue) and a zero bid price (sell queue), and that prices are denominated in Rial. These are exactly the quirks that would otherwise be misread by an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences with no filler: the primary capability first, then the empty-result caveat, then the edge case decoding and the currency unit. Slightly terse, but every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool with full schema coverage and no output schema, the description covers the return shape (five levels, with price, volume, order count), edge-case values and units. What is missing is how much the depth view differs from the quote tool and whether the response includes timestamps or ordering guarantees, but the essentials are present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the symbol parameter is fully documented with accepted forms (ticker, exact name such as 'فولاد', or numeric ins_code), so the schema carries the burden. The description adds no further meaning about the parameter, which is the baseline for a fully documented single-param schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource precisely: the five best bid/ask levels of one instrument, including the fields returned (price, volume, order count). It does not explicitly distinguish itself from the obvious sibling ts_get_quote, so an agent must infer that this is the depth view versus the top-of-book view.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance and no sibling is named as an alternative. The note that the book is empty outside trading hours is useful context about when the call returns nothing, but it is still only implied usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ts_price_historyDaily price historyA
Read-onlyIdempotent

Daily open, high, low, close, volume, trades and value of one instrument for its latest trading days, newest first.

Prices are in Rial and not adjusted for capital increases or dividends; dates are Gregorian.

NameRequiredDescriptionDefault
daysNoLatest trading days to return (50 keeps the reply under 15 KB).
symbolYesTicker or exact name, e.g. 'فولاد', or a numeric ins_code.

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only, idempotent, non-destructive behavior, so the description focuses on what the data means. It adds real context beyond them: prices are in Rial, unadjusted for capital increases or dividends, and dates are Gregorian, and ordering is newest-first. It does not cover rate limits or failure behavior, but those are secondary for a read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with zero waste: returned fields and ordering first, then the units, adjustment, and calendar caveats. Every clause carries information an agent cannot get from the structured fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the right job of enumerating the returned fields (open, high, low, close, volume, trades, value), their units, and ordering. It does not say what a response looks like structurally or what happens for an invalid or delisted symbol, which keeps it short of a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both symbol and days are already documented in the schema, including the 15 KB reply size rationale for the 50-day cap. The description's 'latest trading days, newest first' restates the days semantics without adding syntax or format detail. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-and-resource: returns daily OHLCV plus trades and value for one instrument. It implies single-instrument scope, which distinguishes it from ts_index_history and ts_market_movers, but never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'for its latest trading days, newest first' implies a historical-series use case, but there is no explicit guidance on when to choose this over ts_get_quote (latest snapshot) or ts_index_history (indices). The choice is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ts_search_symbolsSearch symbolsA
Read-onlyIdempotent

Find Tehran Stock Exchange instruments (shares, funds, rights, bonds) by ticker or name.

Use first when you only have a name. Pass a result's symbol (or ins_code) to the other ts_ tools. An empty list means no match: retry with a shorter name or the other spelling.

NameRequiredDescriptionDefault
limitNoMax matches (1-30).
queryYesTicker or company name, Persian (Arabic ي/ك accepted), e.g. 'فولاد', 'خودرو', 'بانک ملت'.

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely useful beyond-annotation context: what an empty list means and how to recover, plus the Persian spelling tolerance. It does not mention ranking/ordering of matches or pagination beyond the limit param.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short, front-loaded blocks: what it finds, when to use it and what to do with the result, and what an empty result means. No filler sentences; each one carries distinct operational guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by naming the returned identifiers used by downstream tools and by interpreting the empty-result case. For a 2-parameter read-only search, an agent has everything needed to call it and to handle the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description goes slightly beyond by framing `query` as either ticker or name and by naming the result fields (`symbol`, `ins_code`) an agent will need downstream. That output-mapping context is not in the input schema and is the main added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Find Tehran Stock Exchange instruments') and enumerates what can be found (shares, funds, rights, bonds) plus the matching keys (ticker or name). An agent can tell this apart from siblings like ts_get_quote, which need an already-resolved symbol.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use first when you only have a name' and directs the agent to pass the result's `symbol` or `ins_code` into the other ts_ tools, which is a clear routing rule to siblings. It also prescribes recovery behavior on an empty result ('retry with a shorter name or the other spelling').

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.

  1. 8 tool updatesv0.1.1
    • First observedts_get_quote
    • First observedts_index_history
    • First observedts_indices
    • First observedts_market_movers
    • First observedts_order_book
    • First observedts_price_history
    • First observedts_real_legal
    • First observedts_search_symbols

TDQS

A4.1/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct data shape: symbol search, single-instrument quote, market leaderboard, order book, daily history, real/legal flow split, index snapshot, and index history. Descriptions explicitly cross-reference each other (e.g. ts_get_quote defers to ts_order_book and ts_price_history), leaving no meaningful overlap.

Naming Consistency4/5

All names share the ts_ prefix and snake_case, which is highly predictable. However, only ts_search_symbols and ts_get_quote use a verb_noun form; the rest are bare resource nouns (ts_order_book, ts_price_history, ts_indices), so the verb convention is not uniform.

Tool Count5/5

Eight tools is well-scoped for a market-data server, with one tool per core data need (search, quote, movers, order book, history, flows, indices). No tool appears redundant or padded.

Completeness4/5

The surface covers the main read paths: discovery, pricing, order book, historical series, retail/institutional flow, and index tracking, with clear handoffs between tools. Gaps are minor but real: no intraday/time-and-sales data, no fundamentals or shareholder info, and no market-wide history beyond indices.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights through 250+ tools covering stocks, ETFs, crypto, forex, commodities, and economics.
    601 npm
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights through 250+ tools covering stocks, ETFs, crypto, forex, commodities, and economics.
    601 npm
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights through 250+ tools spanning stocks, ETFs, crypto, forex, commodities, economics, and more.
    601 npm
    Apache 2.0