# PSX MCP

Connect an AI agent to Pakistan Stock Exchange data for quotes, dividends, company announcements, and market indices.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: revolutionarybukhari
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/revolutionarybukhari/psx-mcp
- Updated: 2026-05-03
- HTML: https://affpapa.org/en/nevibecode/mcp/psx-mcp

## What it does

PSX MCP gives an agent tools to retrieve a stock’s current quote, dividend history and upcoming payouts, the last day to buy for a dividend, company announcements, and market indices. It can also match company names to tickers and report whether the exchange is open. The agent selects a tool for the request and turns its result into an answer.

The server fetches pages from the public PSX Data Portal, parses their HTML with BeautifulSoup, and returns structured data. Python 3.10+ is required; the `uvx` setup runs the `psx-mcp` package. Data arrives with an approximately five-minute delay, and the server is read-only: it cannot place orders.

Dividend deadlines account for two trading days before the record date and skip weekends. The holiday list in `PSX_HOLIDAYS_2026` needs updating, so deadline calculations can be off during holiday weeks.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add psx-mcp -- uvx psx-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from psx-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add psx-mcp -- uvx psx-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from psx-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "psx-mcp": {
            "command": "uvx",
            "args": [
                "psx-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from psx-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "psx-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "psx-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from psx-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add psx-mcp uvx psx-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from psx-mcp <command>

## When to use it
- check a PSX stock’s current quote
- find upcoming payouts and the last day to buy for a dividend
- match a company name to its ticker
- retrieve recent company filings and PDF links
- check market indices and whether trading is open

## Example prompts
- Look up MEBL’s quote and explain what stock data is available.
- Check upcoming dividends for OGDC and tell me the last eligible buy date.
- Find recent FFC announcements and summarize their main points.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44591
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5469
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2817
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2197
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
