Prototipo · Versión preliminar: todos los servidores del registro oficial, sincronizados cada 30 minutos. Las reseñas y las cuentas llegarán en una etapa posterior.
PopNx MCPServidores MCP para quienes usan IA · explicados con palabras sencillas

Stats Nz

de pipeworx-ioversión 0.2.1i★ –iComputadora o nube
Nombre en el registroio.github.pipeworx-io/stats-nz

Instalar

Resumen

Descripción del creador (original en inglés)

New Zealand official statistics (Aotearoa Data Explorer) — search Stats NZ's 911 published…

Los tres pilares de PopNx MCP

Estos tres nunca se combinan en una sola puntuación: las opiniones, las mediciones y la popularidad son cosas distintas.

Qué puedes hacer con él

Todavía no escribimos un resumen sencillo para este. Abajo están los datos que leímos del registro.

  • Conexión: Computadora o nube
  • Transporte: stdio, Streamable HTTP
  • Categoría: Derecho y datos públicos
  • Debes completar: PIPEWORX_API_KEY

Instalación

Elige la app de IA que usas y copia la configuración.

Antes de instalar

Los valores marcados como secretos son llaves de tu cuenta. Nunca los compartas ni los pegues en un chat.

Necesitas

¿Qué app usas?

Elige tu app arriba. La recordamos, así que la próxima vez el botón dirá “Instalar en …”.

Funciona en Claude para web, escritorio y móvil:

  1. Abre Settings → Connectors
  2. Presiona Add custom connector
  3. Pega la dirección de abajo y presiona Add
  4. Si te pide iniciar sesión, inicia sesión en el servicio del creador
SettingsConnectors1+ Add2https://…3
https://gateway.pipeworx.io/stats-nz/mcp

O ejecútalo en tu computadora

Abre Claude Desktop → Settings → Developer → Edit Config y pega esto en claude_desktop_config.json

{
  "mcpServers": {
    "stats-nz": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-stats-nz"
      ],
      "env": {
        "PIPEWORX_API_KEY": "your-value"
      }
    }
  }
}

Ejecuta esto en tu terminal

claude mcp add --transport http stats-nz https://gateway.pipeworx.io/stats-nz/mcp

O ejecútalo en tu computadora

claude mcp add stats-nz --env PIPEWORX_API_KEY=your-value -- npx -y @pipeworx/mcp-stats-nz

Completa los valores vacíos antes de ejecutarlo.

Abrir en Cursor

O copia la configuración tú

Pégalo en .cursor/mcp.json de tu proyecto, o en ~/.cursor/mcp.json

{
  "mcpServers": {
    "stats-nz": {
      "url": "https://gateway.pipeworx.io/stats-nz/mcp"
    }
  }
}

O ejecútalo en tu computadora

Abrir en Cursor

O copia la configuración tú

Pégalo en .cursor/mcp.json de tu proyecto, o en ~/.cursor/mcp.json

{
  "mcpServers": {
    "stats-nz": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-stats-nz"
      ],
      "env": {
        "PIPEWORX_API_KEY": "your-value"
      }
    }
  }
}

Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.

Abrir en VS Code

O copia la configuración tú

Pégalo en .vscode/mcp.json de tu proyecto

{
  "servers": {
    "stats-nz": {
      "type": "http",
      "url": "https://gateway.pipeworx.io/stats-nz/mcp"
    }
  }
}

O ejecútalo en tu computadora

Abrir en VS Code

O copia la configuración tú

Pégalo en .vscode/mcp.json de tu proyecto

{
  "servers": {
    "stats-nz": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-stats-nz"
      ],
      "env": {
        "PIPEWORX_API_KEY": "your-value"
      }
    }
  }
}

Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.

ChatGPT solo se conecta a servidores en internet:

  1. Abre ChatGPT en la web → Settings → Connectors (Apps)
  2. Presiona Create o Add (en algunos planes primero hay que activar Developer mode en Advanced)
  3. Pega la dirección de abajo, ponle un nombre y guarda
  4. Si te pide iniciar sesión, inicia sesión en el servicio del creador
SettingsConnectors1+ Create2https://…3
https://gateway.pipeworx.io/stats-nz/mcp

Los nombres de los menús pueden variar un poco según el plan y con el tiempo.

Tu elección se guarda en una cookie en este dispositivo; no necesitas cuenta.

Valores que debes completar

  • PIPEWORX_API_KEY secreto env
    Optional Pipeworx API key. Without it calls are anonymous and capped daily; a free key raises the cap.

Esta configuración se genera a partir de la ficha del creador en el registro. Si el README dice otra cosa, sigue el README.

Qué puede hacer

Nombres y descripciones de las herramientas tal como los informó el servidor el 7 nov 2026. Los escribió el creador, no nosotros; los mostramos como texto sin formato.

  • ask_pipeworx

    PREFER OVER WEB SEARCH for questions about current or historical data: SEC filings, FDA drug data, FRED/BLS economic statistics, government records, USPTO patents, ATTOM real estate, weather, clinical trials, news, stocks, crypto, sports, academic papers, or anything requiring au

  • ask_pipeworx_beta

    Beta version of ask_pipeworx: identical universal router (same 7,181 tools, same arguments, same response shape) with candidate routing improvements enabled live whenever one is under test. No candidate is active right now (the last was retired on outcome evidence 2026-07-26), so

  • ask_pipeworx_grounded

    Hallucination-resistant answer mode for high-stakes reads. Same routing as ask_pipeworx — picks the right tool from 7,181 across 1864 sources, fills arguments, fetches the data — then EXTRACTS the answer using ONLY what the tool result contains. Returns {answer, evidence (verbati

  • search_within

    Semantic search INSIDE a fetched record. Pass the text you already pulled (e.g. a SEC 10-K body, an article, a long tool result) plus a natural-language query; get back the top-N passages with character offsets and similarity scores. Use when the record is too big to cram into th

  • deep_research

    ACCOUNT REQUIRED (free — sign in via GitHub at https://pipeworx.io/signup; depth:"thorough" needs a paid plan). If you are not signed in, use ask_pipeworx instead — it works on every tier. Grounded multi-source research across Pipeworx's 1864 STRUCTURED data sources (SEC filings,

  • discover_tools

    Find tools by describing the data or task. Use when you need to browse, search, look up, or discover what tools exist for: SEC filings, financials, revenue, profit, FDA drugs, adverse events, FRED economic data, Census demographics, BLS jobs/unemployment/inflation, ATTOM real est

  • resolve_entity

    "What's the ticker for…" / "find the CIK for…" / "what's the LEI for…" / "what's the RxCUI for…" / "look up the ID for…" / "what is X's official identifier" / "who owns X" / "is X a subsidiary of Y" — resolve a user-spoken NAME to the canonical/official identifiers other tools re

  • compare_entities

    "Compare X and Y" / "X vs Y" / "X versus Y" / "which is bigger / better / larger / more profitable" / "rank these companies" / "head to head" — side-by-side comparison of 2–5 companies or drugs in ONE parallel call. ALWAYS PREFER over sequential single-pack lookups when comparing

  • subscribe

    Create a proactive monitoring subscription to a live-data event stream. Returns the new subscription id. Requires a Pipeworx OAuth account (anonymous + BYO cannot persist subscriptions). Supported types: "sec_8k" (8-K filings matching ticker + item codes — e.g. items:["5.02"] = o

  • unsubscribe

    Cancel a subscription by id. Ownership is enforced — you can only cancel your own subscriptions. The row is deactivated (not deleted) so its historical events stay available via recent_alerts.

  • list_subscriptions

    List the caller's active subscriptions. Returns id, type, params, created_at, last_fired_at, fire_count for each. Use this to review what you're monitoring before adding more or to find an id to cancel.

  • recent_alerts

    Pull fired events from your subscription feed. Returns the most recent alerts the evaluator has written to your persisted feed — each carries source, citation_uri (pipeworx:// when available), and the raw event payload. Filter by type (e.g. "sec_8k") and/or since (ISO timestamp).

  • entity_profile

    "Tell me about X" / "research Acme" / "brief me on Tesla" / "what does Apple do" / "company profile for Microsoft" / "give me the rundown on NVDA" / "everything you know about $TICKER" — full cross-source profile of a US public company in ONE parallel call. ALWAYS PREFER over cha

  • recent_changes

    "What's new with X" / "latest on Y" / "what happened to Z this week / month / quarter" / "updates on Acme" / "news on Tesla recently" / "what's happening with Apple" — change feed for a company in the last N days/weeks/months in ONE parallel call. Fans out to SEC EDGAR (filings s

  • validate_claim

    "Is it true that…" / "fact check" / "verify the claim that…" / "did X really…" / "was Y actually…" / "confirm or refute" / "true or false" — natural-language claim verification against authoritative sources. Use whenever the agent needs to check whether something a user said is f

  • company_facts

    TYPED, DETERMINISTIC financial facts for a US public company for an EXPLICITLY NAMED reporting period — "Apple revenue for fiscal 2023", "Walmart net income FY2026 Q3", "Microsoft cash at the end of fiscal 2024". PREFER OVER entity_profile / get_company_financials whenever the pe

  • company_register_search

    Search the NATIONAL BUSINESS REGISTERS by company name and get the register's own id back — a Companies House number, a Norwegian organisasjonsnummer, a Finnish business id, a SIREN, a Japanese corporate number, an Estonian registry code, a CNPJ, or an LEI. Use this when you want

  • scan_dependency

    Composite "should I add this npm package to my project" check in ONE call — fans out across deps.dev (license + advisories + version history) and bundlephobia (gzipped/minified bundle size, dependency count, ESM/tree-shake support). Use whenever an agent asks "is X safe / popular

  • bet_research

    Research a Polymarket bet by pulling the relevant Pipeworx data for it in one call. Pass a market slug ("will-kristi-noem-win-the-2028-republican-presidential-nomination"), a polymarket.com URL, or a question text. A dated slug ("...-by-june-30-2026") still resolves after it sett

  • polymarket_arbitrage

    Find arbitrage opportunities on Polymarket via monotonicity violations + partition-sum checks. Call with NO args for a `trending_scan` of the top ~200 markets by weekly volume; pass `event` for the strongest per-event partition_check, or `topic` for a themed cross-event scan. `ev

  • polymarket_edges

    Scan top Polymarket markets and return opportunities where Pipeworx data disagrees with market price. Built for "what should I bet on today" — agents discover opportunities without paging hundreds of markets. FIVE MODEL FAMILIES grouped into three response segments under by_segme

  • polymarket_kalshi_spread

    Cross-venue spread between Kalshi and Polymarket for the same resolving question. The two venues sometimes price the same outcome 2-25pp apart because their participant pools differ — when the bet shapes are equivalent that delta is a real signal, when they aren't the tool says s

  • polymarket_fill_risk

    Realizable-vs-theoretical edge check against live CLOB order-book depth — AND Polymarket's own taker fee, which is never zero and is folded in rather than left for you to add (fleet #3446: r/PredictionsMarkets flagged a "clean" fill that quietly omitted it as optimistic in the di

  • polymarket_edge_tracker

    Edge persistence and decay telemetry built from daily polymarket_edges snapshots. Answers "how long has this edge existed and is it shrinking?" — a fresh wide edge and a 3-week-old wide edge are different trades (the latter is wide for a reason nobody is willing to take). Args: d

  • kalshi_weather_edge

    Prices Kalshi daily high-temperature markets against the NWS forecast for the market's OWN settlement station, and measures whether that forecast actually beats the market. Two modes. LIVE (default): returns the full strike ladder for one city and settlement date with market_prob

  • resolution_audit

    Extract the settlement clause of a single Polymarket (.com or .us) or Kalshi market: who publishes the settling number (source), the clock time + timezone it is taken at (falling back to the market TITLE when the clause itself says "the time range specified in the title" — e.g. P

  • resolution_diff

    Field-by-field diff of TWO markets' settlement clauses (one from each of `a` and `b`; either can be Polymarket .com, Polymarket US, or Kalshi) — runs resolution_audit on both sides and compares source, settle time, precision, comparison_basis, and evidence standard. Returns `equi

  • release_calendar_markets

    JOIN of the official release calendar (econ data, the FOMC, FDA decisions, SEC rules) against LIVE Polymarket/Kalshi markets — which scheduled releases land in the next N hours, and which live markets resolve on them. This is a POSITIONING tool, not a speed product: results are c

  • prediction_calibration

    REALIZED win rate by shown price and minutes elapsed for short-horizon crypto up/down markets, net of taker fee — read from our own settled-outcomes archive, not from live prices. Answers the one question no venue will: "a side shown at 82 with five minutes left, how often did it

  • updown_venue_compare

    The same 15-minute crypto "up or down" window priced on polymarket.com, Polymarket US and Kalshi, side by side, with whether each pair is actually the same contract. Pass asset (btc | eth | sol | xrp | bnb) and window ("current" default, "next", "previous", or the window START as

  • updown_divergence_rate

    How often two venues settled the SAME 15-minute crypto window differently, over every settled window on record. Compares polymarket.com (Chainlink TWAP) with Kalshi and with Polymarket US (both CF Benchmarks BRTI), and Kalshi with Polymarket US as the same-feed control. Per pair:

  • archive_evidence

    What did a web page say on a given date? Finds the archived capture of a URL nearest that date across the Internet Archive Wayback Machine, Common Crawl and Arquivo.pt, reads it, and returns the readable text (HTML stripped) with the capture timestamp, a link to the archived copy

  • archive_compare

    What changed on a web page between two dates? Resolves the archived capture nearest each date (Internet Archive Wayback Machine, Common Crawl, Arquivo.pt), extracts the readable text of both, and returns a text-level diff: the segments removed and added, a similarity score, and b

  • research_row

    Claygent-style per-row research: answer ONE question about ONE company and return a JSON object matching your output_schema, with every field wrapped in its own evidence — {value, evidence_url, quote, status}. status is NEVER self-reported by the model: "found" means this code in

  • classify_row

    Cheap categorization: given a company and a list of candidate labels, decide which labels apply — the most common GTM/AI usage shape (tagging a list by industry, ICP fit, etc.), one small model call. Same evidence contract as research_row: each label comes back {label, applies, e

  • pipeworx_trending

    What other AI agents are calling on Pipeworx right now. Returns the top tools, top packs, and total call volume over a recent window (24h, 7d, or 30d). Useful for: (1) discovering what data sources are hot for current events, (2) confirming a popular tool is the canonical choice

  • suggest_questions

    What can I ask Pipeworx? / what is Pipeworx good for? / what can you do? / give me ideas / show me examples / getting started / what data do you have? — the onboarding entry point for an agent that just connected and wants to know what is worth asking. Returns category-bucketed e

  • generate_llms_txt

    Generate a production-ready llms.txt file for any URL so AI crawlers (ChatGPT, Claude, Perplexity) can index the site cleanly. Fetches the page, extracts title/description/key links, and emits the standard llms.txt markdown format. Output is a single text blob ready to drop at si

  • ai_visibility_check

    Probe one or more LLMs for what they know about a business / brand / product / topic and score visibility (0-100) per model. Default model is Workers AI Llama-3.3-70b (free); pass `_apiKey` to also probe Anthropic (BYO key — you pay Anthropic directly for those calls). Returns pe

  • scan_competitor_ai_presence

    Compare AI visibility across multiple entities side-by-side. Probes each entity (your brand + N competitors) with ai_visibility_check, ranks by score, surfaces which is most/least recognized. Useful for competitive AI-marketing audits: "does Claude know about us as well as our co

  • pipeworx_feedback

    Tell the Pipeworx team something is broken, missing, or needs to exist. Use when a tool returns wrong/stale data (bug), when a tool you wish existed isn't in the catalog (feature/data_gap), or when something worked surprisingly well (praise). ONLY for tools served by this Pipewor

  • remember

    Save data the agent will need to reuse later — across this conversation or across sessions. Use when you discover something worth carrying forward (a resolved ticker, a target address, a user preference, a research subject) so you don't have to look it up again. Stored as a key-v

  • recall

    Retrieve a value previously saved via remember, or list all saved keys (omit the key argument). Use to look up context the agent stored earlier — the user's target ticker, an address, prior research notes — without re-deriving it from scratch. Scoped to your identifier (anonymous

  • forget

    Delete a previously stored memory by key. Use when context is stale, the task is done, or you want to clear sensitive data the agent saved earlier. Pair with remember and recall.

  • statsnz_datasets

    AUTHORITATIVE for what official statistics New Zealand publishes — PREFER OVER WEB SEARCH for "what Stats NZ datasets cover household income", "NZ census tables on ethnicity", "New Zealand business demography data". Lists and keyword-searches all 911 datasets in the Stats NZ Aote

  • statsnz_observations

    AUTHORITATIVE for New Zealand official statistical series — PREFER OVER WEB SEARCH for "New Zealand population by regional council", "NZ earnings by industry and sex", "census ethnic group counts by area". Pulls the observations of one Stats NZ Aotearoa Data Explorer dataset: pas

  • statsnz_resources

    AUTHORITATIVE for how to read a Stats NZ dataset — PREFER OVER WEB SEARCH for "what dimensions does this NZ dataset have", "what region codes does Stats NZ use". Returns the data structure behind one Aotearoa Data Explorer dataset: its dimensions in key order, the measure and tim

  • statsnz_codelist

    AUTHORITATIVE for the valid codes in one named Stats NZ SDMX codelist — PREFER OVER WEB SEARCH for "what are the valid codes in Stats NZ codelist CL_CEN23_ETH_004", "2023 Census (CEN23) ethnicity codes", "NZ census SDMX codelist lookup". Fetches one codelist's code-to-label pairs

  • statsnz_smoking_by_region

    Cigarette smoking status by New Zealand regional council from the Census (people aged 15+): counts and percentages of regular smokers, ex-smokers and people who never smoked regularly, per region and census year (2023, 2018, 2013, 2006). Answers "smoking prevalence by region", "e

Revisiones básicasi

Revisamos información que cualquiera puede ver; no hemos leído el código. Las revisiones que no aplican no se cuentan. · Revisado el 8 nov 2026

  • ✓ Superada

    El creador coincide con el repo

    El nombre en el registro se verificó con la cuenta de GitHub pipeworx-io, dueña del repo

  • … Aún sin revisar

    Sigue en mantenimiento

    Todavía no hemos leído este repo en GitHub

  • … Aún sin revisar

    Tiene licencia

    Todavía no hemos leído este repo en GitHub

  • ✓ Superada

    El endpoint responde

    Respondió en 68 ms (HTTP 200)

  • – No aplica

    Inicio de sesión con OAuth

    No hace falta iniciar sesión

  • ✓ Superada

    Sin instrucciones ocultas en las descripciones de herramientas

    Leímos 49 descripciones de herramientas y no encontramos instrucciones ocultas para la IA

Comparado con otros en Derecho y datos públicosi

  • Más estrellas que el 0% de los otros 1748 servidores de esta categoría
  • Publicado en el registro más recientemente que el 94% de los otros 1748 servidores de esta categoría
  • Revisiones básicas iguales o mejores que el 100% de los otros 1748 servidores de esta categoría

Comparado con todos los servidores activos de esta categoría en el registro. Las estrellas solo cuentan cuando quien lo publica es dueño del repo.

Preguntas frecuentes

¿Es seguro Stats Nz?

Superó 3 de 3 revisiones básicas aplicables. No hemos leído el código. Antes de agregar una clave o un token, revisa qué acceso pide el servidor y usa una clave que tenga solo los permisos que necesitas.

¿Qué claves o códigos necesita?

Debes completar: PIPEWORX_API_KEY

¿Se ejecuta en mi computadora o en la nube?

Funciona de las dos formas: instálalo en tu computadora o conéctate a la versión en la nube.

¿Sigue en mantenimiento?

El repo de GitHub cambió por última vez –, y la última versión (0.2.1) llegó al registro hace 3 días.

¿Qué apps pueden usarlo?

Las apps compatibles con MCP, como Claude Desktop, Claude Code, Cursor y VS Code. Se conecta por URL, así que también funcionan las apps que aceptan servidores MCP remotos, como ChatGPT en modo desarrollador.

¿Qué puedo usar en su lugar?

En la misma categoría: Korean Government Documents (HWPX), Censible, Private Law Wiki

Alternativas

Servidores de la misma categoría hechos por otros creadores, ordenados por estrellas.

Cómo leer una tarjeta:↓ Descargas por semanai★ Estrellas de GitHubiTres pilares: reseñas · revisiones · usoiActualizado = fecha en que se publicó la última versión en el registroi

Korean Government Documents (HWPX)

Turns a draft into a Korean government report or press release as HWPX in each ministry's format

de UpstageAIMuy nuevo↓ 103/semActualizado hoy

Se ejecuta en tu computadora

Censible

The Australian Census (2011, 2016, 2021) for any suburb, postcode or council, with projections.

de Censible-AUInicialActualizado hoy

Se ejecuta en la nube✓ censible.com.au

Private Law Wiki

Sourced answers, search and bank-case assessment for wiki.private.law by the Mothership runtime.

de privatelawattorneysMuy nuevoActualizado hoy

Se ejecuta en la nube

README del creador

Abrir el README

Copiado tal cual del repo del creador. PopNx MCP no lo ha revisado ni lo respalda. Se quitaron HTML, imágenes y scripts. Los enlaces llevan fuera de este sitio.

@pipeworx/stats-nz

New Zealand official statistics (Aotearoa Data Explorer) — search Stats NZ's 911 published datasets by keyword and pull their observations, covering the 2013/2018/2023 censuses, LEED earnings, business demography, population estimates and projections, household expenditure, corrections and justice.

Part of Pipeworx — an MCP gateway connecting AI agents to 1866+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

Tools

  • statsnz_datasets({ query, limit, offset }) — keyless. Keyword-search all 911 datasets; returns dataset id, full title, description, agency, version.
  • statsnz_smoking_by_region({ region?, year?, _apiKey }) — Census smoking status (regular smoker / ex-smoker / never smoked regularly) by regional council for 2006, 2013, 2018 and 2023, with counts and percentages of people whose status was stated. Census self-report, not the Ministry of Health NZ Health Survey.
  • statsnz_observations({ dataset, key, agency, version, startPeriod, endPeriod, lastNObservations, _apiKey }) — period/value pairs with their dimension labels. A too-wide unfiltered query is auto-narrowed to totals and flagged in narrowed (see Traps).
  • statsnz_resources({ dataset, agency, version, includeCodes, maxCodesPerList, _apiKey }) — dimensions in key order, time dimension, measure, and the code lists that turn a key like 1.2.Q into something readable.

Auth

Platform key PLATFORM_STATSNZ_KEY (in the encrypted keystore since 2026-09-18) with BYO override via ?_apiKey=; sent upstream as an Ocp-Apim-Subscription-Key header. Callers need no key of their own. Free subscription at https://portal.apis.stats.govt.nz/ — sign up, then subscribe to the Aotearoa Data Explorer API product.

statsnz_datasets additionally works with no key at all.

Data sources

Traps

  • The catalogue is SDMX-ML now, whatever you ask for. /rest/dataflow/all/all/latest served SDMX-JSON until 2026-09-18 and now serves application/vnd.sdmx.structure+xml; version=2.1 on *every* Accept header tried — structure+json;version=1.0, bare application/json, structure+json;version=2.0 — keyed and keyless alike. res.json() on it throws Unexpected token '<', "<?xml vers", which classifies as upstream_down and reads like an outage rather than a format change. The pack parses the XML. This is endpoint-specific: /rest/datastructure/… still answers structure+JSON, so don't convert that one too.
  • The flowRef commas must stay literal — encoding them is a silent zero. The data path is /rest/data/{agency},{dataset},{version}/{key}. Their Azure APIM does not percent-decode path segments, and an unmatched route falls through to a handler that answers 401 "missing subscription key" without a key and an empty-but-valid 200 with one. Measured 2026-09-18: /rest/data/STATSNZ,AGR_AGR_001,1.0/all?lastNObservations=1 → 200 with 80 observations; the same URL with %2C → 401. encodeURIComponent on that segment is what made statsnz_observations return count: 0 against a perfectly healthy dataset. /rest/dataflow/%61ll/all/latest → 401 too, so it is their routing, not this one path.
  • A zero from `statsnz_observations` is always explained, and a bad id is an error. Because an unknown dataset, a malformed path and a genuinely empty query are indistinguishable by status on this gateway, the tool validates the dataset id against the keyless catalogue *before* calling the data endpoint (cached 30 min per isolate). An unknown id raises a 404-shaped error naming near matches; an id that exists but returns nothing comes back with empty_reason saying which case it is — no structure at all (routed but uninterpretable), a dimension key that filtered everything out, a period window with nothing in it, or a genuine upstream gap.
  • An unfiltered query on a wide census table is too big to return, so the pack narrows it and says so. CEN23_HAD_020 with key all was ~208MB of SDMX-JSON on 2026-10-16 (no Content-Length, no time dimension for lastNObservations to shrink), past the pack's 16MB streaming cap; that was 24 of 44 external statsnz_observations calls in 48h. When the cap trips on an unfiltered query, the pack reads the dataset structure, pins geography dimensions (then the widest remaining ones, while the open cross product is over 250k cells) to the ROOT code Stats NZ labels "Total …" — never a "Total stated …" subtotal — re-queries, and returns the slice with requested_key: "all" and a narrowed object listing each pin and how to ask for the breakdown. CEN23_HAD_020 comes back as key .9999.... (Total - New Zealand by regional council), 16,920 rows. A caller-supplied key is never narrowed; a too-wide one, or a dataset with no Total code to pin, fails as user_error with the dimensions and sample codes inline.
  • 401 does not mean "bad credential" here. Because an unmatched route also answers 401, a malformed path and a missing key are indistinguishable by status. The pack's 401 message says both possibilities out loud.
  • Observations come back FLAT, not series-keyed. dataSets[0].observations is a map of "0:3" → [value, …] and dataSets[0].series is absent. Reading only series (as this pack first did) yields zero observations from a good
  1. Both layouts are mapped, plus dataset-level dimensions.
  • `lastNObservations` drops the collapsed dimension from the observation key, and it is NOT always the time axis. With lastNObservations=1 on AGR_AGR_001 the key is 2 parts for 3 declared dimensions — the year is simply not in the response, so rows cannot say which year they are. On INC_INC_001 the collapsed dimension is MEASURE_INC_INC_001, a *measure* axis, across 35,610 rows. The pack reports collapsed_dimensions plus a note rather than returning rows that look fully labelled.
  • `startPeriod`/`endPeriod` only bite on a declared time dimension, and Stats NZ mostly declares none. statsnz_resources reports time_dimension: [] for AGR_AGR_001, and the role field in the data message just echoes each dimension's own id, so there is no usable time marker: a dimension named YEAR_* is not a time dimension to this server. The pack therefore tests for the SDMX standard TIME_PERIOD id and, for anything else, tells the caller to pin the dimension through the key argument — naming its segment position and handing back a worked key such as .. . The note used to recommend startPeriod/endPeriod unconditionally, which is advice that cannot work on a measure axis (fleet #2244).
  • `Accept: application/vnd.sdmx.data+json;version=1.0.0` is a 406. Their server lists genericdata+xml 2.1 and data+json 2.0 as acceptable. Plain application/json returns SDMX-JSON 1.0 and is what this pack asks for.
  • Wrong host looks like an outage. The older documented host api.stats.govt.nz answers HTTP 502 from its Azure Application Gateway on every path including the root. A 502 reads as "their service is down" when in fact the service moved. The live host is api.data.stats.govt.nz. Do not "fix" this pack back to the old hostname.
  • A bare SDMX resource path 404s. /rest/dataflow is 404 Resource not found; only the fully-qualified /rest/dataflow/{agency}/{resource}/{version} form answers.
  • Only 341 of the 911 dataflows carry a description; the rest are title-only, so keyword filtering leans on long formal titles ("Earnings for people in paid employment", never "wages").
  • CPI, GDP and merchandise trade are NOT in this catalogue. Measured 2026-09-17: 0 of 911 dataflows mention "price", "consumer" or "trade"; 705 are census tables. Describing the pack as covering CPI would misroute every inflation question to a source that cannot answer it.

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

{

"mcpServers": { "stats-nz": { "url": "https://gateway.pipeworx.io/stats-nz/mcp" } } }

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/stats-nz/mcp returns the tools in the table above plus the shared Pipeworx meta-tools — ask_pipeworx, discover_tools, search_within, remember/recall and the rest of the gateway-wide set. So the tool count you see is larger than this table: a single-pack endpoint currently lists roughly 30 shared tools alongside the pack's own. The connection's initialize response states its exact scope, and is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a scoped connection answer a question this pack does not cover — via ask_pipeworx, which routes across the whole catalog — without you adding a second MCP server. There is currently no way to mount a pack endpoint without them; if the extra schemas cost you more context than the routing is worth, connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:

{

"mcpServers": { "pipeworx": { "url": "https://gateway.pipeworx.io/mcp" } } }

Both URLs reach the same gateway and the same 1866+ data sources. The only difference is which pack's tools are listed directly; ask_pipeworx reaches all of them from either one.

No MCP client? Call it over HTTP

curl -X POST https://gateway.pipeworx.io/v1/tools/statsnz_datasets \

-H 'Content-Type: application/json' \ -d '{"query":"household income","limit":5}'

No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/statsnz_datasets. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.

Run it from npm

@pipeworx/mcp-stats-nz is a local stdio bridge to the Pipeworx gateway: your MCP client starts it with npx, and it forwards every call to the same https://gateway.pipeworx.io/stats-nz/mcp endpoint shown above. It needs network access; there is no offline mode.

{

"mcpServers": { "stats-nz": { "command": "npx", "args": ["-y", "@pipeworx/mcp-stats-nz"] } } }

Without a key it calls anonymously, capped at 50 calls a day. A free account raises that to 200 a day: get a key at https://pipeworx.io/signup and add "env": { "PIPEWORX_API_KEY": " " } to the server entry. The key is sent as a Bearer token, the same way a hosted connection sends it, so calls are metered and billed exactly as they are there.

It lists only this pack's tools by default. Set PIPEWORX_META_TOOLS=1 to also list ask_pipeworx and the other gateway-wide tools.

Behind an HTTPS proxy: Node's built-in fetch does not read HTTPS_PROXY by default. Newer Node releases honour it when NODE_USE_ENV_PROXY=1 is set; check your Node version's documentation.

Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:

ask_pipeworx({ question: "your question about Stats Nz data" })

The gateway picks the right tool and fills the arguments automatically.

More

License

MIT

Pregunta a PopNx