Skip to content
Qanoon Digest

Model Context Protocol

Use Qanoon Digest inside your AI assistant

Qanoon Digest runs a free MCP server. Add its URL to Claude, ChatGPT, Cursor, Copilot or any MCP client and the assistant can search this site while it answers: the text of Pakistan's tax and customs law, SROs, budget documents and plain-language answers, each returned with a link to the exact page and section.

Server URL

https://connect.qanoondigest.com/mcp
Transport
Streamable HTTP
Sign-in
None
Cost
Free
Setup steps for each app

What is the Qanoon Digest MCP server?

The Model Context Protocol (MCP) is an open standard that lets an AI assistant call tools on a server. This server gives an assistant eight read-only tools over the whole of Qanoon Digest. Instead of answering from memory, the assistant looks up the section, SRO or question page, quotes it, and gives you the link.

Results carry the canonical qanoondigest.com address, and law results link to the section anchor and state the date the text is consolidated to, so any answer can be checked in one click.

  • 539plain-language answers
  • 191versions of 19 laws, with section text
  • 4,823SROs and notifications
  • 128federal budget documents
  • 68what-changed comparisons

How do I connect my assistant?

Pick your app. Each one needs only the server URL; there is no key or account to set up.

Claude.ai

Web and mobile. Free, Pro, Max, Team and Enterprise plans.

  1. Open claude.ai and go to Settings, then Connectors.
  2. Choose Add custom connector.
  3. Name it Qanoon Digest and paste the server URL: https://connect.qanoondigest.com/mcp
  4. Leave the advanced OAuth fields empty: the server needs no sign-in. Choose Add.
  5. In a chat, open the tools menu and check that Qanoon Digest is switched on, then ask a question.

On Team and Enterprise plans an owner adds the connector under Organization settings, Connectors, and members then switch it on for themselves. A connector added on claude.ai also appears in the Claude desktop and mobile apps.

Claude Desktop

macOS and Windows.

  1. Open Settings, then Connectors, and choose Add custom connector.
  2. Enter Qanoon Digest as the name and https://connect.qanoondigest.com/mcp as the URL, then choose Add.
  3. Start a new chat and switch the connector on from the tools menu.
Alternative: claude_desktop_config.json (uses the mcp-remote bridge, needs Node.js)
{
  "mcpServers": {
    "qanoon-digest": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://connect.qanoondigest.com/mcp"
      ]
    }
  }
}

Restart Claude Desktop after editing the config file. The file is under Settings, Developer, Edit Config.

Claude Code

Terminal, IDE extensions and the desktop app.

  1. Run the command below in a terminal.
  2. Add --scope user to make it available in every project, or --scope project to share it through .mcp.json.
  3. Inside Claude Code, type /mcp to check that the server is connected.
Terminal
claude mcp add --transport http qanoon-digest https://connect.qanoondigest.com/mcp

ChatGPT

chatgpt.com on Plus, Pro, Business, Enterprise and Edu plans, with developer mode.

  1. Open Settings, then Apps and Connectors, then Advanced settings, and turn on Developer mode.
  2. Back in Apps and Connectors, choose Create.
  3. Name it Qanoon Digest, paste https://connect.qanoondigest.com/mcp as the MCP server URL and choose No authentication.
  4. Confirm that you trust the app and choose Create.
  5. In a new chat, open the + menu, choose Developer mode and add Qanoon Digest, then ask a question.

On Business and Enterprise workspaces an admin may need to allow custom connectors first. Menu labels change from time to time; the server URL and "No authentication" stay the same.

OpenAI Responses API and Agents SDK

Your own code. OpenAI calls the server directly as a hosted MCP tool.

  1. Add the server as a tool of type "mcp" in a Responses API call.
  2. All tools are read-only, so require_approval can be set to "never".
  3. In the Agents SDK, pass the same settings through HostedMCPTool.
Responses API (Python)
from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="gpt-5",
    tools=[{
        "type": "mcp",
        "server_label": "qanoon_digest",
        "server_description": "Pakistan tax and customs law, SROs and budget documents",
        "server_url": "https://connect.qanoondigest.com/mcp",
        "require_approval": "never",
    }],
    input="What does section 149 of the Income Tax Ordinance, 2001 require? Cite the section.",
)
print(response.output_text)
Responses API (curl)
curl https://api.openai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-5",
    "tools": [{
      "type": "mcp",
      "server_label": "qanoon_digest",
      "server_url": "https://connect.qanoondigest.com/mcp",
      "require_approval": "never"
    }],
    "input": "Which SROs changed customs regulatory duty in 2025?"
  }'
Agents SDK (Python)
from agents import Agent, HostedMCPTool, Runner

agent = Agent(
    name="Tax law researcher",
    instructions="Answer from Qanoon Digest. Cite section numbers and links.",
    tools=[HostedMCPTool(tool_config={
        "type": "mcp",
        "server_label": "qanoon_digest",
        "server_url": "https://connect.qanoondigest.com/mcp",
        "require_approval": "never",
    })],
)
result = Runner.run_sync(agent, "How is tax on rental income worked out for an individual?")
print(result.final_output)

Cursor

Cursor editor.

  1. Open Cursor Settings, then MCP (Tools and Integrations), and choose New MCP Server, or edit the file directly.
  2. Use ~/.cursor/mcp.json for every project or .cursor/mcp.json for one project.
  3. Save; the server shows a green dot when connected. Use it from the Agent chat.
~/.cursor/mcp.json
{
  "mcpServers": {
    "qanoon-digest": {
      "url": "https://connect.qanoondigest.com/mcp"
    }
  }
}

VS Code with GitHub Copilot

VS Code with Copilot Chat in agent mode.

  1. Run MCP: Add Server from the Command Palette, choose HTTP and paste the URL, or create the file below.
  2. Use .vscode/mcp.json for one workspace, or MCP: Open User Configuration for every workspace.
  3. Open Copilot Chat, switch to Agent mode and enable the server in the tools picker.
.vscode/mcp.json
{
  "servers": {
    "qanoon-digest": {
      "type": "http",
      "url": "https://connect.qanoondigest.com/mcp"
    }
  }
}

Windsurf

Windsurf editor (Cascade).

  1. Open Windsurf Settings, then Cascade, then MCP Servers, and choose View raw config, or open the file below.
  2. Add the entry, save, and refresh the MCP server list in Cascade.
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "qanoon-digest": {
      "serverUrl": "https://connect.qanoondigest.com/mcp"
    }
  }
}

Gemini CLI

Google Gemini CLI in a terminal.

  1. Run the command below, or add the entry to ~/.gemini/settings.json.
  2. Start gemini and type /mcp to see the server and its tools.
Terminal
gemini mcp add --transport http qanoon-digest https://connect.qanoondigest.com/mcp
~/.gemini/settings.json
{
  "mcpServers": {
    "qanoon-digest": {
      "httpUrl": "https://connect.qanoondigest.com/mcp"
    }
  }
}

Any other MCP client

Clients that support remote servers, or only local (stdio) ones.

  1. Remote-capable clients: add a Streamable HTTP server with the URL https://connect.qanoondigest.com/mcp and no authentication.
  2. Clients that only run local servers can use the mcp-remote bridge shown below.
  3. To inspect the tools, run npx @modelcontextprotocol/inspector and connect to https://connect.qanoondigest.com/mcp with the Streamable HTTP transport.
stdio bridge
npx -y mcp-remote https://connect.qanoondigest.com/mcp

Which tools does the server offer?

All tools are read-only and marked as such, so assistants can call them without asking for approval each time. Every result includes the page's qanoondigest.com URL.

ToolWhat it returnsInputs
find_answerBest-matching passages for a question in plain English: sections of answer pages and verbatim sections of current law, each with a citation and a link to the exact section.question, kind, category, limit
searchFull-text search across questions, laws, what-changed pages, SROs and budget documents, ranked, with a snippet and the best-matching section.query, kind, category, department, law_type, fiscal_year, date_from, date_to, current_only, limit, offset
get_articleOne page in full as Markdown with its metadata, from an id, a path or a qanoondigest.com URL. Long documents are paginated.id, section, offset, max_chars
get_law_sectionThe verbatim text of one numbered section of an Act, Ordinance or Rules, current version or as it stood at a date, with the official PDF link.law, section, version_date
list_categoriesThe site map with counts: taxpayer groups, laws and their versions, SRO departments and topics, budget years and document types.kind
list_articlesBrowse pages newest first, filtered by kind, category, department, law type, fiscal year or date range.kind, category, department, law_type, fiscal_year, date_from, date_to, limit, offset
get_latestThe newest SROs, law versions, change comparisons, reviewed questions and budget documents.kind, department, category, limit
get_relatedPages linked to a page: related questions and the sections they cite, other versions of a law, SROs that mention or amend an SRO.id, limit

Prompts and resources

Prompts (ready-made workflows)

  • explain_tax_ruleExplain what the law says on a topic for one kind of taxpayer, citing sections.
  • compare_law_versionsSummarise what changed in a law, version by version.
  • find_sroFind the SROs on a subject, newest first, with what each one says.
  • taxpayer_overviewGroup the questions answered for one kind of taxpayer into themes.

Resources

  • https://qanoondigest.com/llms.txtWhat the site holds and where its text stops being reliable.
  • https://qanoondigest.com/{path}Any page on the site as Markdown.
  • qanoon-digest://aboutIndex freshness and the disclaimer.

What can I ask?

Naming Qanoon Digest in the prompt helps the assistant pick the right tools. Asking it to cite sections gets you links you can check.

  • Salaried employee

    Using Qanoon Digest, how does my employer work out the tax deducted from my salary each month? Cite the sections.

  • Freelancer

    What does Qanoon Digest say about tax on income from foreign clients paid through a bank? Quote the relevant section.

  • Property owner

    Find the Qanoon Digest pages on tax when selling a plot I have held for three years, and summarise what the law says.

  • Importer

    List the newest Customs SROs on regulatory duty and say what each one covers, with links.

  • Researcher

    What changed in the Sales Tax Act, 1990 between the 2025 and 2026 versions? Link each added section.

  • Student

    Show me section 114 of the Income Tax Ordinance, 2001 verbatim, and then explain it in plain words.

  • Journalist

    Which federal budget documents for 2025-26 are on Qanoon Digest, and what does the Budget in Brief say about FBR revenue?

  • Business owner

    Using Qanoon Digest, when does super tax under section 4C apply to a company, and at what rates?

Technical details for developers

  • Endpoint: https://connect.qanoondigest.com/mcp, Streamable HTTP, stateless. Send JSON-RPC with POST; GET and DELETE return 405 because there are no sessions or server-initiated streams.
  • Authentication: none. CORS is open, so browser-based clients work.
  • Limits: 120 requests a minute per IP address, 256 KB per request. Long documents come back in pages; pass offset to continue.
  • Freshness: the index is rebuilt from this site's source files every 30 minutes.
  • Plain files for crawlers: /llms.txt describes the site, /llms-full.txt holds every question page in full, and each question and what-changed page has a Markdown copy at the same address plus .md.
Try it with the MCP Inspector
npx @modelcontextprotocol/inspector --cli https://connect.qanoondigest.com/mcp --transport http --method tools/list

What does the server see?

Only what the assistant sends it: search words, page ids and section numbers. It never receives your conversation, your files or your account details, and it cannot write or change anything. Requests are logged by the web server for security and rate limiting, with the IP address, and are not used to build profiles or shared. The privacy policy covers the rest of the site.

Your AI app has its own privacy terms for what you type into it. Avoid putting personal tax details, such as a CNIC or NTN, into prompts.

Questions about the MCP server

What is the Qanoon Digest MCP server?

It is a Model Context Protocol server at https://connect.qanoondigest.com/mcp that lets AI assistants such as Claude, ChatGPT, Cursor and Copilot search and quote Qanoon Digest while they answer. The assistant gets the same text that is on this site, with the link to each page and section, instead of relying on what it remembers about Pakistani tax law.

Does it cost anything or need an account?

No. The server is free and needs no sign-in or API key. Some AI apps only allow custom connectors on certain plans; that limit belongs to the app, not to this server.

Is the answer an AI gives with this server legal or tax advice?

No. The server returns the published text of the law and the plain-language pages on this site. An assistant can still misread or leave something out. Every result carries a link to the page and to the official FBR file, so check the source before acting and consult a qualified professional for your situation.

What content can the assistant reach?

Every page on the site: the plain-language question pages, every published version of each Act, Ordinance and Rules with the statutory text, the what-changed comparisons, the SRO library and the federal budget documents. Tables and rate schedules that are not reproduced on the law pages are not in the server either.

How current is it?

The server rebuilds its index from the same source files as this site every 30 minutes, so new pages appear shortly after they are published here. Each law result states the date its text is consolidated to.

Can the server change anything or see my files?

No. All eight tools are read-only lookups against this site. The server cannot write, and it only receives the search words and page ids the assistant sends it, never your chat history or files.

Why does my assistant say it cannot connect?

Check that the URL is exactly https://connect.qanoondigest.com/mcp, that the client is set to Streamable HTTP (sometimes shown as HTTP) rather than SSE, and that no authentication is selected. Opening the URL in a browser shows "Method not allowed": that is expected, because the server only answers MCP requests sent with POST.

Is there a limit on use?

Each IP address can send 120 requests a minute, which is far more than a normal conversation uses. Large documents are returned in pages so that one reply is never huge.

Something not working, or a page the server returns looks wrong? Tell us through the contact page.