matheus-rech/meta-analysis-mcp-server
If you are the rightful owner of meta-analysis-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Meta-Analysis MCP Server is a comprehensive tool designed for conducting systematic reviews and meta-analyses, adhering to Cochrane Handbook guidelines and PRISMA 2020 reporting standards.
Meta-Analysis MCP Server with Cochrane Compliance
A comprehensive Model Context Protocol (MCP) server for conducting systematic reviews and meta-analyses with Cochrane Handbook guidelines and PRISMA 2020 reporting standards.
๐ฏ Features
Meta-Analysis Tools (7)
- initialize_meta_analysis: Start new meta-analysis project with guided setup
- upload_study_data: Upload and validate study data with comprehensive checks
- perform_meta_analysis: Execute meta-analysis with automated statistical methods
- generate_forest_plot: Create publication-ready forest plots
- assess_publication_bias: Perform publication bias assessment with multiple tests
- generate_report: Create comprehensive meta-analysis reports
- get_session_status: Get current session status and generated files
Cochrane Compliance Tools (4)
- assess_risk_of_bias: Cochrane ROB 2.0 risk of bias assessment
- generate_prisma_checklist: PRISMA 2020 compliance checklist with flowchart
- perform_grade_assessment: GRADE evidence quality assessment
- generate_cochrane_report: Comprehensive Cochrane-compliant systematic review report
๐ Quick Start
Installation
# Install from source
git clone https://github.com/matheus-rech/meta-analysis-mcp-server.git
cd meta-analysis-mcp-server
pip install -e .
Install R Dependencies
Rscript -e "install.packages(c('meta', 'metafor', 'metaSEM', 'nloptr', 'xml2', 'lme4', 'jsonlite', 'DT', 'rmarkdown', 'knitr', 'ggplot2'), repos='https://cran.rstudio.com/')"
Running the Server
# Run in stdio mode (default)
meta-analysis-mcp-server
# Run in HTTP mode
HTTP_MODE=true PORT=8080 meta-analysis-mcp-server
MCP Client Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"meta-analysis": {
"command": "meta-analysis-mcp-server",
"args": []
}
}
}
๐ Usage Examples
Basic Meta-Analysis Workflow
from extended_protocol_handler import ExtendedMCPProtocolHandler
import asyncio
import json
async def basic_workflow():
handler = ExtendedMCPProtocolHandler()
# Initialize session
init_response = await handler.handle_request({
"method": "tools/call",
"params": {
"name": "initialize_meta_analysis",
"arguments": {
"user_id": "researcher_001",
"project_name": "My Systematic Review",
"study_type": "clinical_trial",
"effect_measure": "OR"
}
}
})
session_data = json.loads(init_response["content"][0]["text"])
session_id = session_data["session_id"]
# Upload data and perform analysis...
Cochrane Compliance Workflow
# After basic meta-analysis, add Cochrane compliance
rob_response = await handler.handle_request({
"method": "tools/call",
"params": {
"name": "assess_risk_of_bias",
"arguments": {
"session_id": session_id,
"assessment_type": "automated",
"rob_version": "rob2"
}
}
})
prisma_response = await handler.handle_request({
"method": "tools/call",
"params": {
"name": "generate_prisma_checklist",
"arguments": {
"session_id": session_id,
"review_type": "intervention",
"include_flowchart": True
}
}
})
๐ฅ Cochrane Handbook Compliance
This server implements guidelines from:
- Cochrane Handbook Chapter 8: Risk of bias assessment using ROB 2.0
- Cochrane Handbook Chapter 10: Statistical analysis and meta-analysis methods
- Cochrane Handbook Chapter 12: Synthesis and presentation of results
๐ PRISMA 2020 Compliance
Includes full PRISMA 2020 checklist with:
- 27-item checklist for systematic reviews
- Flow diagram generation
- Compliance scoring and recommendations
- Integration with systematic review reporting
๐ฌ GRADE Evidence Assessment
Implements GRADE methodology for:
- Risk of bias evaluation
- Inconsistency assessment
- Indirectness evaluation
- Imprecision analysis
- Publication bias detection
๐ File Structure
meta_analysis_mcp_server/
โโโ server.py # Core MCP server implementation
โโโ http_server.py # HTTP wrapper for MCP server
โโโ __main__.py # Entry point (stdio or HTTP mode)
โโโ tools/
โ โโโ meta_analysis.py # Meta-analysis tools implementation
โ โโโ cochrane_compliance.py # Cochrane compliance tools
โโโ r_scripts/
โ โโโ meta_analysis.R # R statistical analysis scripts
โโโ templates/
โ โโโ report_template.Rmd # Original report template
โ โโโ cochrane_report_template.Rmd # Cochrane-compliant template
๐ Deployment
Docker
docker build -t meta-analysis-mcp-server .
docker run -p 8080:8080 meta-analysis-mcp-server
Railway
Deploy directly from GitHub repository using the included railway.json
configuration.
Fly.io
fly deploy
๐งช Testing
Test Original Functionality
python3 demo_workflow.py
Test Cochrane Compliance Features
python3 demo_cochrane_workflow.py
Test Individual Tools
python3 test_individual_tools.py
Development
# Install development dependencies
pip install -e .[dev]
# Run tests
pytest
# Format code
black .
# Type checking
mypy .
๐ค Contributing
This server maintains backward compatibility with all original functionality while adding Cochrane compliance features. When contributing:
- Preserve all existing tool functionality
- Follow Cochrane Handbook guidelines
- Maintain PRISMA 2020 compliance
- Include comprehensive testing
๐ References
- Higgins JPT, Thomas J, Chandler J, et al. Cochrane Handbook for Systematic Reviews of Interventions version 6.3. Cochrane, 2022.
- Page MJ, McKenzie JE, Bossuyt PM, et al. The PRISMA 2020 statement: an updated guideline for reporting systematic reviews. BMJ 2021;372:n71.
- Guyatt GH, Oxman AD, Vist GE, et al. GRADE: an emerging consensus on rating quality of evidence and strength of recommendations. BMJ 2008;336:924-6.
๐ License
MIT License - see LICENSE file for details.
Meta-Analysis MCP Server with Cochrane Compliance - Democratizing systematic reviews through guided workflows and automated R execution.