Skip to main content
Glama

ime-mcp

Read-only MCP server for Iran Mercantile Exchange (ime.co.ir). It exposes official public statistics and live board snapshots from IME endpoints (no third-party API keys).

Requirements

  • Python 3.11+

  • Internet access to www.ime.co.ir and cdn.ime.co.ir

Related MCP server: EODHD MCP Server

Install

cd /home/ali/Workspace/ime-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[test]"

With uv:

uv sync --extra test

Cursor configuration

Add to your MCP settings (.cursor/mcp.json or Cursor MCP UI):

{
  "mcpServers": {
    "ime": {
      "command": "uv",
      "args": ["--directory", "/home/ali/Workspace/ime-mcp", "run", "ime-mcp"]
    }
  }
}

If uv is not installed, use the venv interpreter:

{
  "mcpServers": {
    "ime": {
      "command": "/home/ali/Workspace/ime-mcp/.venv/bin/ime-mcp",
      "args": []
    }
  }
}

Tools

Tool

Description

list_markets

Markets covered and statistics page URLs

search_physical_trades

Physical market trades by date range

get_physical_trade

One physical row by id or symbol

search_offer_notices

Supply rows with no executed volume

get_physical_board

Live CDN board snapshot (TTS may need broker network)

search_futures_trades

Futures statistics

get_futures_contract

One futures contract

search_option_trades

Options statistics

get_option_contract

One option contract

get_derivatives_board

Live derivatives snapshot

search_certificate_trades

Commodity deposit certificates

search_salaf_trades

Standard parallel salaf

search_fund_trades

Commodity funds

get_financial_board

Live financial symbols on CDN board

Dates accept Jalali (1404-07-01) or Gregorian (2025-09-23).

Tests

pytest -m "not live"
pytest -m live

Data sources

License

MIT

Available Tools

14 tools
get_derivatives_boardC

Live snapshot of derivatives contracts from cdn.ime.co.ir marketshub.

Inputs: limit, offset, symbol. Returns: result

get_financial_boardC

Live snapshot filtered to financial-market style symbols on the CDN board.

Inputs: limit, offset, symbol. Returns: result

get_futures_contractC

Get futures contract statistics by contract code within a date range.

Inputs: start_date (required), contract_code (required), end_date. Returns: result

get_option_contractB

Get one option contract row by code within a date range.

Inputs: start_date (required), contract_code (required), end_date. Returns: result

get_physical_boardC

Snapshot of live contracts from IME CDN board (physical hall uses tts.ime.co.ir when accessible).

Inputs: limit, offset, symbol. Returns: result

get_physical_tradeB

Get one physical trade row by arzehPk id or symbol within a date range.

Inputs: trade_id (required), start_date (required), end_date. Returns: result

list_marketsB

List IME markets covered by this server and their statistics pages.

Inputs: no named parameters. Returns: result

search_certificate_tradesC

Search commodity deposit certificate trades (گواهی سپرده) from bazaremali statistics.

Inputs: start_date (required), limit, offset, symbol, +1 more. Returns: result

search_fund_tradesC

Search commodity fund trades from bazaremali statistics.

Inputs: start_date (required), limit, offset, symbol, +1 more. Returns: result

search_futures_tradesC

Search futures market statistics for a date range.

Inputs: start_date (required), limit, offset, symbol, +2 more. Returns: result

search_offer_noticesC

Search offering notices derived from physical statistics rows with supply and no executed volume.

Inputs: start_date (required), limit, offset, end_date. Returns: result

search_option_tradesC

Search option market statistics (call, put, or all).

Inputs: start_date (required), limit, offset, symbol, +3 more. Returns: result

search_physical_tradesC

Search physical market trade statistics (بازار فیزیکی) for a Jalali or Gregorian date range.

Inputs: start_date (required), limit, offset, symbol, +3 more. Returns: result

search_salaf_tradesC

Search standard parallel salaf trades (سلف استاندارد).

Inputs: start_date (required), limit, offset, symbol, +1 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 14 tools

    Disambiguation4/5

    The search_*_trades / get_*_contract pairing per market (physical, futures, options) is clearly differentiated by instrument, and offer notices stand apart. However, the three board tools (physical, derivatives, financial) plus the CDN-based snapshots overlap somewhat, and the several bazaremali-derived search tools (certificate, salaf, fund) could be confused at a glance.

    Naming Consistency5/5

    All names follow a clean snake_case verb_noun pattern (list_markets, search_physical_trades, get_futures_contract, get_financial_board). The search_/get_ prefix distinction is applied consistently and predictably across instrument types.

    Tool Count5/5

    14 tools is well within the ideal 3-15 range and each maps to a distinct market segment or board. No obvious padding, and the search/get/board trichotomy is proportionate to the exchange's breadth.

    Completeness4/5

    Coverage spans physical, futures, options, certificates, salaf, funds, offer notices, and live boards, which is broad for the domain. Minor gaps: single-row getters exist only for physical/futures/option, so fetching an individual certificate or salaf row requires search, but agents can work around this.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables querying real-time and historical financial market data for stocks, options, forex, and crypto, including quotes, trades, technical indicators, and reference data through a set of MCP tools.
      71
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables access to financial market data including EOD, intraday, fundamentals, news, and more via 75 read-only MCP tools.
      5
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Read-only MCP server for Tehran Stock Exchange (TSETMC) live market data and authenticated TSE portal pages, enabling quotes, order books, market watch, and session-safe page reads via natural language.
      11
      1
      MIT