Skip to main content
Glama

NetMeta MCP Server

An MCP (Model Context Protocol) server that provides network meta-analysis capabilities using the R netmeta package.

netmeta Version

This MCP server uses a pinned version of netmeta from the develop branch:

Property

Value

Repository

guido-s/netmeta

Branch

develop

Version

3.3-0

Commit

5ecfc1d7739c3df360a694d60af0563bc43d68ea

Date

2025-10-29

See NETMETA_VERSION file for details.

Related MCP server: Clinical Trials MCP Server

Overview

This server enables AI assistants to perform network meta-analysis, a statistical technique for comparing multiple treatments simultaneously using both direct and indirect evidence from randomized controlled trials.

Available Tools

Tool

Description

csv_to_json

Convert CSV data to JSON format for netmeta

runnetmeta

Run network meta-analysis on pairwise contrast data

get_network_graph

Get the network structure as nodes and edges

get_league_table

Get all pairwise treatment comparisons

get_ranking

Get treatment rankings using P-scores

get_forest_data

Get data for forest plot visualization

pairwise_to_netmeta

Convert arm-level data to pairwise contrasts


Deployment Options

Option 1: Public Hosted Server

A public hosted server will soon be available at:

Server

URL

Status

CINeMA

https://cinema.med.auth.gr/mcp-netmeta

Coming soon

No installation required for hosted servers. Simply configure your MCP client to connect to the URL:

{
  "mcpServers": {
    "netmeta": {
      "url": "https://cinema.med.auth.gr/mcp-netmeta"
    }
  }
}

Option 2: Self-Hosted (Native Installation)

For local development or when you want to run your own server.

Prerequisites

  • Python 3.10+

  • R 4.0+

  • Conda (recommended) or pip

Step 1: Clone and Setup

# Clone the repository
git clone https://github.com/tpapak/mcp-netmeta.git
cd mcp-netmeta

# Create conda environment
conda env create -f environment.yml
conda activate netmeta-mcp

Step 2: Install netmeta R package

Install the pinned version of netmeta from GitHub:

conda activate netmeta-mcp
R -e "remotes::install_github('guido-s/netmeta@5ecfc1d7739c3df360a694d60af0563bc43d68ea')"

Step 3: Install the MCP Server

pip install -e .

Step 4: Run the Server

Stdio transport (for local MCP clients):

conda activate netmeta-mcp
netmeta-mcp

HTTP transport (for web access):

conda activate netmeta-mcp
python -m netmeta_mcp.http_server

Server runs at http://localhost:8000/mcp

MCP Client Configuration (Native - Stdio)

{
  "mcpServers": {
    "netmeta": {
      "command": "/path/to/conda/envs/netmeta-mcp/bin/python",
      "args": ["-m", "netmeta_mcp.server"],
      "cwd": "/path/to/mcp-netmeta"
    }
  }
}

Example conda paths:

  • macOS (Homebrew): /opt/homebrew/Caskroom/miniconda/base/envs/netmeta-mcp/bin/python

  • macOS (Miniforge): ~/miniforge3/envs/netmeta-mcp/bin/python

  • Linux: ~/miniconda3/envs/netmeta-mcp/bin/python

MCP Client Configuration (Native - HTTP)

{
  "mcpServers": {
    "netmeta": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Usage Guide

For detailed usage instructions, including:

  • MCP client configurations (Claude Desktop, Cursor, Cline, Continue, OpenCode)

  • ellmer (R) integration with examples

  • Example prompts and workflows

  • Data format reference

  • Troubleshooting

See the Usage Guide.


Quick Example

Run a network meta-analysis on this data:

study,treat1,treat2,TE,seTE
Study1,Placebo,DrugA,0.5,0.2
Study2,Placebo,DrugB,0.8,0.25
Study3,DrugA,DrugB,0.3,0.22

Use odds ratio as the summary measure and Placebo as reference.
Show me the treatment rankings.

License

GPL-3.0 License

References

  • Rücker G, Krahn U, König J, Efthimiou O, Davies A, Papakonstantinou T, Schwarzer G (2024). netmeta: Network Meta-Analysis using Frequentist Methods. R package.

  • ellmer: Call LLM APIs from R. https://github.com/tidyverse/ellmer

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search and access clinical trial data from ClinicalTrials.gov, including searching trials by keywords, retrieving detailed trial metadata by NCT ID, and managing trial data in CSV format for research and analysis.
      18
      -
    • A
      license
      B
      quality
      D
      maintenance
      Provides programmatic access to ClinicalTrials.gov API with 18 specialized tools for searching, analyzing, and retrieving detailed information about 400,000+ clinical trials worldwide, including filtering by condition, location, phase, sponsor, eligibility criteria, and outcomes.
      17
      20 npm
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI-assisted meta-analysis workflows following Cochrane methodological standards, including importing RevMan data, validation, meta-analysis, forest plots, publication bias assessment, and report generation.
      6
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to analyze CSV files by providing statistical analysis and structural summaries via MCP tools.
      2
      MIT