---
name: iblai-connect-medidata-rave
description: "Read and write Medidata Rave EDC data through the Rave Web Services (RWS) and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with Medidata Rave EDC data, or to set up a Medidata Rave EDC MCP connection on ibl.ai."
metadata:
  kind: guide
---

# Medidata Rave EDC connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/medidata-rave — not part of the iblai/base repository. Checked against Medidata's documentation on October 20, 2026; test it against your own Medidata Rave EDC setup before you rely on it.

Medidata Rave EDC captures clinical trial data at investigator sites. It holds study designs (forms, fields, codelists), subjects, clinical data, queries, protocol deviations, comments and the audit trail.

## Auth & conventions

- **API:** Rave Web Services (RWS) (REST (CDISC ODM XML)). RESTful web services that extract clinical data in ODM and CSV, download and upload study design metadata, list subjects, pull protocol deviations, comments and audit trail, and post ODM data into Rave.
- **Base URL:** https://{subdomain}.mdsol.com/RaveWebServices/
- **Access:** Partner or license program. The full RWS documentation and a Rave test environment come with Medidata Developer Central, a free program that organizations apply to join. Production calls use a Rave account set up on the sponsor's or CRO's Rave instance.
- **Auth:** HTTP Basic over HTTPS (Rave account); MAuth (HMAC request signing). Medidata describes RWS calls as authenticated with Basic Authentication over HTTPS or MAuth, an HMAC scheme similar to Amazon S3's REST signing. A dedicated Rave account for web services is the norm.
- Keep Medidata Rave EDC credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Clinical data** — Study clinical data extracted as CDISC ODM or CSV.
- **Study metadata** — Study design: forms, fields and codelist dictionaries.
- **Subjects** — Subjects enrolled in a study.
- **Deviations and comments** — Protocol deviations and comments.
- **Audit trail** — Historical audit records of data changes.

## Writes

- **Clinical data** — Post ODM XML to create or update subject data in Rave. **Confirm with the user first.**
- **Study metadata** — Upload study design metadata. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

Medidata publishes an official MCP server, Medidata MCP servers (https://www.medidata.com/en/clinical-trial-data-with-ai/). Register it below as-is, or host your own server that wraps the calls in this skill.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/base --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - For an API key or service credential use `auth_type=token` with `auth_scope=platform` for one key across the organization, or scope it to a single agent for one key per agent.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "Export last week's adverse event forms for study ABC-301 as CSV"
- "List subjects at site 104 with open protocol deviations"
- "Show the audit trail for the vital signs form of subject 104-007"
- "Compare the current study build's codelists against version 3"

## Guardrails

- Rave holds clinical trial subject data under GCP, 21 CFR Part 11 and HIPAA or GDPR where applicable; writes change regulated trial records.
- Request the narrowest Medidata Rave EDC scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Page through large result sets and back off on rate-limit responses instead of retrying in a loop.

## References

- Medidata Developer Central: https://www.medidata.com/en/clinical-trial-services/developer-central/
- rwslib: a Rave Web Services library (Medidata): https://techblog.mdsol.com/2014/11/21/rwslib-a-rave-web-service-library.html
- Medidata and Claude (MCP): https://www.medidata.com/en/clinical-trial-data-with-ai/
- Medidata MCP servers: https://www.medidata.com/en/clinical-trial-data-with-ai/
- This connector on ibl.ai: https://ibl.ai/developer/connectors/medidata-rave
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
