cdisc-library-mcp-server
Provides a compact, task-oriented wrapper around the CDISC Library API for discovering, searching, and fetching Biomedical Concepts and SDTM Dataset Specializations.
README
CDISC Library MCP Server (DXT)
This 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.
About CDISC and the CDISC Library
- CDISC: A global, non‑profit that develops data standards to streamline clinical research and enable interoperability. See the CDISC website.
- 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 and obtain API access from the Developer Portal.
Requirements
- Node.js: >= 18
- CDISC Library API key: subscription key from the Developer Portal
Get an API key
- Create/sign in to a CDISC Library account.
- Browser login: library.cdisc.org
- Open the API Management Developer Portal and sign in with the same credentials.
- Developer Portal: api.developer.library.cdisc.org
- Retrieve your subscription key (API key) on the portal.
- Use the key as
api-keyin a header (recommended) or query string.
Run locally
export CDISC_API_KEY=your_key_here
npm start
Shell examples
- bash/zsh:
export CDISC_API_KEY=your_key
export CDISC_AUTH_LOCATION=header # or: query
npm start
- fish:
set -x CDISC_API_KEY your_key
set -x CDISC_AUTH_LOCATION header # or: query
npm start
- PowerShell:
$env:CDISC_API_KEY = "your_key"
$env:CDISC_AUTH_LOCATION = "header" # or: "query"
npm start
Configuration (environment variables)
- CDISC_API_KEY (required): your subscription key
- CDISC_AUTH_LOCATION (optional):
header(default) orquery - CDISC_AUTH_HEADER (optional): header name when using header auth, default
api-key - CDISC_AUTH_QUERY (optional): query param name when using query auth, default
api-key - CDISC_API_BASE_URL (optional): override server base URL, default
https://api.library.cdisc.org - CDISC_OPENAPI_DIR (optional): directory for OpenAPI YAML; defaults to
server/openapi. Themanifest.jsonsets this to${DXT_DIR}/server/openapiwhen packaged as DXT so the extension is self‑contained.
Caching and resilience
- CDISC_CACHE_ENABLED (optional): set to
0to disable caching. Default: enabled. - CDISC_CACHE_TTL_MS (optional): TTL for GET responses in milliseconds. Default:
60000. - CDISC_CACHE_MAX_ENTRIES (optional): max cache entries (LRU). Default:
500. - CDISC_RETRY_COUNT (optional): number of retries for transient 5xx/network errors. Default:
2. - CDISC_RETRY_BACKOFF_MS (optional): base backoff per attempt in ms. Default:
300. - CDISC_CACHE_DEBUG (optional): set to
1to log cache/retry activity to stderr. - CDISC_CACHE_PERSIST_PATH (optional): file path to persist cache to disk (JSON). Default: disabled.
- CDISC_CACHE_EXCLUDE_REGEX (optional): regex to exclude cache matches; defaults also exclude search/suggest.
- CDISC_CACHE_INCLUDE_REGEX (optional): regex to force-include cache matches.
Package as a DXT extension
- Spec: DXT MANIFEST.md
- CLI: DXT CLI.md
# Option A: one‑off
npm install -g @anthropic-ai/dxt
dxt pack # creates cdisc-library-mcp.dxt in the project directory
# Option B: via npm script
npm run pack:dxt
Install in clients
- Claude Desktop: open the generated
.dxtfile to install the local MCP server. - Any DXT‑compatible app can load this extension per its instructions. See the DXT repo:
https://github.com/anthropics/dxt.
Tools exposed by the server
- Generic:
list_operations(filter?)call_operation(operationId, pathParams?, query?, body?, headers?, timeoutMs?)
- Cache management:
cache.clear()— clear all in-memory cache entriescache.invalidate(contains?, regex?)— invalidate entries by substring or regex match
- Discovery:
search.suggest(q, top?, select?)search.query(q, start?, pageSize?, facets?, filters?)
- Biomedical Concepts (latest):
bc.list(category?),bc.get(conceptId),bc.categories()
- Biomedical Concepts (packages):
bc.packages.list(),bc.packages.listConcepts(package),bc.packages.getConcept(package, conceptId)
- SDTM Specializations (latest):
sdtm.list(domain?),sdtm.get(datasetSpecializationId),sdtm.domains(),sdtm.byBiomedicalConcept(conceptId)
- SDTM Specializations (packages):
sdtm.packages.list(),sdtm.packages.listSpecializations(package),sdtm.packages.getSpecialization(package, datasetSpecialization)
Quick API reference
-
Auth & bases:
- API key (header or query):
api-key: <YOUR_KEY> - Library base:
https://api.library.cdisc.org/api - Cosmos BC base:
https://api.library.cdisc.org/api/cosmos/v2/mdr/bc - Cosmos SDTM Specializations base:
https://api.library.cdisc.org/api/cosmos/v2/mdr/specializations
- API key (header or query):
-
Discovery:
- GET
/mdr/suggest— params:q,top,select - GET
/mdr/search— params:q(req),start,pageSize,facets, filtersdomain|codelist|conceptId|product|version|dataset|variable|standard
- GET
-
Biomedical Concepts:
- Latest:
/biomedicalconcepts,/biomedicalconcepts/{biomedicalconcept},/categories - Version‑locked:
/packages,/packages/{package}/biomedicalconcepts,/packages/{package}/biomedicalconcepts/{biomedicalconcept} - Key fields:
_links,conceptId,href,categories,shortName,synonyms,resultScales,definition,coding,dataElementConcepts,ncitCode
- Latest:
-
SDTM Dataset Specializations:
- Latest:
/sdtm/datasetspecializations?domain=VS|LB|…,/sdtm/datasetspecializations/{dataset_specialization_id},/sdtm/domains, by BC:/datasetspecializations?biomedicalconcept={conceptId} - Version‑locked:
/sdtm/packages,/sdtm/packages/{package}/datasetspecializations,/sdtm/packages/{package}/datasetspecializations/{datasetspecialization} - Key fields:
_links,datasetSpecializationId,domain,shortName,source,sdtmigStartVersion,sdtmigEndVersion,variables[] 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
- Latest:
-
Behavior:
- Pagination on
/mdr/search:start,pageSize - Errors surfaced as‑is: 401, 422, 404/406/5xx
- Links: follow
_links.self,_links.parentPackage,_links.parentBiomedicalConcept
- Pagination on
Test the server
Scripts in package.json:
npm run test:mcp— smoke tests via a minimal MCP stdio client (scripts/test_mcp.js). RequiresCDISC_API_KEY.npm run test:plan— broader happy‑path + error scenarios (scripts/test_plan.js). RequiresCDISC_API_KEY.
Troubleshooting
- 401 Unauthorized: ensure
CDISC_API_KEYis set; switchCDISC_AUTH_LOCATIONbetweenheaderandqueryif needed. - Timeouts/network errors: check connectivity to
https://api.library.cdisc.org; settimeoutMswhen usingcall_operation. - API changes: update the YAML specs under
server/openapi, then restart. You can override the base viaCDISC_API_BASE_URL. - Corporate proxies: configure your environment (e.g.,
HTTPS_PROXY,HTTP_PROXY).
Governance
- License: MIT (see
LICENSE.md). - Code of Conduct: see
CODE_OF_CONDUCT.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。