Develop MCP Servers for automate the work processes of the Clinical Data Manager.
Project description
Clinical Data Management MCP Server
A unified MCP (Model Context Protocol) server for automating Clinical Data Manager (CDM) workflows. Provides Excel comparison, DVS validation, PDF comparison, and more through any MCP-compatible AI agent.
Available Tools
Excel & DB Spec
- read_excel_info: Reads an Excel file and returns its structure — sheet names, column names, row counts, and a preview of the first few rows. Use this first when sheet names or column names are unknown.
- compare_common_excel: Compares specific sheets of two Excel files and generates a difference report. Requires specifying the sheet name, header row, and primary key column.
- compare_db_spec: Compares full CDM DB Spec workbooks. Automatically detects header positions and updates the Revision History sheet.
DVS (Data Validation Specifications)
- validate_dvs_specifications: Reads a DVS Excel file, validates all Specification entries against the DVS grammar, and generates a detailed validation report. Reports syntax errors and auto-corrected suggestions where possible.
- check_dvs_consistency (requires MCP Sampling): Checks whether the natural language Description is logically consistent with the formal Specification for each DVS entry. Results are written to a new Excel report.
Google Calendar Integration
- download_timeline_template: Copies the bundled DM Timeline Excel template to a specified directory. Use this before filling in timeline data and calling
make_google_calendar_csv. - make_google_calendar_csv: Extracts key schedules from a Timeline Excel file and converts them into a CSV formatted for Google Calendar import.
Blank eCRF PDF Comparison
- compare_ecrf_pdf_single: Compares two Blank eCRF PDF files and produces a single side-by-side comparison PDF. Changed pages are shown with Before (left) and After (right) layouts. Annotation colors: red = deleted, green = added, yellow = modified.
Installation
Step 1. Install uv
uv is a fast Python package manager. Installing it also gives you uvx, which runs packages without a separate Python installation.
Mac / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Step 2. Register the MCP Server
Choose the AI client you use and run the corresponding command once. This registers the server globally so it's available from any directory.
Claude Code
claude mcp add --scope user cdm-server uvx cdm-mcp-server
Gemini CLI
Gemini CLI requires Node.js. Install it via nvm:
Mac / Linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
nvm install --lts
Windows
Download and install nvm-windows, then:
nvm install lts
nvm use lts
Then install Gemini CLI and register the MCP server:
npm install -g @google/gemini-cli
gemini mcp add cdm-server uvx --args cdm-mcp-server --scope user
Codex CLI
codex mcp add cdm-server -- uvx cdm-mcp-server
Step 3. Install Skills (Optional)
Skills are reusable prompt templates that extend your AI agent with CDM-specific expertise (document review, translation, revision history writing, etc.).
Run this command once in your project directory:
cdm-install-skills
This auto-detects which AI tools are configured and installs skills into their respective directories.
| Tool | Skills directory |
|---|---|
| Claude Code | .claude/skills/ |
| Gemini CLI | .gemini/skills/ |
| Codex CLI | .agents/skills/ |
To target a specific tool or install for all:
cdm-install-skills --tool claude
cdm-install-skills --tool gemini
cdm-install-skills --tool codex
cdm-install-skills --all
Step 4. Verify the Connection
Claude Code
claude mcp list
Gemini CLI
gemini mcp list
Codex CLI
codex mcp list
You should see cdm-server listed as connected.
Usage
Once connected, simply describe what you need in natural language:
"Compare the previous and current DB Spec files and generate a difference report."
"Validate the DVS file and report any syntax errors."
"Download the Timeline template, then convert the completed file into a Google Calendar CSV."
The AI agent will automatically select and call the appropriate tool.
Project Structure
src/
└── cdm_mcp_server/
├── __init__.py
├── server.py # MCP server entry point
├── templates/
│ └── DM Timeline 20251120.xlsx # Bundled Timeline template
└── modules/
├── excel_theme.py # Shared Excel formatting standards
├── excel_compare.py # Excel & DB Spec comparison engine
├── excel_info.py # Excel structure inspector
├── calendar_maker.py # Timeline parsing & Calendar CSV generator
├── dvs_parser.py # DVS specification grammar parser
├── dvs_excel_writer.py # DVS validation report writer
├── dvs_consistency_checker.py # LLM-powered DVS consistency checker
└── pdf_ecrf_compare.py # Blank eCRF PDF comparison engine
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdm_mcp_server-0.2.2.tar.gz.
File metadata
- Download URL: cdm_mcp_server-0.2.2.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56baf27a59bd94a29226a9055219021eed1ceca571e3f5835cfde1a0b7ee11af
|
|
| MD5 |
9f0fd6dd2fb5109ea1343a75c2efd48e
|
|
| BLAKE2b-256 |
743a6c2dc70bb9cc63400972ea8f5b0a16bbcc3f01d32080d9b690305de5bad0
|
File details
Details for the file cdm_mcp_server-0.2.2-py3-none-any.whl.
File metadata
- Download URL: cdm_mcp_server-0.2.2-py3-none-any.whl
- Upload date:
- Size: 52.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
722e3d16bce62bce254c054de2ca6a41e46ba19f8befd4726fb3e31fd6d3f3de
|
|
| MD5 |
8e79586e5cfa25a30087ad17a47737eb
|
|
| BLAKE2b-256 |
7d92330afc7ec788ff6e1bcb9944e10d9a3c63389bc60691aa8312379a43aa2d
|