Pakistan Stock Exchange in plain English β quotes, dividends, announcements, and indices.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
mcp-name: io.github.revolutionarybukhari/psx-mcp
Talk to the Pakistan Stock Exchange in plain English.
psx-mcp is a Model Context Protocol server that exposes PSX market data β quotes, dividends, announcements, indices β as tools any MCP-compatible AI client can call. Connect it to Claude Desktop, Cursor, ChatGPT, or your own agent, and ask questions like:
"What are the upcoming dividends on PSX with payouts above 100%?"
"Should I buy MEBL today to collect the dividend?"
"Pull recent announcements for OGDC and summarize anything material."
"How has FFC's dividend history looked over the past 5 years?"
The LLM picks the right tools automatically and answers in your language.
Existing PSX tools are libraries β you import them, write code, get data. MCP servers are tools an LLM calls for you. You ask in English, the model invokes get_quote, get_upcoming_dividends, get_dividend_history, and synthesizes an answer. No Python required for the end user.
This is also the first PSX MCP server published. If you're building agents, financial copilots, or AI-augmented research workflows for Pakistani markets, this gives them eyes.
| Tool | What it does |
|---|---|
get_quote(symbol) | Current price snapshot for a symbol |
get_upcoming_dividends(symbol?) | Payouts table, optionally filtered, with computed buy deadlines |
get_buy_deadline(symbol) | Last day to buy and still collect the dividend (T+2 settlement) |
get_dividend_history(symbol, years) | Historical payouts |
get_announcements(symbol?, limit) | Recent corporate filings + PDF links |
search_symbols(query) | Fuzzy match company names β tickers |
get_indices() | KSE100, KSE30, KMI30, ALLSHR, PSXDIV20, etc. |
get_market_status() | Is PSX open right now? When does it open next? |
screen_dividend_stocks(min_payout_pct) | Filter upcoming dividends by payout size |
psx://market-statuspsx://indicespsx://upcoming-dividendsanalyze_dividend_play(symbol) β full dividend-trade analysisportfolio_review(symbols) β review a holdings listfind_dividend_opportunities(min_payout_pct) β screener + per-name analysisRequires Python 3.10+.
Edit your Claude Desktop config:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonRestart Claude Desktop. You should see the PSX tools listed in the connection icon. Try:
"What dividends are coming up this week on PSX?"
Settings β MCP β add server:
For shared/team use or hosted agents:
The server is then reachable at http://localhost:8000/mcp. Test it with the MCP Inspector:
Once connected:
Tools call the public PSX Data Portal, parse HTML with BeautifulSoup, normalize into structured JSON, and return to the LLM. No keys, no auth, no scraping headaches for the consumer.
httpx.AsyncClient so MCP calls don't block.search_symbols fast.BC_From β 2 trading days, skipping weekends and configurable holidays in dividend_calc.PSX_HOLIDAYS_2026.This is one server in a wider PSX open-source toolkit:
psx-dividend-alert β proactive Telegram alerts for upcoming dividendspsx-cgt-calculator β Pakistan capital-gains-tax with FIFO lotspsx-zakat-calculator β zakat on stock holdings (zakatable assets method)psx-broker-statement-parser β normalize KTrade/AKD/JS Global PDFspsx-announcements-summarizer β LLM-powered summaries of every PSX filingThe MCP server makes all of these LLM-callable. Pair them and you have a complete conversational PSX research stack.
PSX_HOLIDAYS_2026 in dividend_calc.py once PSX publishes the annual calendar. Without it, the buy-deadline math correctly skips weekends but will be off during Eid/Independence Day weeks.marketdatarequest@psx.com.pk if you need one.scraper.py, expose it in server.py with @mcp.tool(), add a docstring (the docstring becomes the LLM's tool description β make it clear).tests/. The MCP SDK supports in-memory testing.MIT. See LICENSE.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/psx-mcp)<a href="https://allmcps.com/mcp/psx-mcp"><img src="https://allmcps.com/api/badge/psx-mcp?style=directory" alt="PSX MCP on AllMCPs" /></a>