Content
# CDISC Library MCP
MCP (Model Context Protocol) service based on [CDISC Library API](https://api.library.cdisc.org/), providing AI assistants with standard query capabilities for SDTM, ADaM, CDASH, Controlled Terminology, etc. MCP internally calls the CDISC Library API to obtain CDISC database information.
This project is completed by Allen Sun and is not officially provided by CDISC.
## Installation
```bash
pip install allensrj-cdisc-library-mcp
```
Or use uv:
```bash
uv add allensrj-cdisc-library-mcp
```
## Configure API Key (Required)
**This package does not contain any API Key**. Users need to register and obtain an API Key from [CDISC Library](https://library.cdisc.org/) themselves, and then configure it through one of the following methods:
### Method 1: Environment Variables
```bash
export CDISC_API_KEY=your_API_KEY
allensrj-cdisc-library-mcp
```
### Method 2: `.env` File (Recommended for Local Development)
Create a `.env` file in the running directory or project root directory:
```bash
CDISC_API_KEY=your_API_KEY
```
(Refer to `.env.example` in the project, and do not submit `.env` to Git.)
## Run
After installing and configuring `CDISC_API_KEY`:
```bash
allensrj-cdisc-library-mcp
```
The default is to use `stdio` for transmission. If other transmission methods are required, you can modify `run()` in `main.py` or configure it through the MCP client.
## Tool Overview
| Category | Tool Example |
|------|----------|
| Product List | `get_product_list` |
| SDTM / SEND | `get_sdtmig_class_info`, `get_sdtmig_dataset_info`, `get_sdtm_model_*`, `get_sendig_*` |
| CDASH / CDASHIG | `get_cdashig_class_info`, `get_cdashig_domain_info`, `get_cdash_model_*` |
| ADaM | `get_adam_product_info`, `get_adam_datastructure_info` |
| QRS | `get_qrs_info` |
| Controlled Terminology | `get_package_ct_info`, `get_package_ct_codelist_info`, `get_package_ct_codelist_term_info` |
## Project Structure
```
├── main.py # Entry point: register tools, start service
├── config.py # Configuration: CDISC_API_KEY, constants
├── utils/ # Common: HTTP client, response formatting
├── tools/ # Business: sdtm, adam, terminology, general
├── pyproject.toml # Package metadata and allensrj-cdisc-library-mcp entry
└── README.md
```
## License
See [LICENSE](LICENSE) file.