Skip to main content
Glama
README.md
# Pearls | ShortageSignal — ChatGPT + Claude plugin (v1.2.3)

[![mcptry](https://mcptry.com/badge/com.glenride/pearls)](https://mcptry.com/servers/com.glenride/pearls)

Source-backed drug shortage intelligence from the weekly Glenride GA-01 snapshot.
**Tagline:** "Know what is reported. Know where it came from. Know when it was verified."

## MCP Registry

Published in the official MCP Registry as `com.glenride/pearls` (remote-only, streamable-http at https://pearls-mcp.glenride.com/mcp). Registry v1.2.4 adds the icon and this source repository link; the server code in this repo is v1.2.3, which is what the live endpoint reports. `server.json` at the repo root is the registry metadata. Website: https://pearls.glenride.com — drug shortage intelligence from FDA + ASHP public data, with attested weekly snapshots. Research context, not medical advice.

## Evidence-First

The AI is the interface; the evidence is the product. Every answer
carries a **Pearls Evidence Record** — the claim, the source, the
source record (event ID + source URL), the source dates, the time
Pearls verified it (`verified_at`), what was checked, what was NOT
verified, and the limitations. Pearls attests to what it retrieved,
recorded, and validated — never to absolute real-world truth, never
to local availability. See `ATTESTATION.md` for the standard.

## Brand

Pearls is the brand. ShortageSignal is one of four product lines under
Pearls — alongside Shortages&Shifts (LinkedIn), Digest (the Monday
digest / lead magnet), and Drug Shortage Intelligence (the full analysis,
paid $25/mo). ShortageSignal is a sibling of the others, not their parent.
The plugin is "Pearls | ShortageSignal"; the MCP server name is `pearls`.

## What it does

Four tools, summary results and individual records only:

| Tool | Purpose |
| --- | --- |
| `search_shortages` | Find shortage records by drug name (max 10 shown, total reported) |
| `get_drug_shortage_record` | One drug's shortage record; ambiguity asks one clarifying question |
| `get_shortage_snapshot` | Weekly totals + what changed since the previous snapshot |
| `render_shortage_widget` | Render validated data as an inline card (ChatGPT only) |

Every answer carries the snapshot date, the sources (openFDA Drug
Shortages API + ASHP Drug Shortages List), the Evidence Record, and
the line "Research context, not clinical guidance." Not-found is "not
in this snapshot," never "not in shortage." A record that disappears
is "no longer present in the current dataset," never "resolved." No
clinical guidance, no local-inventory claims, no accounts, no auth.

## Layout (actual — differs from PLAN.md §20 in one place)

The plan shows the server under `server/`; the build keeps it at the
package root `src/` (the stopped first attempt's scaffold + the
build-readiness review). Everything else follows the plan.

```
pearls-plugin/
├── plugin.json          # Agent Plugins manifest (schema 1.0.0)
├── mcp.json             # MCP server declaration (streamable-http, auth none)
├── .app.json            # registered MCP server mapping (template; app ID
│                        # is assigned at connection time)
├── README.md  PRIVACY.md  SUBMISSION.md  ATTESTATION.md  # the
│                        # Evidence-First standard + gap analysis
├── agents/openai.yaml   # skill → MCP server dependency
├── skills/pearls/       # SKILL.md + references/method.md
├── src/                 # MCP server (server.ts, shortages.ts, comparison.ts,
│                        # data.ts, evidence.ts, logging.ts, pearls.ts)
├── web/                 # React card component (src/component.tsx, dist/)
├── tests/               # §22 test suite + inspector checklist + package test
└── assets/              # logo + icons — PENDING, see assets/*/README.md
```

Data comes from the GA-01 snapshots at
`~/workspace/goals/glenride-weekly-drug-shortage-digest/files/snapshots/`
(latest dated dir wins; currently 2026-11-21). The snapshot files are
**not** shipped in the zip — the deployed server reads them from its own
snapshot store. Comparison diffs the two latest dated dirs by `event_id`;
it never trusts `prior_snapshot_date` or the precomputed
`deltas_vs_prior` (both compare against 2026-11-02).

## Run it (dev)

```bash
npm install
npm run build          # tsc + web component bundle (web/dist/component.js)
npm start              # serves /mcp on PORT (default 8787) + /health
```

Environment: `PORT` (default 8787), `PEARLS_SNAPSHOTS_DIR` (default:
the GA-01 snapshots dir above). Query logging appends to the GA-01
`query_log.jsonl` next to the snapshots (drug name only, no user
identifiers) and never breaks a query.

## Test it

```bash
npm test               # §22A/E/G live tools, §22B comparison, §22A failure
                       # paths, §22C skill, §22F UI, §22 evidence — 113
                       # checks, all green
bash tests/test-package.sh ~/workspace/your_files/pearls-plugin-v1.1.zip
                       # §22H clean-package test (fresh unpack)
```

The official MCP Inspector CLI was run against the local server:
`tools/list --strict` → 0 errors, 32 warnings (26 nullable type-array
notes — 14 base + 12 from the Evidence Record schema — + 6 deliberate
`additionalProperties` passthroughs — accepted, see `src/server.ts`);
`tools/call` (attestation line in text, evidence in structured
content), `resources/read`, and `--app-info` all verified. See
`tests/inspector-checklist.md` for the owner-side checks (§22D
ChatGPT response tests, §22E web-UI steps).

## Connect it — ChatGPT (owner's tap)

1. Deploy the server to a stable public HTTPS endpoint (see
   SUBMISSION.md — the proposed `pearls-mcp.dvaughnhouse.com` is
   **unverified**).
2. In ChatGPT: Settings → Apps → Developer mode → create an app with
   the `/mcp` URL, or load this folder as a local plugin package.
3. Run the §22D response tests in `tests/inspector-checklist.md`.

## Connect it — Claude (owner's tap)

Claude connects to the same MCP server through its supported remote-MCP
connector: add a custom connector with the server URL
(`https://<host>/mcp`), no auth. The server works headless — the widget
is ChatGPT-only presentation; all four tools are callable without UI.
Headless validation is covered by the §22G checks in `tests/test-live.ts`.

## Open items (not the builder's call)

- **Production endpoint unverified:** `pearls-mcp.dvaughnhouse.com`
  is the proposed URL in `mcp.json` / `.app.json` / `agents/openai.yaml`.
  Verify DNS/hosting before submission.
- **Brand assets missing:** no logo, no icons, no `category` in
  `plugin.json`. `brandColor` is `#16233d` (the navy the built card
  actually uses). Assets live in `assets/` when approved.
- **Privacy/terms pages not yet published:** `plugin.json` points at
  `https://pearls.dvaughnhouse.com/privacy` and `/terms` as the intended
  locations. Publish them before submission.
- **ChatGPT live connection + public submission:** owner's tap
  (Phase 9). See SUBMISSION.md.