{
  "markdown": "# painprep-mcp-server\n\n> An [MCP](https://modelcontextprotocol.io) server for **interventional pain medicine** — Medicare documentation checklists, CPT/ICD-10 coding, ASRA anticoagulation guidance, prior-authorization letters, denial appeals, and research evidence for 85+ procedures.\n\nBuilt from [PainPrep](https://www.painprep.com) by Keith Schmidt, MD (triple board-certified pain medicine). This server makes PainPrep's clinical reference data available to any MCP client — Claude Desktop, Claude Code, or your own agent.\n\n> ⚠️ **Clinical decision-support, not medical advice.** All output must be reviewed by a licensed clinician. Coding, coverage, and anticoagulation guidance change frequently — always verify against current CMS/LCD policy and the latest ASRA guidelines.\n\n---\n\n## What it does\n\n| Tool | Tier | Description |\n|---|---|---|\n| `get_procedure_list` | **Free** | Full catalog of procedures grouped by category, with ids and headline CPT codes. |\n| `get_cpt_codes` | **Free** | Primary + add-on CPT codes, work RVUs, facility setting, and billing notes. |\n| `get_medicare_checklist` | Premium | Full LCD/Medicare documentation checklist with rationale, suggested wording, denial triggers, and admin checks. |\n| `get_icd10_codes` | Premium | Approved/supportive ICD-10 codes, codes to **avoid**, and coding tips. |\n| `get_contraindications` | Premium | Bleeding-risk tier + per-medication ASRA hold/resume guidance + safety checks. |\n| `get_prior_auth_letter` | Premium | Generates a payer-ready prior-authorization / medical-necessity letter from patient details + procedure data. |\n| `get_denial_reasons` | Premium | Common denial reasons with frequency, the fix for each, and an appeal letter snippet. |\n| `get_research_evidence` | Premium | Evidence grade, summary, and key studies with citations. |\n| `check_documentation_completeness` | Premium | Audits a note against the required checklist and scores completeness, highlighting commonly-missed gaps. |\n\nEvery tool accepts a procedure as a **name, id, or CPT code** (e.g. `\"Lumbar/Sacral Interlaminar ESI\"`, `\"lesi\"`, or `\"62323\"`). Unrecognized queries return \"did you mean\" suggestions.\n\n---\n\n## Quick start (no install)\n\nThe fastest way to run the server — `npx` clones, builds, and launches it in one step:\n\n```bash\nnpx -y github:Goingparabolic/painprep-mcp-server\n```\n\nOr wire it straight into an MCP client (see [`examples/claude_desktop_config.json`](examples/claude_desktop_config.json)):\n\n```json\n{\n  \"mcpServers\": {\n    \"painprep\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"github:Goingparabolic/painprep-mcp-server\"],\n      \"env\": { \"PAINPREP_LICENSE_KEY\": \"PP-XXXX-XXXX-XXXX\" }\n    }\n  }\n}\n```\n\n---\n\n## Install & build (from source)\n\n```bash\ngit clone https://github.com/Goingparabolic/painprep-mcp-server.git\ncd painprep-mcp-server\nnpm install\n\n# Extract the clinical data from the PainPrep source (one-time; see \"Data\" below)\nnpm run extract           # reads the PainPrep HTML → src/data/*.json\n\nnpm run build             # compile TypeScript → dist/ and copy data\nnpm run smoke             # end-to-end test (optional)\n```\n\n> The repository ships with the extracted JSON in `src/data/`, so `npm run extract` is only needed to regenerate it from an updated PainPrep source.\n\n---\n\n## Use with Claude Desktop\n\nAdd to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"painprep\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/painprep-mcp-server/dist/index.js\"],\n      \"env\": { \"PAINPREP_LICENSE_KEY\": \"PP-XXXX-XXXX-XXXX\" }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. You'll then be able to ask things like:\n\n- *\"List the SI joint procedures.\"*\n- *\"What are the CPT codes and RVUs for lumbar RFA?\"*\n- *\"Draft a prior-auth letter for a lumbar ESI for a patient with 5 months of L5 radiculopathy who failed 8 weeks of PT.\"*\n- *\"My note for an LESI documents MRI findings and pain score — what's missing for Medicare?\"*\n\nSee [`examples/claude_desktop_config.json`](examples/claude_desktop_config.json) for an `npx` variant.\n\n## Use with Claude Code\n\n```bash\nclaude mcp add painprep -- node /absolute/path/to/painprep-mcp-server/dist/index.js\n```\n\n## Inspect locally\n\n```bash\nnpm run inspect          # opens the MCP Inspector against the stdio server\n```\n\n---\n\n## Remote hosting (HTTP / SSE)\n\nThe same tools are served over **Streamable HTTP** for remote deployment (MCPize, a VPS, or serverless):\n\n```bash\nnpm run build\nPORT=3000 node dist/http.js\n# → POST http://localhost:3000/mcp     (GET /health for a liveness check)\n```\n\nThe HTTP transport is **stateless and multi-tenant**: the per-customer license key is read from a request header, so a single deployment can serve many customers.\n\n```\nX-PainPrep-License: PP-XXXX-XXXX-XXXX     (preferred)\nAuthorization: Bearer PP-XXXX-XXXX-XXXX   (also accepted)\n```\n\n---\n\n## Pricing & availability\n\n| Tier | Price | Tools included |\n|---|---|---|\n| **Free** | $0 | `get_procedure_list`, `get_cpt_codes` |\n| **Premium** | **$29/month** | All 9 tools — Medicare checklists, ICD-10 guidance, ASRA anticoagulation checks, prior-auth letters, denial appeals, research evidence, documentation auditing |\n\n### Get Premium\n\nPurchase a Premium license key via Stripe:\n\n> **[Subscribe to PainPrep Premium ($29/mo)](https://buy.stripe.com/test/plink_1TckcpAOGBky7q8cI4yV4A2w)**\n\nAfter subscribing you'll receive a license key in the format `PP-XXXX-XXXX-XXXX`. Set it in your MCP client configuration (see setup instructions above).\n\n### Where to find PainPrep\n\nPainPrep is available on multiple MCP marketplaces:\n\n- **[MCPize Marketplace](https://mcpize.com/mcp/painprep)** — deploy-and-subscribe hosting with 80% revenue share\n- **[Apify Store](https://apify.com/painprep/painprep-mcp)** — pay-per-event pricing, distributed across Make, n8n, and partner platforms\n- **Self-hosted** — clone this repo and run it yourself (see Remote hosting above)\n\n---\n\n## Monetization & licensing\n\nThe server has a built-in **free / premium** split designed to be wired to a billing provider (Stripe, MCPize) with minimal change.\n\n- **Free tier:** `get_procedure_list`, `get_cpt_codes`.\n- **Premium tier:** everything else.\n\nPremium tools are still *discoverable* (they appear in `tools/list` so clients can advertise the upgrade), but calling one without a valid entitlement returns an upgrade prompt instead of data.\n\n### Entitlement resolution\n\nConfigured via environment variables (stdio) or request headers (HTTP):\n\n| Variable | Purpose |\n|---|---|\n| `PAINPREP_LICENSE_KEY` | The customer's license key. |\n| `PAINPREP_TIER` | Force `premium` or `free` (self-hosted / enterprise override). |\n| `PAINPREP_VALID_KEYS` | Comma-separated allowlist of keys treated as valid premium (manual provisioning / testing). |\n| `PAINPREP_LICENSE_VERIFY_URL` | Optional HTTP endpoint for **remote** key verification. When set, keys are validated against this service instead of locally. |\n\nA locally-issued key matches the format `PP-XXXX-XXXX-XXXX`. For production, point `PAINPREP_LICENSE_VERIFY_URL` at your billing webhook; it should accept `{ \"key\": \"...\" }` and return `{ \"valid\": true, \"tier\": \"premium\", \"expiresAt\": \"...\" }`.\n\nThe verification layer lives entirely in [`src/licensing.ts`](src/licensing.ts) behind a `LicenseProvider` interface — swap the implementation without touching any tool.\n\n---\n\n## Project structure\n\n```\npainprep-mcp-server/\n├── src/\n│   ├── index.ts          # stdio entry point (Claude Desktop / Code)\n│   ├── http.ts           # Streamable HTTP entry point (remote hosting)\n│   ├── server.ts         # builds the MCP server + tier gating\n│   ├── licensing.ts      # free/premium entitlement (pluggable)\n│   ├── data.ts           # data loading + procedure resolver\n│   ├── types.ts          # clinical data types\n│   ├── tools/            # one file per MCP tool\n│   └── data/             # extracted clinical data (JSON)\n├── scripts/\n│   ├── extract-data.mjs  # parse PainPrep HTML → src/data/*.json\n│   ├── copy-assets.mjs   # copy JSON into dist/ at build\n│   └── smoke-test.mjs    # end-to-end MCP client/server test\n├── examples/\n│   └── claude_desktop_config.json\n├── package.json\n├── tsconfig.json\n├── LICENSE\n└── README.md\n```\n\n## Data\n\nClinical data is extracted from the PainPrep application source. The extractor\n(`scripts/extract-data.mjs`) locates the embedded data objects (`CATEGORIES`,\n`CHECKLISTS`, `ANTICOAG`, `MED_NECESSITY`, `ICD10_REF`, `DENIAL_TEMPLATES`,\n`CPT_DETAILS`, `RESEARCH_EVIDENCE`), evaluates each literal in a sandbox, and\nwrites clean JSON to `src/data/`. To regenerate from an updated source:\n\n```bash\nnpm run extract -- \"/path/to/painprep-mvp.html\"\n```\n\n---\n\n## License\n\n[MIT](LICENSE) © 2026 Keith Schmidt, MD\n\nThe clinical reference content is provided for educational and decision-support\npurposes only and does not constitute medical advice.\n",
  "bytes": 8920,
  "sha": "d5ab1dd5efa4a9ee2a6c3fed5d45fdc876fd982938fcfffd193dba8498a00c7b",
  "repo_slug": "goingparabolic/painprep-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_goingparabolic_painprep_mcp_se_4ed0d21e/readme"
}