Back to Browse

Hcup Inpatient Stats MCP Server

Developer ToolsModerate5.6MCP RegistryLocalRemote
Free

Server data from the Official MCP Registry

HCUP Inpatient Stats — national hospitalization discharges, costs and outcomes by condition and…

About

HCUP Inpatient Stats — national hospitalization discharges, costs and outcomes by condition and…

Remote endpoints: streamable-http: https://gateway.pipeworx.io/hcup-inpatient-stats/mcp

Security Report

5.6
Moderate5.6Moderate Risk

This is a keyless, read-only MCP server that serves transcribed AHRQ HCUP aggregate statistics from hardcoded static tables, with no network calls, shell execution, file access, or credential handling observed in the provided code. The only notable issues are minor: the data file is truncated so its full contents could not be verified, and the README describes gateway-level meta-tools and a remote endpoint that are outside the audited source. Permissions are minimal and match the server's purpose. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 3 high severity).

5 files analyzed · 9 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

How to Install & Connect

Available as Local & Remote

This plugin can run on your machine or connect to a hosted endpoint. during install.

Documentation

View on GitHub

From the project's GitHub README.

hcup-inpatient-stats

National U.S. hospital inpatient discharges, aggregate costs, and sepsis outcomes by principal diagnosis and year, from the Agency for Healthcare Research and Quality's Healthcare Cost and Utilization Project (HCUP).

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.

This answers questions like "how many heart failure hospitalizations were there nationally, and what did they cost" — the kind of number epidemiology and market-sizing claims lean on, cited the way HFSA/AHA cite it: AHRQ HCUP for hospitalization and cost figures.

Tools

  • condition_hospital_costs(year?, payer?, condition?) — the top-20 most expensive principal-diagnosis conditions nationally for a year (2022 or 2017), with discharge counts, aggregate cost, and mean cost per stay. Optionally filtered to one condition ("heart failure", "sepsis", a CCSR code) or one expected payer (2022 only: Medicare, Medicaid, private insurance, self-pay).
  • sepsis_hospital_outcomes(period?, population?) — national sepsis (principal diagnosis) average length of stay and mean cost per stay by year, 2016–2021, with/without a co-occurring COVID-19 diagnosis, broken out by patient population (adult 65+, adult 18–64, maternal, pediatric, neonatal). Also reports any-listed-diagnosis sepsis stay counts for the years AHRQ printed a number (2016, 2019, 2021) — a broader population than principal diagnosis, clearly labeled and never mixed with it.

Auth

Keyless.

Data sources

  • Agency for Healthcare Research and Quality (AHRQ), Healthcare Cost and Utilization Project (HCUP) — the "Most Expensive Conditions by Payer" Statistical Brief series (2022 and 2017 editions) and the sepsis-outcomes Statistical Brief (2016–2021). These are AHRQ's own aggregate reports computed from the National Inpatient Sample and published freely, with no account or data use agreement.

What this pack deliberately does NOT use: HCUP's National Inpatient Sample (NIS) and Nationwide Readmissions Database (NRD) microdata files are purchased and governed by a clicked-through Data Use Agreement. This pack never touches those files or anything requiring that agreement — every number here comes from AHRQ's own public reports, which state the same underlying statistics without the DUA.

Why these numbers and not a live query: AHRQ's interactive query tools (publicly branded "HCUPnet" and "HCUP Fast Stats") were migrated to a Tableau Server deployment. It answers ordinary browser traffic with no login or account — this is not a DUA or credential wall — but a CloudFront-level WAF in front of it returns a 403 to plain HTTP clients regardless of User-Agent or header set, the same class of block a Cloudflare Worker's data-center egress IP would hit. That makes it unreliable to query live from here. AHRQ's static Statistical Brief reports (served from hcup-us.ahrq.gov, no such block) carry substantially the same aggregate numbers directly from the publisher, so this pack is built from those instead.

Refresh path: AHRQ posts new Statistical Briefs on an irregular schedule (no fixed annual cadence — as of 2026-10-21, the "Most Expensive Conditions" series has editions for 2004, 2006, 2008, 2011, 2013, 2017 and 2022, with no 2021 edition). Periodically check AHRQ's public statistical-briefs index (no account needed) for a newer cross-condition brief or sepsis-outcomes brief, re-transcribe its Table 1 (and any per-payer tables) into src/data.ts, and bump the *_DATA_AS_OF constants there. There is no API to poll — this is a manual, low-frequency transcription task, same as any other government report-based pack in this catalog.

Heart failure prevalence — not publicly tabulated

The acceptance criteria for this pack asked for heart failure prevalence from a public NCHS/CDC table. None was found. Checked:

  • data.cdc.gov (Socrata) — no dataset title or description matching "heart failure prevalence" or "heart failure" in the catalog search API. chronicdata.cdc.gov (PLACES / BRFSS) publishes self-reported "coronary heart disease or angina" prevalence by county/tract/place — a related but different measure (CHD/angina, not heart failure), and this pack does not substitute one for the other.
  • CDC NHIS (National Health Interview Survey) publishes a data query tool, but it is a client-side application with no discoverable public JSON endpoint found during this build, and cdc.gov/nchs/nhis/health-conditions.htm itself 403s to a plain client.
  • A national heart-failure prevalence figure (e.g. the commonly cited ~6.7 million US adults) traces back to published literature (AHA's "Heart Disease and Stroke Statistics" update) that derives it from NHANES exam and questionnaire microdata via survey-weighted analysis — NHANES publishes the raw microdata (including the congestive-heart-failure question) publicly, but NCHS does not publish a ready-made HF-prevalence table from it; that analysis step is not something this pack reproduces.

If a public NCHS/CDC prevalence table surfaces later, add it as a third tool rather than reopening this one.

Notes

  • "Discharges" / "hospital stays" are the unit of analysis throughout — a hospital stay, not a unique patient. A patient admitted multiple times in a year is counted once per stay.
  • Costs are the hospital's cost to produce the care (HCUP Cost-to-Charge Ratios applied to billed charges), not amounts paid by payers, and exclude separately billed physician fees.
  • Condition names and CCSR codes come from AHRQ's Clinical Classifications Software Refined (CCSR) for ICD-10-CM — the same system meps uses for its condition lookups (mcps/meps/src/conditions.ts), though this pack ships its own small synonym map scoped to the ~20-40 conditions that actually appear in these tables rather than the full CCSR taxonomy.

Quick Start

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

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

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/hcup-inpatient-stats/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/condition_hospital_costs \
  -H 'Content-Type: application/json' \
  -d '{"year":2022,"condition":"heart failure"}'

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

Standalone (no gateway account)

This package also runs as a local stdio MCP server — no Pipeworx account, no gateway round-trip:

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

Or run it directly to confirm it starts:

npx -y @pipeworx/mcp-hcup-inpatient-stats

It speaks MCP over stdin/stdout and answers initialize/tools/list/tools/call for only this pack's tools — none of the shared meta-tools the gateway connection above adds. Same source, same tools, no ask_pipeworx routing.

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 Hcup Inpatient Stats data" })

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

More

License

MIT

Reviews

No reviews yet

Be the first to review this server!