Skip to main content
Glama
README.md
# CORE MCP Server

[CORE MCP Server](https://github.com/kusy2009/core-mcp-server) is a [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) Server for the [CDISC CORE Rules Engine](https://github.com/cdisc-org/cdisc-rules-engine).

This MCP server is built with [Python FastMCP](https://github.com/jlowin/fastmcp).

## Support CORE Rules Engine

- Validate clinical datasets (XPT, JSON, NDJSON, XLSX) against CDISC conformance rules
- Browse all 981+ validation rules with filtering by standard, authority, sensitivity
- Inspect individual rule details (conditions, actions, authority references)
- List supported standards, versions, and Controlled Terminology packages
- Manage engine updates from GitHub

## Architecture

```
CORE MCP  ──→  CORE Rules Engine Cache + CLI  (rules, validation)
```

## Requirements

- [Python ≥ 3.12](https://www.python.org/downloads/) and [UV](https://docs.astral.sh/uv/getting-started/installation/) installed on your device.
- A [CDISC Library API key](https://www.cdisc.org/cdisc-library/api) (needed to build the rules cache).

## Installation

### Step 1: Set up CDISC CORE Rules Engine

If you don't already have the CORE Rules Engine, clone it and build the rules cache:

```bash
git clone https://github.com/cdisc-org/cdisc-rules-engine.git
cd cdisc-rules-engine
pip install -r requirements.txt
python core.py update-cache --apikey YOUR_CDISC_LIBRARY_API_KEY
```

This downloads all validation rules and controlled terminology into a local cache. It only needs to be done once.

### Step 2: Install CORE MCP Server

```bash
git clone https://github.com/kusy2009/core-mcp-server.git
cd core-mcp-server
uv sync
```

Set the path to your CORE Rules Engine as an environment variable:

```bash
export CORE_DIR=/path/to/cdisc-rules-engine
```

## Configure MCP Client

### VS Code (GitHub Copilot)

Add to `.vscode/mcp.json` in your project:

```json
{
  "servers": {
    "core-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/core-mcp-server", "run", "core-mcp"],
      "env": {
        "CORE_DIR": "/path/to/cdisc-rules-engine"
      }
    }
  }
}
```

### Claude Desktop

Add to your Claude Desktop config:

```json
{
  "mcpServers": {
    "core-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/core-mcp-server", "run", "core-mcp"],
      "env": {
        "CORE_DIR": "/path/to/cdisc-rules-engine"
      }
    }
  }
}
```

You need to replace `/path/to/core-mcp-server` and `/path/to/cdisc-rules-engine` to match your own environment.

## MCP Tools

### Validation

| Tool | Description |
|------|-------------|
| `validate_dataset` | Validate datasets against CDISC rules with standard, version, CT, and rule filters |

### Rule Browsing

| Tool | Description |
|------|-------------|
| `list_rules` | List rules with optional filters (standard, version, authority, sensitivity, status) |
| `get_rule_details` | Get full details for a specific CORE rule ID |
| `search_rules` | Search rules by keyword in description or message |

### Standards & Configuration

| Tool | Description |
|------|-------------|
| `list_rule_sets` | List all supported standards and versions with rule counts |
| `list_ct_packages` | List available Controlled Terminology packages |
| `get_engine_version` | Get CORE version, git commit info, cache statistics |

### Engine Management

| Tool | Description |
|------|-------------|
| `check_for_updates` | Check if CORE has new commits on GitHub |
| `update_engine` | Pull latest CORE from GitHub |

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

TDQS

A3.9/5.0

Scored across 9 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: rule-set listing, CT package listing, rule listing with filters, keyword search, rule detail retrieval, dataset validation, update checking, engine updating, and version inspection. The only closely related tools (list_rules and search_rules) are differentiated by filtering versus keyword relevance.

Naming Consistency5/5

All tool names use snake_case and follow a predictable verb_noun or verb_preposition_noun pattern (list_*, get_*, search_rules, validate_dataset, check_for_updates, update_engine). The naming is consistent and readable throughout.

Tool Count5/5

Nine tools is well-scoped for a rules-engine MCP server, covering discovery, inspection, validation, and maintenance without evident redundancy. Each tool earns its place in the workflow.

Completeness4/5

The surface covers the core lifecycle: enumerate standards, rules, and CT packages; inspect and search rules; validate datasets; and maintain the engine. Minor gaps exist, such as no dedicated CT package detail lookup or rule-authoring/editing capability, but core workflows are complete.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues