
Iran Brokers Market Data
io.github.sepehr071由 GitHub 帳號 sepehr071 發布v0.2.0更新於 Nov 7, 2026
Read-only Iran broker data from Mofid and Agah: stocks, funds, options, bonds, gold, education.
概覽
唯讀 MCP 伺服器,讓助理透過 Mofid 與 Agah 兩家券商查詢德黑蘭證券交易所資料:股票、基金、選擇權、債券、黃金等。
- 可以做什麼
- 搜尋代碼,讀取股票或 ETF 詳細卡片、K 線與日線歷史
- 取得市場快照、指數、產業排名以及 Mofid 的 36 種市場排行
- 列出 ETF 與基金的價格與淨值對比,查看基金詳情、淨值歷史與多檔基金比較
- 讀取選擇權鏈與單一合約、債券、伊斯蘭債券與國庫券,以及匯率、金幣、黃金與商品價格
- 依任意欄位篩選股票、ETF 與基金,並讀取估值與技術評分
- 取得 Codal 公告、通知、新聞、研究報告 PDF 以及教學文章與課程
- 適用情境
- 適合使用者詢問伊朗市場的股票、基金、選擇權、指數、黃金或美元價格、排行榜或篩選、圖表、公司 Codal 公告,或想了解交易所運作方式時使用。不適合交易、查看持倉或現金,也不提供即時逐筆資料。
- 執行需求
- 透過 uvx(或 pip)以 stdio 在本機執行,需要 uv 與 Python 3.10 以上。不需要 API 金鑰或券商帳戶。選用環境變數 IRAN_BROKERS_MCP_PROXY 可設定一個 HTTP 代理網址或逗號分隔的清單;系統代理設定會被忽略。Agah Pedia 與 Academy 僅能在伊朗網路下使用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Iran Brokers Market Data,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
iran-brokers-mcp: Iranian broker (کارگزاری بورس) market data MCP server for AI agents
iran-brokers-mcp is an unofficial, read-only MCP server that lets an AI agent read Tehran Stock Exchange market data through two Iranian brokers, Mofid Securities (کارگزاری مفید, emofid.com) and Agah (کارگزاری آگاه, agah.com).
Its 22 tools cover stocks, ETFs and funds (صندوق سرمایهگذاری), options (آپشن), bonds and sukuk (اوراق), gold coins (سکه) and currency, screeners, Codal announcements and education articles, on Tehran Stock Exchange (بورس تهران) and Fara Bourse (فرابورس).
No API key or broker account is needed, and it works in Claude, Cursor, Copilot and any other MCP client.
[PyPI] [Python] [CI] [MCP Registry] [License: MIT]
[Install in VS Code] [Install in Cursor]
For AI agents · What it can do · Quick start · Tools · Limits · FAQ · فارسی
Last verified 2026-11-01 against the live Mofid and Agah APIs.
For AI agents
- What: unofficial MCP server (model context protocol) for Mofid and Agah: symbol search, stock cards, OHLC candles and daily history, market snapshot, 36 Mofid rankings, Agah market watch and screener, ETFs with price vs NAV, fund detail/history/comparison, options chain and contract, bonds and T-bills, currency/coin/gold/commodity prices and history, Codal filings, valuation scores, technical tally, education articles and courses.
- Install:
uvx iran-brokers-mcporclaude mcp add iran-brokers -- uvx iran-brokers-mcp. Transport: stdio. Needs uv (Python 3.10+). - Auth: none. Optional
IRAN_BROKERS_MCP_PROXY(one HTTP proxy URL for every request, or a comma-separated list); system proxy settings are ignored. - Access: read-only market data. It cannot log in, read a portfolio, cash or orders, place, edit or cancel orders, or pay. No confirmation is needed before calling any tool.
- Tools: 22, all prefixed
br_. Typical sequences:br_search->br_stock/br_history;br_market->br_market_toporbr_stocks;br_etfs->br_stockorbr_fund;br_screener;br_rates;br_announcements;br_learn->br_learn(ref=...). sourceargument: each source answers in its own block ({"mofid": ..., "agah": ...}). Withall, a source that fails shows{"error": ...}and the other still answers. Blocks are never blended into one row, because the fields differ.- Use when: the user asks for a stock, fund, option, index, gold or dollar price on the Iranian market, a ranking or screen, a chart, a company's Codal filings, or how something in the bourse works.
- Do not use when: the user wants to trade, see their own portfolio, or needs real-time tick data (everything here is a polled snapshot). For raw exchange data use tsetmc-mcp; for full financial statements use codal-mcp.
- Output: compact JSON. Prices are Rial (divide by 10 for Toman). Text Persian.
- Machine-readable:
server.jsonand the iran-mcp catalog.
What it can do
- Get Tehran Stock Exchange data in Claude: find a symbol, read its price card (P/E, EPS, NAV, buyer and seller flows, order book), candles from 1 minute to weekly, and the market snapshot with indices and movers
- Compare Iranian ETFs from an AI agent: list ETFs with price, NAV and the bubble gap (Mofid 375 ETFs, Agah 331 listed ETFs), then read one fund's detail, NAV history or compare several
- Read the options chain (call and put contracts) and one contract's detail
- Screen stocks, ETFs or funds on any column with the Agah screener, or use Mofid's 36 rankings (top gainers, value, queues and more)
- Bonds, sukuk and T-bills with yield, plus currency, crypto, coin (سکه), gold and commodity prices with history
- Codal announcements by company, type and date, plus notices, news and research PDFs
- Valuation and technical scores: theoretical price, fundamental and technical scores, indicator tally per stock or industry
- Education: Mofid blog, Agah Pedia articles and Agah Academy courses
- Read-only by design: no login, no orders, no captcha solving
Example prompts:
- "Get today's Tehran Stock Exchange summary: indices, top movers and the dollar and coin prices."
- "Compare Iranian ETFs by price versus NAV and show which trade at the biggest premium."
- "Show the options chain for Foolad and the details of one call contract."
- "Which stocks have the lowest P/E and a positive money flow this week?"
- قیمت و نسبت قیمت به NAV صندوقهای طلا را مقایسه کن.
- بیشترین صف خرید امروز بورس کدام نمادهاست؟
- آخرین اطلاعیههای کدال نماد فولاد را بیاور.
Quick start
You need uv. No API key or account.
Claude Code
Claude Desktop
Settings → Developer → Edit Config, then add:
Cursor
Click Install in Cursor above, or add the Claude Desktop block to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).
VS Code (Copilot agent mode)
Click Install in VS Code above, or add to .vscode/mcp.json:
Anything else
It is a standard stdio MCP server: run uvx iran-brokers-mcp, or pip install iran-brokers-mcp and run iran-brokers-mcp.
Tools
Merged tools take source: mofid, agah or all (the default is in brackets). Single-source tools say which broker they use.
Every tool is read-only. If you used the separate mofid-mcp or agah-mcp servers: mf_search and ag_search -> br_search; mf_symbol, mf_depth, ag_stock -> br_stock; mf_history, ag_stock_history -> br_history; mf_market_summary, ag_market_pulse, ag_market_overview -> br_market; mf_industries, ag_industries -> br_industries; mf_index, ag_index_history -> br_index; mf_etfs -> br_etfs; mf_learn, mf_learn_categories, ag_articles, ag_article, ag_academy -> br_learn; mf_fx_gold, mf_rate_history -> br_rates; ag_fund, ag_fund_trend, ag_fund_compare -> br_fund; ag_options, ag_option -> br_options; the others keep their name with the br_ prefix (mf_quote -> br_quotes).
Limits
- No portfolio, orders or cash. Those need a broker login (EasyTrader, AsaTrader); nothing here logs in or can place an order, and this is not built.
- Agah Pedia and Academy answer only from an Iranian network (
pediaapi.agah.com,academyapi.agah.comtime out from abroad). The error says so; the Mofid side ofbr_learnstill answers. Do not put a foreign proxy in front of them. - Mofid depends on the
accept-infoheader of the Bourse View gateway (derived from the server clock; the client resyncs on a 401). If the site changes that check, Mofid tools fail with an HTTP 401 error and the Agah side keeps working. - Data is polled snapshots, cached 30 to 60 seconds, delayed or unaudited; the market trades Saturday to Wednesday about 09:00-12:30 Tehran time.
- The two sources use different ids for funds (Mofid ISIN, Agah national code like
14010557380_A01) and different fields, so merged tools show them side by side. - Prices are Rial; divide by 10 for Toman. Dates follow each site.
FAQ
How do I get Tehran Stock Exchange data in Claude?
Add iran-brokers-mcp with claude mcp add iran-brokers -- uvx iran-brokers-mcp, then ask in plain language. The agent finds the symbol with br_search, reads it with br_stock or br_history, and gets the market overview from br_market.
How can I compare Iranian ETFs and funds with an AI agent?
Use br_etfs for the list with price, NAV and gap (bubble), br_fund for one fund's detail, NAV history or a side-by-side comparison, and br_screener to filter funds on any column.
Is there an API for Mofid or Agah market data?
Neither broker documents a public API. This server calls the same public JSON the websites use, without login, and returns compact JSON.
Can it place orders or show my portfolio?
No. It is read-only and has no login. Portfolio, cash and orders need your broker account and are not built.
Does it work outside Iran?
Yes for Mofid and Agah Research. Agah Pedia and Academy answer only from an Iranian network. Set IRAN_BROKERS_MCP_PROXY to route through a proxy; do not use a foreign one for Pedia and Academy.
Is it allowed?
It calls the public endpoints the websites use, two requests at a time per broker and with caching, and each client sends the headers its site's web app sends (Chrome TLS fingerprint, Referer, Accept, Mofid's accept-info).
How is it different from tsetmc-mcp and codal-mcp?
tsetmc-mcp and codal-mcp read the exchange and Codal directly; this server reads the brokers' own views of the same market (rankings, screeners, NAV gaps, options, education).
Is the data real time? Is it investment advice?
No to both. Data is polled snapshots cached for 30 to 60 seconds. Nothing it returns is financial advice.
Configuration
فارسی: سرور MCP کارگزاریهای مفید و آگاه برای دستیار هوش مصنوعی
پروژه iran-brokers-mcp یک سرور MCP غیررسمی و فقطخواندنی است که دادههای عمومی بازار سرمایه را از دو کارگزاری، کارگزاری مفید (emofid.com) و کارگزاری آگاه (agah.com)، در اختیار دستیار هوش مصنوعی (Claude، Cursor، Copilot و ...) میگذارد.
چه کارهایی میکند
- سهام بورس تهران و فرابورس: جستجوی نماد، کارت قیمت، کندل، تاریخچه روزانه، خلاصه بازار و شاخصها.
- صندوقهای سرمایهگذاری و ETF: قیمت، NAV، حباب، تاریخچه و مقایسه صندوقها.
- اوراق و آپشن: اوراق بدهی، صکوک، اوراق خزانه با بازده؛ زنجیره آپشن و جزئیات هر قرارداد.
- سکه، طلا و ارز: قیمت و تاریخچه.
- غربالگر و رتبهبندی: ۳۶ رتبهبندی مفید و غربالگر آگاه روی هر ستون.
- اطلاعیههای کدال، خبر و آموزش: مقالهها و دورههای مفید و آگاه.
نکتهها
- فقطخواندنی است: ورود به حساب، سبد دارایی، موجودی و ثبت سفارش ندارد.
- پدیا و آکادمی آگاه فقط از اینترنت ایران جواب میدهد.
- دادهها لحظهای نیست و هر ۳۰ تا ۶۰ ثانیه تازه میشود. مبلغها ریال است. توصیه سرمایهگذاری نیست.
- کلید API لازم نیست و سرور روی سیستم خود شما اجرا میشود.
نصب (اول uv را نصب کنید). در Claude Code:
Development
Releases: bump the version in pyproject.toml and server.json, then push a v* tag. GitHub Actions publishes to PyPI. Issues and PRs are welcome.
Related servers
- tsetmc-mcp for Tehran Stock Exchange prices, order book, real vs legal trading and indices
- codal-mcp for Codal disclosures and financial statements
- iran-gold-mcp for live 18k gold prices on Iranian platforms
- iran-mcp: catalog of all Iranian-service MCP servers
Disclaimer
Unofficial and not affiliated with or endorsed by Mofid Securities or Agah. It is read-only and uses the public endpoints of their websites, which can change without notice. Data is informational, delayed and unaudited. Nothing here is investment 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
來源:README.md,提交 046473b
工具
0版本歷史
3- v0.2.0最新Nov 7, 2026
- v0.1.2Nov 3, 2026
- v0.1.1Nov 1, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分