#OIE MCP Server
A comprehensive Model Context Protocol (MCP) server for AI-assisted Mirth Connect / Open Integration Engine (OIE) v4.5.2 development.
- Channel Management: List, view, deploy, undeploy, start, stop, update, delete channels
- Code Templates: View and manage code template libraries
- Troubleshooting: Access server events, channel messages, statistics
- Backup & Recovery: Automatic backups before modifications, manual backup/restore
- Safety Features: Confirmation required for destructive operations, automatic backup before changes
- Validation: Channel XML validation and analysis
- File Export/Import: Export channels/templates to local files for editing
- Dataset Query System: Token-optimized data retrieval with pagination, filtering, and search
cd servers/mirth-connect-mcp
npm install
npm run buildEnvironment variables:
| Variable | Default | Description |
|---|---|---|
MIRTH_URL |
https://localhost:8444/api |
Mirth Connect API endpoint |
MIRTH_USERNAME |
admin |
Username for authentication |
MIRTH_PASSWORD |
admin |
Password for authentication |
MIRTH_REJECT_UNAUTHORIZED |
true |
Verify SSL certificates |
BACKUP_DIR |
./backups |
Directory for storing backups |
BACKUP_MAX_VERSIONS |
10 |
Max backup versions per resource |
REQUIRE_CONFIRMATION |
true |
Require confirmation for destructive ops |
Add to your Claude Code MCP configuration:
{
"mcpServers": {
"mirth-connect": {
"command": "node",
"args": ["path/to/servers/mirth-connect-mcp/dist/index.js"],
"env": {
"MIRTH_URL": "https://localhost:8444/api",
"MIRTH_USERNAME": "admin",
"MIRTH_PASSWORD": "admin",
"MIRTH_REJECT_UNAUTHORIZED": "false"
}
}
}
}mirth_connect- Connect to Mirth servermirth_disconnect- Disconnect from servermirth_server_info- Get server information
mirth_list_channels- List all channels with status/statsmirth_get_channel- Get channel details (JSON/XML)mirth_deploy_channel- Deploy a channelmirth_undeploy_channel- Undeploy a channelmirth_start_channel- Start a channelmirth_stop_channel- Stop a channelmirth_update_channel- Update channel config (requires confirmation)mirth_delete_channel- Delete a channel (requires confirmation)
mirth_list_code_templates- List all templates and librariesmirth_get_code_template- Get template detailsmirth_get_code_template_library- Get library with templates
mirth_get_events- Get server events/logsmirth_get_channel_messages- Get channel messagesmirth_get_message_content- Get message detailsmirth_get_channel_statistics- Get message statisticsmirth_reprocess_message- Reprocess a failed message
mirth_get_global_scripts- Get global scriptsmirth_update_global_scripts- Update global scriptsmirth_get_configuration_map- Get server config map
mirth_backup_channel- Manually backup a channelmirth_backup_code_template- Backup a code templatemirth_list_backups- List all backupsmirth_get_backup- Get backup contentmirth_restore_backup- Restore from backupmirth_compare_backups- Compare two backupsmirth_backup_stats- Get backup statistics
mirth_validate_channel_xml- Validate channel XMLmirth_analyze_channel- Analyze channel for issues
mirth_confirm_action- Confirm a pending actionmirth_cancel_action- Cancel a pending action
mirth_get_server_logs- Get server log entries (returns datasetId)mirth_get_connection_logs- Get connection logs for all channels (returns datasetId)mirth_get_channel_connection_logs- Get connection logs for specific channel (returns datasetId)mirth_get_global_map- Get global map variablesmirth_get_channel_map- Get channel-specific mapmirth_get_all_maps- Get all maps combined
mirth_export_channel- Export channel XML to local filemirth_import_channel- Import channel from local XML filemirth_export_code_template- Export single code template to filemirth_import_code_template- Import single code template from filemirth_export_code_template_library- Export library with all templatesmirth_import_code_template_library- Import library (merges with existing)mirth_list_exported_files- List exported files in directory
dataset_query- Query stored dataset with filters, pagination, searchdataset_get_item- Get single item by ID from datasetdataset_list- List all active datasetsdataset_info- Get dataset metadata and summary
The Dataset Query System optimizes token usage by storing large datasets locally and returning summaries instead of raw data.
- Fetch data - Tools like
mirth_get_channel_messagesreturn adatasetId+ summary - Query dataset - Use
dataset_queryto browse with pagination, filters, search - Get details - Use
dataset_get_itemto retrieve full content of specific items
# Step 1: Fetch messages (returns summary, not raw data)
mirth_get_channel_messages { channelId: "abc-123" }
→ { datasetId: "ds_xxx", totalMessages: 150, summary: { errorCount: 5, ... } }
# Step 2: Browse with pagination
dataset_query { datasetId: "ds_xxx", page: 1 }
→ First 50 items (compact preview)
# Step 3: Filter by status
dataset_query { datasetId: "ds_xxx", filters: { status: "ERROR" } }
→ Only error messages
# Step 4: Text search
dataset_query { datasetId: "ds_xxx", search: "patient" }
→ Items containing "patient"
# Step 5: Get full details
dataset_get_item { datasetId: "ds_xxx", itemId: 123 }
→ Full message content
- Auto-pagination: 50 items per page (max 100)
- Sorted by ID: Newest first for easy navigation
- Field filters: Filter by any field (status, level, channelName, etc.)
- Text search: Search across all fields
- 30-minute TTL: Datasets auto-expire to free memory