{"id":30359070,"url":"https://github.com/cicatriiz/cdisc-library-mcp-server","last_synced_at":"2026-04-16T04:02:41.455Z","repository":{"id":309624825,"uuid":"1036978066","full_name":"Cicatriiz/cdisc-library-mcp-server","owner":"Cicatriiz","description":"DXT-packaged MCP server for the CDISC Library (discovery, Biomedical Concepts, SDTM Dataset Specializations)","archived":false,"fork":false,"pushed_at":"2025-08-12T22:14:58.000Z","size":1885,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T21:38:55.060Z","etag":null,"topics":["ai","api","biomedical-concepts","cdisc","dxt","healthcare","healthcare-ai","healthcare-application","healthcare-data","llm","mcp","model-context-protocol","openapi","public-health","sdtm","standards","tooling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cicatriiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-12T21:54:12.000Z","updated_at":"2025-08-12T22:15:01.000Z","dependencies_parsed_at":"2025-08-13T00:21:46.667Z","dependency_job_id":null,"html_url":"https://github.com/Cicatriiz/cdisc-library-mcp-server","commit_stats":null,"previous_names":["cicatriiz/cdisc-library-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cicatriiz/cdisc-library-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cicatriiz%2Fcdisc-library-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cicatriiz%2Fcdisc-library-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cicatriiz%2Fcdisc-library-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cicatriiz%2Fcdisc-library-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cicatriiz","download_url":"https://codeload.github.com/Cicatriiz/cdisc-library-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cicatriiz%2Fcdisc-library-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api","biomedical-concepts","cdisc","dxt","healthcare","healthcare-ai","healthcare-application","healthcare-data","llm","mcp","model-context-protocol","openapi","public-health","sdtm","standards","tooling"],"created_at":"2025-08-19T11:19:39.922Z","updated_at":"2026-04-16T04:02:41.433Z","avatar_url":"https://github.com/Cicatriiz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CDISC Library MCP Server (DXT)\n\nThis MCP server provides a compact, task‑oriented wrapper around the CDISC Library. It covers discovery (suggest + search), Biomedical Concepts (latest + versioned packages), and SDTM Dataset Specializations (latest + packages). Use it to search, fetch a concept or specialization with one call, then follow `_links` for deeper context. For reproducible results tied to an effective date, use package routes; for exploration, use latest routes.\n\n### About CDISC and the CDISC Library\n- **CDISC**: A global, non‑profit that develops data standards to streamline clinical research and enable interoperability. See the [CDISC website](https://www.cdisc.org).\n- **CDISC Library**: Programmatic access to CDISC standards and artifacts (e.g., SDTM, CDASH, ADaM, Controlled Terminology), including Biomedical Concepts and SDTM Dataset Specializations. Browse via the [Library Browser](https://library.cdisc.org/browser) and obtain API access from the [Developer Portal](https://api.developer.library.cdisc.org).\n\n### Requirements\n- **Node.js**: \u003e= 18\n- **CDISC Library API key**: subscription key from the Developer Portal\n\n### Get an API key\n1. Create/sign in to a CDISC Library account.\n   - Browser login: [library.cdisc.org](https://library.cdisc.org/browser)\n2. Open the API Management Developer Portal and sign in with the same credentials.\n   - Developer Portal: [api.developer.library.cdisc.org](https://api.developer.library.cdisc.org)\n3. Retrieve your subscription key (API key) on the portal.\n4. Use the key as `api-key` in a header (recommended) or query string.\n\n### Run locally\n```bash\nexport CDISC_API_KEY=your_key_here\nnpm start\n```\n\n#### Shell examples\n- **bash/zsh**:\n```bash\nexport CDISC_API_KEY=your_key\nexport CDISC_AUTH_LOCATION=header   # or: query\nnpm start\n```\n- **fish**:\n```fish\nset -x CDISC_API_KEY your_key\nset -x CDISC_AUTH_LOCATION header   # or: query\nnpm start\n```\n- **PowerShell**:\n```powershell\n$env:CDISC_API_KEY = \"your_key\"\n$env:CDISC_AUTH_LOCATION = \"header\"   # or: \"query\"\nnpm start\n```\n\n### Configuration (environment variables)\n- **CDISC_API_KEY** (required): your subscription key\n- **CDISC_AUTH_LOCATION** (optional): `header` (default) or `query`\n- **CDISC_AUTH_HEADER** (optional): header name when using header auth, default `api-key`\n- **CDISC_AUTH_QUERY** (optional): query param name when using query auth, default `api-key`\n- **CDISC_API_BASE_URL** (optional): override server base URL, default `https://api.library.cdisc.org`\n- **CDISC_OPENAPI_DIR** (optional): directory for OpenAPI YAML; defaults to `server/openapi`. The `manifest.json` sets this to `${DXT_DIR}/server/openapi` when packaged as DXT so the extension is self‑contained.\n\n#### Caching and resilience\n- **CDISC_CACHE_ENABLED** (optional): set to `0` to disable caching. Default: enabled.\n- **CDISC_CACHE_TTL_MS** (optional): TTL for GET responses in milliseconds. Default: `60000`.\n- **CDISC_CACHE_MAX_ENTRIES** (optional): max cache entries (LRU). Default: `500`.\n- **CDISC_RETRY_COUNT** (optional): number of retries for transient 5xx/network errors. Default: `2`.\n- **CDISC_RETRY_BACKOFF_MS** (optional): base backoff per attempt in ms. Default: `300`.\n- **CDISC_CACHE_DEBUG** (optional): set to `1` to log cache/retry activity to stderr.\n - **CDISC_CACHE_PERSIST_PATH** (optional): file path to persist cache to disk (JSON). Default: disabled.\n - **CDISC_CACHE_EXCLUDE_REGEX** (optional): regex to exclude cache matches; defaults also exclude search/suggest.\n - **CDISC_CACHE_INCLUDE_REGEX** (optional): regex to force-include cache matches.\n\n### Package as a DXT extension\n- Spec: [DXT MANIFEST.md](https://github.com/anthropics/dxt/blob/main/MANIFEST.md)\n- CLI: [DXT CLI.md](https://github.com/anthropics/dxt/blob/main/CLI.md)\n\n```bash\n# Option A: one‑off\nnpm install -g @anthropic-ai/dxt\ndxt pack        # creates cdisc-library-mcp.dxt in the project directory\n\n# Option B: via npm script\nnpm run pack:dxt\n```\n\n### Install in clients\n- **Claude Desktop**: open the generated `.dxt` file to install the local MCP server.\n- Any DXT‑compatible app can load this extension per its instructions. See the DXT repo: `https://github.com/anthropics/dxt`.\n\n### Tools exposed by the server\n- **Generic**:\n  - `list_operations(filter?)`\n  - `call_operation(operationId, pathParams?, query?, body?, headers?, timeoutMs?)`\n- **Cache management**:\n  - `cache.clear()` — clear all in-memory cache entries\n  - `cache.invalidate(contains?, regex?)` — invalidate entries by substring or regex match\n- **Discovery**:\n  - `search.suggest(q, top?, select?)`\n  - `search.query(q, start?, pageSize?, facets?, filters?)`\n- **Biomedical Concepts (latest)**:\n  - `bc.list(category?)`, `bc.get(conceptId)`, `bc.categories()`\n- **Biomedical Concepts (packages)**:\n  - `bc.packages.list()`, `bc.packages.listConcepts(package)`, `bc.packages.getConcept(package, conceptId)`\n- **SDTM Specializations (latest)**:\n  - `sdtm.list(domain?)`, `sdtm.get(datasetSpecializationId)`, `sdtm.domains()`, `sdtm.byBiomedicalConcept(conceptId)`\n- **SDTM Specializations (packages)**:\n  - `sdtm.packages.list()`, `sdtm.packages.listSpecializations(package)`, `sdtm.packages.getSpecialization(package, datasetSpecialization)`\n\n### Quick API reference\n- **Auth \u0026 bases**:\n  - API key (header or query): `api-key: \u003cYOUR_KEY\u003e`\n  - Library base: `https://api.library.cdisc.org/api`\n  - Cosmos BC base: `https://api.library.cdisc.org/api/cosmos/v2/mdr/bc`\n  - Cosmos SDTM Specializations base: `https://api.library.cdisc.org/api/cosmos/v2/mdr/specializations`\n\n- **Discovery**:\n  - GET `/mdr/suggest` — params: `q`, `top`, `select`\n  - GET `/mdr/search` — params: `q` (req), `start`, `pageSize`, `facets`, filters `domain|codelist|conceptId|product|version|dataset|variable|standard`\n\n- **Biomedical Concepts**:\n  - Latest: `/biomedicalconcepts`, `/biomedicalconcepts/{biomedicalconcept}`, `/categories`\n  - Version‑locked: `/packages`, `/packages/{package}/biomedicalconcepts`, `/packages/{package}/biomedicalconcepts/{biomedicalconcept}`\n  - Key fields: `_links`, `conceptId`, `href`, `categories`, `shortName`, `synonyms`, `resultScales`, `definition`, `coding`, `dataElementConcepts`, `ncitCode`\n\n- **SDTM Dataset Specializations**:\n  - Latest: `/sdtm/datasetspecializations?domain=VS|LB|…`, `/sdtm/datasetspecializations/{dataset_specialization_id}`, `/sdtm/domains`, by BC: `/datasetspecializations?biomedicalconcept={conceptId}`\n  - Version‑locked: `/sdtm/packages`, `/sdtm/packages/{package}/datasetspecializations`, `/sdtm/packages/{package}/datasetspecializations/{datasetspecialization}`\n  - Key fields: `_links`, `datasetSpecializationId`, `domain`, `shortName`, `source`, `sdtmigStartVersion`, `sdtmigEndVersion`, `variables[]`\n  - `variables[]` keys: `name`, `dataElementConceptId`, `isNonStandard`, `codelist`, `subsetCodelist`, `valueList`, `assignedTerm`, `role`, `dataType`, `length`, `format`, `significantDigits`, `relationship{subject,linkingPhrase,predicateTerm,object}`, `mandatoryVariable`, `mandatoryValue`, `originType`, `originSource`, `comparator`, `vlmTarget`\n\n- **Behavior**:\n  - Pagination on `/mdr/search`: `start`, `pageSize`\n  - Errors surfaced as‑is: 401, 422, 404/406/5xx\n  - Links: follow `_links.self`, `_links.parentPackage`, `_links.parentBiomedicalConcept`\n\n### Test the server\nScripts in `package.json`:\n- `npm run test:mcp` — smoke tests via a minimal MCP stdio client (`scripts/test_mcp.js`). Requires `CDISC_API_KEY`.\n- `npm run test:plan` — broader happy‑path + error scenarios (`scripts/test_plan.js`). Requires `CDISC_API_KEY`.\n\n### Troubleshooting\n- **401 Unauthorized**: ensure `CDISC_API_KEY` is set; switch `CDISC_AUTH_LOCATION` between `header` and `query` if needed.\n- **Timeouts/network errors**: check connectivity to `https://api.library.cdisc.org`; set `timeoutMs` when using `call_operation`.\n- **API changes**: update the YAML specs under `server/openapi`, then restart. You can override the base via `CDISC_API_BASE_URL`.\n- **Corporate proxies**: configure your environment (e.g., `HTTPS_PROXY`, `HTTP_PROXY`).\n\n### Governance\n- **License**: MIT (see `LICENSE.md`).\n- **Code of Conduct**: see `CODE_OF_CONDUCT.md`.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcicatriiz%2Fcdisc-library-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcicatriiz%2Fcdisc-library-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcicatriiz%2Fcdisc-library-mcp-server/lists"}