psx-mcp
v1.0.1
Published
MCP Server for PSX
Readme
PSX-MCP
A Model Context Protocol (MCP) server for the Pakistan Stock Exchange (PSX).
Features
- Get historical stock data for any date (as JSON or Markdown table)
- Get real-time intraday data for a symbol
- Get end-of-day (EOD) data for a symbol
- Get company information for a symbol
- List all tickers traded on PSX
Endpoints (Tools)
1. Get Historical Stocks
- Tool:
get-historical-stocks - Description: Get a historical view of stocks traded on PSX (JSON or Markdown)
- Params:
date(string, format: YYYY-MM-DD)
2. Get Real-Time Data
- Tool:
get-realtime-data - Description: Get today's real-time series data for a symbol (JSON)
- Params:
symbol(string)
3. Get End of Day Data
- Tool:
get-eod-data - Description: Get end of day data for a symbol (JSON)
- Params:
symbol(string)
4. Get Company Info
- Tool:
get-company-info - Description: Get company information for a symbol (JSON)
- Params:
symbol(string)
5. Get Tickers
- Tool:
get-tickers - Description: Get a list of all tickers traded on PSX (JSON)
- Params: None
Usage
Install
npm install psx-mcpConfigure
"mcp": {
"servers": {
"psx-mcp": {
"type": "stdio",
"command": "psx-mcp",
}
}
}Build
npm run buildTest
npm testRun (as MCP server)
node build/index.jsProject Structure
src/— Source code (MCP server, PSX reader, types)tests/— Unit and integration testsbuild/— Compiled output
Requirements
- Node.js 18+
- npm
License
MIT
