mcp-server-redcap
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-redcapExport records where age > 18"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-redcap
A Model Context Protocol (MCP) server for interacting with REDCap (Research Electronic Data Capture) instances.
Exposes 38 tools covering data access, project design, file management, and longitudinal project structure. Designed for use with LLM agents that need to query or build REDCap projects in natural language conversations.
Tools
Records
Tool | Description |
| Export records with optional filters by field, record ID, or event |
| Import records from a JSON payload |
| Delete records by ID |
| Export a saved REDCap report by its ID |
| Export the mapping from field names to export names (required for checkbox fields) |
| Get the next available record ID respecting the project's auto-numbering |
Metadata
Tool | Description |
| Retrieve project-level information and settings |
| Export the data dictionary, optionally filtered by field or form |
| Export the project audit log, with filters by type, user, record, or date range |
| Export the repeating instruments/events configuration |
| Update the repeating instruments/events configuration |
Instruments & project design
Tool | Description |
| List all instruments with internal names and display labels |
| List arm/event/instrument mappings (longitudinal projects) |
| Add a new field to an instrument (round-trip through data dictionary) |
| Remove a field from the data dictionary |
| Update specific properties of a field without touching the rest |
| Create a new instrument |
| Delete an instrument and all its fields |
| Rename an instrument's internal name |
| Reposition a field within the data dictionary |
| Copy all fields of an instrument into a new one with a field-name prefix |
| Add an instrument to a longitudinal event |
| Remove an instrument from a longitudinal event |
Analysis
Tool | Description |
| Compact overview of the whole project: instruments, field counts, event matrix |
| Find all fields that reference a given field in branching logic or calculations |
| Scan all branching logic for references to non-existent fields |
Files
Tool | Description |
| Download a file attachment from a record field (returned as base64) |
| Upload a file to a record field (accepts base64 content) |
| Delete a file attachment from a record field |
| Export a PDF of one or more instruments for a record (returned as base64) |
Arms & events (longitudinal)
Tool | Description |
| List arms |
| Create or update arms |
| Delete arms by number |
| List events, optionally filtered by arm |
| Create or update events |
| Delete events by unique name |
Surveys
Tool | Description |
| Get a participant-specific survey URL for a record |
| List survey participants and their response status |
Related MCP server: Redash MCP Server
Installation
pip install mcp-server-redcapOr with uv:
uvx mcp-server-redcapREDCap version compatibility
The server works against any REDCap instance running version 8.0 or later. Most tools are available from version 6.x, but export_pdf requires 8.x. Repeating instruments (export_repeating_instruments_events, import_repeating_instruments_events) require 6.16+. Tools that are unavailable on a given instance return a plain error string rather than crashing.
The current REDCap version of the connected instance is included in the output of get_project_structure.
Configuration
The server reads connection details from environment variables:
Variable | Required | Description |
| Yes | Full REDCap API endpoint URL (e.g. |
| Yes | Project-level API token from REDCap → API → Generate Token |
| No | Set to |
Create a .env file in your working directory and the server will load it automatically:
REDCAP_URL=https://redcap.example.org/api/
REDCAP_TOKEN=your_project_token_hereUsage with Claude Code
Add the server to your Claude Code MCP configuration:
claude mcp add redcap -e REDCAP_URL=https://redcap.example.org/api/ \
-e REDCAP_TOKEN=your_token -- uvx mcp-server-redcapOr edit .claude/settings.json manually:
{
"mcpServers": {
"redcap": {
"command": "uvx",
"args": ["mcp-server-redcap"],
"env": {
"REDCAP_URL": "https://redcap.example.org/api/",
"REDCAP_TOKEN": "your_project_token_here"
}
}
}
}Development
git clone https://github.com/msicilia/mcp-server-redcap
cd mcp-server-redcap
uv sync --extra devRun the MCP inspector for interactive local testing:
uv run mcp dev src/mcp_server_redcap/server.pyRun the server directly (stdio transport, for use with MCP clients):
uv run mcp-server-redcapProject structure
src/mcp_server_redcap/
├── __init__.py
├── __main__.py # python -m mcp_server_redcap
├── server.py # FastMCP server factory and entry point
├── connection.py # REDCap project connection (lazy, singleton)
└── tools/
├── __init__.py
├── records.py # record CRUD, field names, next record name
├── metadata.py # project info, data dictionary, logging, repeating instruments
├── instruments.py # instrument listing, field and instrument mutations
├── analysis.py # project structure overview, reference and logic validation
├── files.py # file attachments and PDF export
├── arms_events.py # longitudinal arms and events CRUD
└── surveys.py # survey links and participant listsSee DESIGN.md for the full API reference and design rationale.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/msicilia/mcp-server-redcap'
If you have feedback or need assistance with the MCP directory API, please join our Discord server