# NHANES (design-correct survey analysis) (pypi · nhanes-mcp)

Design-correct NHANES analysis: survey weights, pooled cycles, CIs and NCHS reliability flags.

- Trust score: 75/100 (medium)
- Change this week: +3
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-05

## Components

- pypi · `nhanes-mcp`: 75/100 (this document), [markdown](https://verifymcp.io/servers/com-blackswancausallabs-nhanes-mcp/nhanes-mcp.md), [page](https://verifymcp.io/servers/com-blackswancausallabs-nhanes-mcp/nhanes-mcp)

## Channel facts

- Registry: `pypi`
- Package: `nhanes-mcp`
- Version: `0.5.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-05.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - Runs hatchling.build at install time, a recognised build step with no custom scripting around it.
  - 0 of 38 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 31 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 60/100
  - AI-judged instruction clarity (fair).
  - Context-footprint check failed: tool/resource definitions use about 2009 tokens (~118/item across 17 items; 17 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 70/100
  - Stability observed for 21 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 71/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 0% of tool parameters carry a description.
  - Structured output schemas are declared (6% of tools); any adoption earns full credit.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 17 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 17 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### How do I install the NHANES (design-correct survey analysis) MCP server?

NHANES (design-correct survey analysis) runs locally as a PyPI package, launched with uvx nhanes-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add com-blackswancausallabs-nhanes-mcp -- uvx nhanes-mcp
```

### Cursor

```json
{
  "mcpServers": {
    "com-blackswancausallabs-nhanes-mcp": {
      "command": "uvx",
      "args": [
        "nhanes-mcp"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "com-blackswancausallabs-nhanes-mcp": {
      "command": "uvx",
      "args": [
        "nhanes-mcp"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add com-blackswancausallabs-nhanes-mcp -- uvx nhanes-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "com-blackswancausallabs-nhanes-mcp": {
      "type": "local",
      "command": [
        "uvx",
        "nhanes-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add com-blackswancausallabs-nhanes-mcp --command uvx --arg nhanes-mcp
```

### Hermes

```yaml
mcp_servers:
  com-blackswancausallabs-nhanes-mcp:
    command: "uvx"
    args: ["nhanes-mcp"]
```

### Netclaw

```json
{
  "McpServers": {
    "com-blackswancausallabs-nhanes-mcp": {
      "Transport": "stdio",
      "Command": "uvx",
      "Arguments": [
        "nhanes-mcp"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add com-blackswancausallabs-nhanes-mcp -t stdio -c uvx -a nhanes-mcp
```

### Other

```json
{
  "mcpServers": {
    "com-blackswancausallabs-nhanes-mcp": {
      "command": "uvx",
      "args": [
        "nhanes-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-05 (score 75, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-11-04 (score 60, +1)

No change was recorded against any check on this day. Stability & Change Management went from 63 to 67. That category is still filling its 30-day observation window: 19 days of observed history at the previous scan, 20 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-03 (score 59, −15)

- [security regression] Malware scan: pass → unverified

### 2026-11-02 (score 74, +1)

No change was recorded against any check on this day. Stability & Change Management went from 57 to 60. That category is still filling its 30-day observation window: 17 days of observed history at the previous scan, 18 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-01 (score 73, 0)

- [security regression] Provenance: unverified → fail

### 2026-10-31 (score 73, +16)

- [security regression] Provenance: fail → unverified
- [security improvement] Malware scan: unverified → pass

### 2026-10-30 (score 57, −15)

- [security regression] Malware scan: pass → unverified

### 2026-10-28 (score 72, +1)

No change was recorded against any check on this day. Stability & Change Management went from 40 to 43. That category is still filling its 30-day observation window: 12 days of observed history at the previous scan, 13 at this one. The score rises as the window fills, whether or not the server changes.

## MCP tools (17)

### `list_cycles` (~25 tokens)

List NHANES cycles this server supports, their file-name conventions and weight rules.

### `analysis_guidance` (~26 tokens)

Rules for valid NHANES estimation that this server enforces. Read before analyzing.

Output parameters:

- `result` (string)

### `list_files` (~42 tokens)

List data files for a cycle and component (Demographics, Dietary, Examination, Laboratory, Questionnaire).

Input parameters:

- `component` (string, required)
- `cycle` (string, required)

### `search_variables` (~65 tokens)

Search NHANES variable names/descriptions (regex, case-insensitive) across cycles/components.
Defaults to the 2017-2018 cycle and all components.

Input parameters:

- `components`
- `cycles`
- `limit` (integer)
- `query` (string, required)

### `describe_variable` (~67 tokens)

Codebook entry (label, question text, target population, value codes) plus observed distribution.
Flags codes that look like refused/don't-know so they can be set to missing.

Input parameters:

- `cycle` (string, required)
- `table` (string, required)
- `variable` (string, required)

### `build_dataset` (~237 tokens)

Build an analysis-ready dataset: DEMO universe (all participants, needed for valid domain
estimation) left-joined to the requested tables on SEQN, for one or more cycles.

tables: base names without cycle suffix, e.g. ["BMX", "TCHOL", "BPQ"] (DEMO is always included).
variables: columns to keep from those tables (default: all). Weight/design variables are always kept.
The analysis weight is chosen and rescaled automatically -> column WT_ANALYSIS. Subsample weights
carried by a file (fasting WTSAF2YR, phlebotomy WTPH2YR, surplus serum WTSSMC2Y/4Y, ...) are detected.
weight: optional weight kind to force, e.g. 'WTSSMC' or 'WTMEC' (without the 2YR/4YR suffix). The server
warns if it is less restrictive than the automatic choice.

Input parameters:

- `cycles` (array, required)
- `include_mortality` (boolean)
- `tables` (array, required)
- `variables`
- `weight`

### `describe_dataset` (~32 tokens)

Columns, non-missing counts, weight choice, derived-variable definitions and warnings.

Input parameters:

- `dataset_id` (string, required)

### `set_weight` (~117 tokens)

Replace the analysis weight with a custom expression over existing columns, e.g.
'coalesce(WTSSMC4Y * 4/6, WTSSMC2Y * 2/6)'. Use only when build_dataset cannot select the right
weight. The change is recorded and reported (weight kind 'CUSTOM' + a warning) in every later result.
Negative or missing weights become 0 (out of sample).

Input parameters:

- `dataset_id` (string, required)
- `expression` (string, required)
- `reason` (string, required)

### `set_missing` (~59 tokens)

Recode sentinel values (e.g. 7, 9, 77, 99 for refused/don't know) to missing.

Input parameters:

- `codes` (array, required)
- `dataset_id` (string, required)
- `variable` (string, required)

### `derive_variable` (~193 tokens)

Create a variable from an expression over existing columns, e.g.
name='OBESE', expression='BMXBMI >= 30'  (booleans become 0/1).
missing: 'any' -> result missing if ANY referenced column is missing (default, conservative);
         'all' -> missing only if ALL referenced columns are missing (for OR-type definitions);
         'none' -> no propagation.
Missing-aware functions: coalesce(a, b, ...), fillna(x, value), isna(x), notna(x),
where(cond, a, b). Columns used only inside them are exempt from the missing rule.
Design columns (WT_ANALYSIS, strata, PSU, SEQN, CYCLE) cannot be overwritten here; use set_weight.

Input parameters:

- `dataset_id` (string, required)
- `expression` (string, required)
- `missing` (string)
- `name` (string, required)

### `survey_estimate` (~247 tokens)

Design-based estimate (Taylor linearization) of a mean, proportion (0/1 variable) or total.
domain: expression defining the subpopulation, e.g. 'RIDAGEYR >= 20 & RIDEXPRG != 1'
        (the design is NOT subset; out-of-domain records get zero weight).
by: grouping variables, e.g. ['RIAGENDR'].
age_adjust: a preset name ('nchs_adults_20plus': 2000 census, 20-39/40-59/60+) or a custom standard
    {"groups": [[6,11],[12,19],[20,29]], "population": [24.6, 32.5, 38.3]} (or "proportions"),
    optionally "age_var" (default RIDAGEYR) and "note" naming the source of the standard.
Proportions come with Korn-Graubard CIs and NCHS reliability flags.

Input parameters:

- `age_adjust`
- `by`
- `dataset_id` (string, required)
- `domain`
- `statistic` (string)
- `variable` (string, required)

### `survey_regression` (~76 tokens)

Survey-weighted linear ('gaussian') or logistic ('binomial') regression with design-based SEs.
Categorical predictors must be dummy-coded first with derive_variable.

Input parameters:

- `dataset_id` (string, required)
- `domain`
- `family` (string)
- `outcome` (string, required)
- `predictors` (array, required)

### `flag_from_long_table` (~157 tokens)

Add a per-person 0/1 indicator from a file with several rows per participant (e.g. RXQ_RX
prescriptions, DR1IFF foods). Flag = 1 if ANY row's value in ANY of `columns` matches the regex
\`pattern` (case-insensitive), e.g. table='RXQ_RX', columns=['RXDRSC1','RXDRSC2','RXDRSC3'],
pattern='^G40' for ICD-10 epilepsy as the reason for use. People absent from the file are missing.

Input parameters:

- `columns` (array, required)
- `dataset_id` (string, required)
- `name` (string, required)
- `pattern` (string, required)
- `table` (string, required)

### `survey_frequency` (~104 tokens)

Weighted distribution of a categorical variable (Table 1 style): for each level, unweighted n,
weighted percent, SE and Korn-Graubard CI, within the domain and optionally by group.
labels: optional {code: label} map, e.g. {"1": "Male", "2": "Female"}.

Input parameters:

- `by`
- `dataset_id` (string, required)
- `domain`
- `labels`
- `variable` (string, required)

### `survey_cox` (~129 tokens)

Survey-weighted Cox proportional hazards model (Breslow ties, Binder linearized variance;
same estimator as SUDAAN SURVIVAL / R svycoxph). Typical use with include_mortality=True:
time='PERMTH_INT' (or PERMTH_EXM), event='MORTSTAT', domain including 'ELIGSTAT == 1'.
Categorical predictors must be dummy-coded first with derive_variable.

Input parameters:

- `dataset_id` (string, required)
- `domain`
- `event` (string, required)
- `predictors` (array, required)
- `time` (string, required)

### `export_dataset` (~49 tokens)

Write the analytic dataset (with WT_ANALYSIS, SDMVSTRA_U, SDMVPSU) to CSV plus a provenance sidecar.

Input parameters:

- `dataset_id` (string, required)
- `filename`

### `show_results` (~384 tokens)

Present design-based results: headline estimate, subgroup panels, the analysis plan (so the user
can check how the question was interpreted), server warnings, NCHS benchmarks and provenance.
Returns a text summary plus structured data; when the optional NHANES Results Explorer add-on is
installed, MCP Apps hosts also render it as an interactive view.

Same estimation arguments as survey_estimate (dataset_id, variable, statistic, domain, age_adjust);
by: one panel per grouping variable, e.g. ['RIAGENDR', 'RIDRETH3', 'AGEGRP'] (age-adjustment is
skipped for age groupings -- names starting with AGE or RIDAGE, or containing _AGE -- whose panels
are age-specific).
title / question / outcome_label / population_label / rationale: plain-language analysis plan.
group_names: {"AGEGRP": "Age group"}; group_labels: {"AGEGRP": {"1": "20-39", ...}} (common NHANES
demographics are labeled automatically).
benchmarks: published comparators, e.g. [{"label": "Obesity 2021-23", "published": 40.3,
"source_label": "NCHS Data Brief 508", "source_url": "https://...", "by": "RIAGENDR", "level": "1"}]
(published in percent for proportions; omit by/level for the overall estimate).

Input parameters:

- `age_adjust`
- `benchmarks`
- `by`
- `dataset_id` (string, required)
- `domain`
- `group_labels`
- `group_names`
- `outcome_label`
- `population_label`
- `question`
- `rationale`
- `statistic` (string)
- `title`
- `variable` (string, required)

## Diagnostics

Captured diagnostic sections: Provenance, Install scripts, Dependencies. The full working is on the page: https://verifymcp.io/servers/com-blackswancausallabs-nhanes-mcp/nhanes-mcp#diagnostics

## Score history

- 2026-11-05: 75
- 2026-11-04: 60
- 2026-11-03: 59
- 2026-11-02: 74
- 2026-11-01: 73
- 2026-10-31: 73
- 2026-10-30: 57
- 2026-10-29: 72
- 2026-10-28: 72
- 2026-10-27: 71
- 2026-10-26: 71
- 2026-10-25: 70
- 2026-10-24: 70
- 2026-10-23: 69
- 2026-10-22: 65
- 2026-10-21: 65
- 2026-10-20: 65
- 2026-10-19: 65
- 2026-10-18: 65
- 2026-10-17: 65
- 2026-10-16: 65
- 2026-10-15: 65
- 2026-10-14: 39
- 2026-10-13: 24
- 2026-10-12: 39
- 2026-10-05: 24

## Common questions

### What is the NHANES (design-correct survey analysis) MCP server?

NHANES (design-correct survey analysis) is an MCP server listed in the public MCP registry as com.blackswancausallabs/nhanes-mcp. Design-correct NHANES analysis: survey weights, pooled cycles, CIs and NCHS reliability flags. This page covers its PyPI package (nhanes-mcp).

### Is the NHANES (design-correct survey analysis) MCP server safe to use?

NHANES (design-correct survey analysis) scores 75 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 5 November 2026. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the NHANES (design-correct survey analysis) MCP server expose?

NHANES (design-correct survey analysis) exposes 17 tools: list_cycles, analysis_guidance, list_files, search_variables, describe_variable, and 12 more. Their descriptions and schemas cost roughly 2,009 tokens of context every time the server is loaded.

### Is the NHANES (design-correct survey analysis) MCP server still maintained?

NHANES (design-correct survey analysis) is still listed as active in the MCP registry. We last reached this channel on 5 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the NHANES (design-correct survey analysis) MCP server under?

NHANES (design-correct survey analysis) declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

- PyPI project: https://pypi.org/project/nhanes-mcp/
- Socket report: https://socket.dev/pypi/package/nhanes-mcp
- Repository: https://github.com/Black-Swan-Causal-Labs/nhanes-mcp
- Website: https://blackswancausallabs.com/blog.html
- Changelog RSS feed: https://verifymcp.io/servers/com-blackswancausallabs-nhanes-mcp/nhanes-mcp.xml
- Changelog JSON feed: https://verifymcp.io/servers/com-blackswancausallabs-nhanes-mcp/nhanes-mcp.json
- HTML version of this page: https://verifymcp.io/servers/com-blackswancausallabs-nhanes-mcp/nhanes-mcp
