Skip to main content

MCP server for the Australian Bureau of Statistics Data API. Hides SDMX behind plain-English tools, with curated mappings for Labour Force, CPI, ERP, Building Approvals, and Lending Indicators.

Project description

abs-mcp

tests PyPI Python License: MIT

An MCP server that wraps the Australian Bureau of Statistics Data API and hides SDMX behind plain-English tools. Ask Claude "What's the unemployment rate in NSW?" and get a real answer with a source link, instead of a wall of SDMX codes.

Five tools, ten curated dataflows: Labour Force, CPI, Wage Price Index, Job Vacancies, Average Weekly Earnings, GDP / National Accounts, quarterly + annual Estimated Resident Population, Building Approvals, and Lending Indicators.

What you can ask

Once installed, your LLM can answer questions like:

Question Real response (verified)
What's the unemployment rate in NSW? 4.27% (Mar 2026)
AU annual CPI inflation? 4.60% (Mar 2026)
AU annual wage growth? 3.40% (Q4 2025)
Average weekly earnings in Australia? $1,562 (Sep–Oct 2025)
AU GDP quarterly growth? 0.80% (Q4 2025)
AU GDP per capita? $24,900/qtr (Q4 2025)
Job vacancies in NSW? 101,200 (Q1 2026)
Dwelling approvals in NSW? 4,400/month (Mar 2026)
New NSW housing loan commitments? $19.7B (Q4 2025)
Quarterly population of Australia? 27.7M (Q3 2025)

Every answer comes with the period, units, and a link back to the ABS source page. Comparisons and time-series queries work just as well — see Worked examples below.

Install

# After publish:
uvx abs-mcp

# Local dev install:
uv pip install -e .

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "abs": {
      "command": "uvx",
      "args": ["abs-mcp"]
    }
  }
}

For a local checkout (before PyPI publish):

{
  "mcpServers": {
    "abs": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/abs-mcp", "abs-mcp"]
    }
  }
}

Restart Claude Desktop. The abs server appears in the tools panel with five tools.

Cursor

Add to ~/.cursor/mcp.json (or workspace .cursor/mcp.json):

{
  "mcpServers": {
    "abs": {
      "command": "uvx",
      "args": ["abs-mcp"]
    }
  }
}

Tools

Tool What it does
search_datasets(query, limit=10) Fuzzy-search ABS dataflow names. Returns the top matches.
describe_dataset(dataset_id) Plain-English description of a dataflow's dimensions and values.
get_data(dataset_id, filters, start_period, end_period, format) Query a dataflow with filters. Returns clean records (default), grouped series, or CSV.
latest(dataset_id, filters) Just the most recent observation(s) — wraps get_data with lastNObservations=1.
list_curated() The ten dataflow IDs that have hand-curated plain-English support.

Curated dataflows

For these ten, filters accepts plain-English values (e.g. "region": "nsw" instead of "REGION": "1"):

  • LF — Labour Force, monthly: employment, unemployment, participation by state/sex
  • CPI — Consumer Price Index, quarterly inflation by capital city and category
  • WPI — Wage Price Index, quarterly wage growth by industry/sector/state
  • JV — Job Vacancies, quarterly labour demand by industry/sector/state
  • AWE — Average Weekly Earnings, half-yearly by industry/sector/state
  • ANA_AGG — National Accounts: GDP, GDP per capita, terms of trade, real income (Australia, quarterly)
  • ABS_ANNUAL_ERP_ASGS2021 — Estimated Resident Population, annual by state and sub-state geography
  • ERP_Q — Quarterly Estimated Resident Population, by state/sex/age
  • BA_GCCSA — Building Approvals, monthly by state/capital region and building type
  • LEND_HOUSING — Lending Indicators, quarterly new housing loan commitments by purpose, lender, and state

Any other ABS dataflow still works — pass raw SDMX dimension IDs and codes.

Worked examples

"What's the current unemployment rate in NSW?"

Claude calls:

latest(dataset_id="LF", filters={"region": "nsw", "measure": "unemployment_rate"})

Returns:

{
  "dataset_id": "LF",
  "dataset_name": "Labour Force",
  "query": {"region": "nsw", "measure": "unemployment_rate"},
  "period": {"start": "2026-03", "end": "2026-03"},
  "unit": "Percent",
  "records": [
    {
      "period": "2026-03",
      "value": 4.27,
      "dimensions": {"measure": "Unemployment rate", "region": "New South Wales", "sex": "Persons"},
      "unit": "Percent"
    }
  ],
  "source": "Australian Bureau of Statistics",
  "retrieved_at": "2026-05-11T03:14:22Z",
  "abs_url": "https://www.abs.gov.au/statistics/labour/employment-and-unemployment/labour-force-australia"
}

"Show me NSW housing approvals over the last two years"

get_data(dataset_id="BA_GCCSA", filters={"region": "nsw", "measure": "dwelling_units"}, start_period="2024")

"Compare quarterly CPI in Sydney vs Melbourne"

get_data(dataset_id="CPI", filters={"region": ["sydney", "melbourne"], "measure": "change_year"}, start_period="2023")

Period formats

ABS uses different period formats per dataflow. Pass start_period / end_period in the matching format:

Dataflows Frequency Format Example
LF, BA_GCCSA Monthly YYYY-MM "2026-03"
CPI, WPI, JV, ANA_AGG, LEND_HOUSING, ERP_Q Quarterly YYYY-Q* or YYYY-MM "2025-Q4"
AWE Half-yearly YYYY-S* "2025-S2"
ABS_ANNUAL_ERP_ASGS2021 Annual YYYY "2025"

Development

git clone https://github.com/Bigred97/abs-mcp.git
cd abs-mcp
uv sync --extra dev
uv pip install -e .

# Unit tests (no network)
uv run pytest

# Live integration tests (hits real ABS API)
uv run pytest -m live

The SQLite cache lives at ~/.abs-mcp/cache.db. Catalogue refreshes every 24h, codelists every 7 days, data responses every hour, latest 15 minutes. Delete the file to force a refresh.

How it differs from existing ABS MCP servers

The one existing community option (seansoreilly/abs) exposes a single query_dataset tool that passes raw SDMX through. This package offers semantic tools and curated mappings for the highest-value dataflows so an LLM can answer real questions without you needing to know what M13.3.1599.20.1.M means.

Changelog

See CHANGELOG.md for release history.

License

MIT — Harry Vass, 2026.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abs_mcp-0.2.4.tar.gz (253.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abs_mcp-0.2.4-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file abs_mcp-0.2.4.tar.gz.

File metadata

  • Download URL: abs_mcp-0.2.4.tar.gz
  • Upload date:
  • Size: 253.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for abs_mcp-0.2.4.tar.gz
Algorithm Hash digest
SHA256 018ce34887e33ff8f8b70e85545d7676228aa5e519adcf7514ee5d8148fb6f1e
MD5 0a851cc6deb270ed8ead995b5508337b
BLAKE2b-256 d84a54ece08ec3be361daf52ea8765bd83c681a35cad4d8c7b4951339ad30d7a

See more details on using hashes here.

File details

Details for the file abs_mcp-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: abs_mcp-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for abs_mcp-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c53349a4dc73f850df2cd944b16fd410e952a8bbfca75ceb75c19a2383a81621
MD5 8c176ce548303fa1ed8b0e02f9f62152
BLAKE2b-256 2768aa5075bbd4db632f4d01b1ff6eca3d01c90f2bb5058334a087022a26a2dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page