Projects / Open source

Pakistan Mutual Funds API

MUFAP publishes a NAV for every Pakistani mutual fund and no API to read it with. This is the MUFAP API I wanted: free, no key, a daily dataset and an MCP server covering NAVs, history, returns and performance for around 550 funds. The MCP server lets you ask Claude for live fund data in plain English.

Hosted connector

Add it to Claude or ChatGPT in one step

Nothing to install. Copy the connector URL, open your connector settings and paste it.

connector URL
https://funds.saadsalman.org/mcp

In the connector settings, choose “Add custom connector” and paste the URL. ChatGPT needs Developer mode on.

What the assistant can do

The MCP server exposes six tools. Ask in plain language and Claude picks the right one.

list_funds

List and filter the ~550 funds by category, AMC, name or Shariah compliance, with current NAVs.

get_fund

The full record for one fund: NAV, offer price, benchmark, expense ratio, inception and payouts.

get_nav_history

The daily NAV series for a fund, with optional date bounds and weekly or monthly thinning.

get_returns

Trailing returns (1m, 3m, YTD, 1y and since tracking), including total return with payouts added back.

get_performance

Who beat the market: a fund or AMC measured against its PSX benchmark over a period.

get_filters

Every distinct category and AMC name, so you know what you can filter by.

Use it in Claude Code

One command in your terminal. You need Node.js 18 or newer.

terminal
claude mcp add pakistan-mutual-funds -- npx -y pakistan-mutual-funds-mcp

Add -s user to make it available across all your projects. Start a session and the fund tools are there.

Use it in Claude Desktop

Add the server to your config file, then fully quit and reopen the app.

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "pakistan-mutual-funds": {
      "command": "npx",
      "args": ["-y", "pakistan-mutual-funds-mcp"]
    }
  }
}

The first run downloads the package, so give it a few seconds. The same block works in any MCP client that launches stdio servers.

Try asking

  • “What is the latest NAV for Meezan Cash Fund?”
  • “Show me the 1 year return on the top three money market funds.”
  • “List all Shariah compliant equity funds and their YTD returns.”
  • “Which AMCs beat the KSE-100 over the last year?”

Questions

Is there a MUFAP API?

Not an official one. MUFAP publishes daily NAVs for around 550 funds on its public Fund Directory as HTML, and its endpoints turn away anything that does not look like a browser. This project is an unofficial MUFAP API: a scraper that reads that public directory every business day and serves it as JSON, alongside an open dataset and an MCP server. It is not affiliated with MUFAP.

How do I get Pakistani mutual fund NAVs programmatically?

Three ways, all free. Call the REST API for funds, NAV history, payouts, returns and performance. Pull the daily dataset straight from the data repository as JSON if you would rather not run anything. Or add the MCP server to Claude or ChatGPT and ask for the numbers in plain English.

Does it need an API key, and what does it cost?

No key and no account. The code is MIT licensed, the dataset is open and the hosted connector at funds.saadsalman.org is free to use.

How fresh is the data and how far back does it go?

The scraper runs every business day, so NAVs track MUFAP within a day. Daily NAV history goes back to 2022, with payouts and PSX benchmarks added so returns are total returns net of fees.

For developers

Prefer raw HTTP? The same data is a free REST API and a daily-updated open dataset: funds and current NAVs, NAV history, payouts, returns, PSX benchmarks and a performance endpoint that ranks funds against the market. It is MIT licensed and reads a public MUFAP-sourced dataset, no API key. The scraper refreshes every business day.

Informational use only, not financial advice. Not affiliated with MUFAP.