Skip to content

Releases: cyanheads/openfda-mcp-server

v0.7.1: Mirror non-unique-key lookups narrowed to single-record matches

Choose a tag to compare

@cyanheads cyanheads released this 27 Jul 07:48
v0.7.1
391886f

Mirror non-unique-key lookups narrowed to single-record matches

  • event_id/product_ndc/set_id lookups now serve from the mirror only when the value addresses exactly one record; two or more route live at any page size, matching the API's relevance-ordered response instead of a primary-key-ordered mirror slice (#37)

CHANGELOG v0.7.1

v0.7.0: local openFDA bulk mirror

Choose a tag to compare

@cyanheads cyanheads released this 27 Jul 07:24
v0.7.0
a7ede38

local openFDA bulk mirror

  • Opt-in local SQLite mirror of drug/label, drug/ndc, drug/enforcement, drug/drugsfda — answers exact-key lookups without spending API budget, live fallback by default (#4)
  • New env vars: OPENFDA_MIRROR_ENABLED, OPENFDA_MIRROR_PATH, OPENFDA_MIRROR_REFRESH_CRON, OPENFDA_MIRROR_FALLBACK_LIVE, OPENFDA_MIRROR_REFRESH_TIMEOUT_MS, OPENFDA_MIRROR_BASE_URL; mirror:init/refresh/verify/status scripts
  • fix: tree generator now matches directory-only gitignore patterns, so gitignored dirs stop leaking into docs/tree.md
  • deps: optional peer deps better-sqlite3 (>=11) and node-cron (>=4)

CHANGELOG v0.7.0

v0.6.0: get_drug_label section outlines, reachable pagination contract, canvas parity

Choose a tag to compare

@cyanheads cyanheads released this 27 Jul 00:33
v0.6.0
bb234b1

get_drug_label section outlines, reachable pagination contract, canvas parity

  • openfda_get_drug_label returns kind: "outline" (section names + sizes) instead of the full record when a page exceeds the inline size budget; a new sections input retrieves specific sections by name — this is the behavioral change driving the minor (#11)
  • Every paginated tool's skip is no longer schema-capped at 25000; handlers now raise the declared pagination_limit_reached reason with recovery text instead of an unreachable generic validation error (#27)
  • Dynamic-record renderers across search_adverse_events, search_animal_events, search_device_clearances, search_drug_approvals, search_drug_shortages, search_tobacco_reports, and lookup_ndc route every field into content[] to match structuredContent, and fix a branch-order bug that misrouted device adverse-event reports through the drug renderer (#24)
  • Truncated canvas staging now points at openfda_count_values for whole-population aggregates instead of leaving GROUP BY queries to describe only the staged slice (#36)
  • dataframe_query unions table headers across all returned rows and renders nested values as JSON instead of collapsing them to [object Object]

CHANGELOG v0.6.0

v0.5.0: DataCanvas staging goes opt-in and byte-bounded

Choose a tag to compare

@cyanheads cyanheads released this 26 Jul 23:29
v0.5.0
eed71ae

DataCanvas staging goes opt-in and byte-bounded

Breaking: a canvas-backed search tool no longer drains its full matched
set by default. Staging now requires stage=true or a canvas_id — omit
both and the call costs one upstream request, same as canvas disabled.

  • Opt-in staging replaces the unconditional drain that pulled up to
    25,000 rows regardless of the caller's limit, timing out (178s
    locally, 502 on the hosted deployment) against large-record endpoints
    (#30)
  • The drain is now byte-budgeted (~16 MB) instead of row-unconditional,
    and the inline page serves the caller's limit/skip identically staged
    or not — fixing an empty-preview false negative on oversized records
    (#31) and skip disagreeing between staged and unstaged modes (#32)
  • openfda_dataframe_query maps canvas SQL errors onto its declared
    invalid_query/missing_table contract instead of leaking internal
    registerTable()/drop() API names, and discloses the 10,000-row query
    cap with a continuation query (#28, #29)
  • Internal: format-utils helpers consolidated across all eight staging
    tools; the framework's spillover() helper is no longer used in favor
    of a direct canvas drain

CHANGELOG v0.5.0

v0.4.3: classification fixes, blank-input validation, mcp-ts-core ^0.11.0

Choose a tag to compare

@cyanheads cyanheads released this 26 Jul 22:25
v0.4.3
3ebb476

classification fixes, blank-input validation, mcp-ts-core ^0.11.0

  • expectedStatuses: [404] quiets handled openFDA no-match 404s to debug-level logs (#22)
  • OPENFDA_QUERY_ERROR_5XX gains parse_exception, so malformed queries fail fast instead of retrying 4x as upstream_error (#33)
  • openfda_count_values distinguishes a Nothing to count 404 (not_aggregatable) from a genuine zero-match count (#34)
  • Every required and optional free-text input rejects blank/whitespace-only values before any upstream request (#25, #35)
  • openfda_drug_profile propagates auth/config/cancellation failures instead of reporting them as an unresolved drug, and reports per-section degradation (#26)
  • Security: Socket scanner wired into bunfig.toml install.security; .mcpb bundle now strips platform-specific @duckdb/node-bindings-* alongside the existing agent-doc strip
  • Repo hygiene: .gitignore anchoring, Dockerfile OTEL install flags, devcheck outdated-check refinement, scripts/skills resynced from the mcp-ts-core template
  • deps: @cyanheads/mcp-ts-core ^0.10.14 → ^0.11.0

CHANGELOG v0.4.3

v0.4.2: content[] truncation parity — recalls, adverse events, device clearances, drug approvals, drug shortages, NDC lookup

Choose a tag to compare

@cyanheads cyanheads released this 11 Jul 10:09
v0.4.2
88fae2e

content[] truncation parity — recalls, adverse events, device clearances, drug approvals, drug shortages, NDC lookup

Removes the shared 300-char field-renderer cap and six tool-specific truncation sites so content[] matches the full structuredContent data already exposed.

Fixed:

  • formatRemainingFields (format-utils.ts) dropped its 300-char default cap on the catch-all "remaining fields" renderer shared by every search tool's format(). (#21)
  • openfda_lookup_ndc renders every packaging[] entry (was capped at 5).
  • openfda_search_adverse_events renders the full mdr_text[].text narrative (was 500 chars) and JSON fallback dump (was 1000 chars).
  • openfda_search_device_clearances renders the full statement_or_summary (was 500 chars) and JSON fallback dump (was 500 chars).
  • openfda_search_drug_approvals renders every submissions[] entry (was capped at 10).
  • openfda_search_drug_shortages renders full availability (was 400 chars) and contact_info (was 200 chars).
  • openfda_search_recalls renders full product_description and reason_for_recall (was 300 chars each).

338 tests pass; bun run devcheck clean.

CHANGELOG v0.4.2

v0.4.1: tool-example fixes, query_shard_exception classification, template hardening

Choose a tag to compare

@cyanheads cyanheads released this 11 Jul 09:30
v0.4.1
d0cf4ba

tool-example fixes, query_shard_exception classification, template hardening

Corrects two search-tool examples and reclassifies an unmapped-sort 500 as
non-retryable; adopts mcp-ts-core ^0.10.14 template hardening.

Fixed:

  • openfda_search_drug_approvals: sponsor_name example corrected to
    "PFIZER" (the field is stored uppercase). (#20)
  • openfda_search_adverse_events: sort describe now names the sortable
    date field per category (drug/food/device). (#23)
  • Unmapped-sort 500s (query_shard_exception) now reclassified to a
    non-retryable query_error instead of retrying a query that can never
    succeed. (#23)

Changed:

  • Dockerfile: base image pinned to bun 1.3.14; build stage installs
    with --ignore-scripts.
  • bunfig.toml: minimumReleaseAge supply-chain guard (3-day hold),
    @cyanheads/mcp-ts-core excluded as first-party.
  • New: .github/SECURITY.md, .github/FUNDING.yml, .gitattributes.

Dependency bumps:

  • @cyanheads/mcp-ts-core ^0.10.10 → ^0.10.14
  • @biomejs/biome ^2.5.2 → ^2.5.3
  • @types/node ^26.1.0 → ^26.1.1
  • @vitest/coverage-istanbul ^4.1.9 → ^4.1.10
  • tsc-alias ^1.8.17 → ^1.9.0
  • vitest ^4.1.9 → ^4.1.10

335 tests pass; bun run devcheck clean.

CHANGELOG v0.4.1

v0.4.0: describe_fields endpoint parity, drug_profile Rx warnings fix

Choose a tag to compare

@cyanheads cyanheads released this 03 Jul 10:03
v0.4.0
5a22692

describe_fields endpoint parity, drug_profile Rx warnings fix

Added:

  • openfda_describe_fields now covers device/classification, device/registrationlisting, device/udi, device/covid19serology, and other/substance — the 5 count-only endpoints previously exposed only by openfda_count_values — reaching 20-endpoint parity between the two tools. (#16)

Fixed:

  • openfda_drug_profilelabel.warnings falls back boxed_warning ?? warnings_and_cautions ?? warnings, so Rx labels carrying a boxed warning (e.g. metformin, Humira) surface their safety text instead of null. (#19)

333 tests pass; bun run devcheck clean.

v0.3.3: Security patch: retry classification, typed canvas errors, DataCanvas preview paging

Choose a tag to compare

@cyanheads cyanheads released this 03 Jul 09:05
v0.3.3
5008cb4

Security patch: retry classification, typed canvas errors, DataCanvas preview paging

Reclassifies non-retryable openFDA query failures, types the disabled-DataCanvas
error, and fixes canvas-spillover preview limit/skip — plus a bundled dependency
refresh clearing 8 security advisories.

Fixed:

  • openfda-service no longer retries deterministic 5xx query failures (malformed
    search syntax, count on a non-keyword field); reclassified to a non-retryable
    query_error. Marker-free/transient 5xx stay retryable. (#14)
  • openfda_dataframe_describe / openfda_dataframe_query throw a typed
    canvas_disabled error when DataCanvas is disabled, instead of an untyped
    InternalError. (#15)
  • Canvas spillover's inline preview now honors limit/skip on all 8 search tools
    plus openfda_lookup_ndc; the full matched set still stages to the canvas. (#18)

Changed:

  • openfda-service adopts the framework's fetchWithTimeout (Bun-safe timeout,
    http.client.request.duration telemetry, api_key-redacted URLs).

Dependency bumps:

  • @cyanheads/mcp-ts-core ^0.10.9 → ^0.10.10
  • @biomejs/biome ^2.5.0 → ^2.5.2
  • @types/node ^26.0.0 → ^26.1.0

Security:

  • hono 4.12.26 → 4.12.27 — CORS wildcard-origin-with-credentials (high) plus
    4 moderate issues (serve-static path traversal, Lambda Set-Cookie merge,
    Body-Limit bypass, Lambda@Edge header drop)
  • js-yaml 3.14.2 → 3.15.0 — quadratic-complexity DoS via repeated aliases (moderate)
  • vite 8.0.14 → 8.1.3 — server.fs.deny bypass on Windows (high), launch-editor
    NTLMv2 hash disclosure (moderate)

bun audit: 8 advisories (2 high, 6 moderate) → 0.

323 tests pass; bun run devcheck clean.

v0.3.2: mcp-ts-core ^0.10.9 maintenance

Choose a tag to compare

@cyanheads cyanheads released this 20 Jun 17:33
v0.3.2
944cc11

mcp-ts-core ^0.10.9 maintenance

Framework upkeep only — no server source or tool behavior changes.

Dependency bumps:

  • @cyanheads/mcp-ts-core ^0.10.6 → ^0.10.9
  • @duckdb/node-api ^1.5.3-r.3 → ^1.5.4-r.1
  • @biomejs/biome ^2.4.16 → ^2.5.0
  • @types/node ^25.9.3 → ^26.0.0
  • vitest / @vitest/coverage-istanbul ^4.1.8 → ^4.1.9

Changed:

  • New check-dependency-specifiers devcheck step — fails on floating specifiers in package.json and bun.lock workspaces (cyanheads/mcp-ts-core#246)
  • lint-packaging check 10 validates plugin marketplace manifests; gated by devcheck.config.json packaging.pluginManifests (cyanheads/mcp-ts-core#240)
  • Fresh-scaffold guards on the changelog and git-dependent devcheck steps (cyanheads/mcp-ts-core#242, #243, #237)
  • Re-synced eight vendored skills to framework 0.10.9

314 tests pass; bun run devcheck clean.