# Number Needed to Treat Calculator AI Agent Connect

> Number Needed to Treat Calculator MCP gives your AI client the math tools needed to analyze comparative risk in clinical trials. It handles the heavy lifting for calculating Absolute Risk Reduction, Relative Risk Reduction, NNT, and NNH. Instead of manually checking trial event counts, you can use this MCP to validate data integrity and generate structured clinical summaries for review.

## Overview
- **Category:** healthcare
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_Q1B1j1XgBNj5FDY6hud5feu8WGdjekOLPeSEknKj/ai-agent-connect
- **Tags:** clinical, risk-analysis, statistics, medical-trials, healthcare-data

## Description

You can stop manually calculating risk metrics from trial spreadsheets. This MCP gives your agent the specific mathematical tools to process clinical data and output standard metrics like NNT and NNH. If you have raw event counts from a control group and a treatment group, your AI client can use this to find the absolute and relative risk differences immediately. 

It isn't just about the math. The MCP includes a validation step to ensure your trial data is logically consistent before any calculations run. This prevents errors like event counts exceeding the total number of subjects. Once the numbers are ready, you can have your agent format the results into a structured summary that's ready for clinical review. It bridges the gap between messy trial data and the specific statistical outputs you need for medical analysis.

## Tools

### calculate_risk_metrics
This tool performs the core clinical math to find risk differences and therapeutic or harm counts.

### format_clinical_summary
This tool organizes raw calculation results into a structured summary for clinical review.

### get_rounding_instruction
This tool retrieves the specific rounding logic or definitions you require for your report.

### validate_clinical_data
This tool checks trial data for logical consistency before any math is performed.

## Prompt Examples

**Prompt:** 
```
Calculate the risk metrics for a trial where the control group had 50 events out of 500 subjects and the treatment group had 20 events out of 500 subjects over 12 months.
```

**Response:** 
```
The control risk is 10.0%, the treatment risk is 4.0%, the absolute risk reduction is 6.0%, and the Number Needed to Treat (NNT) is 17.
```

**Prompt:** 
```
What is the NNH if the control group has 10 events in 1000 people and the treatment group has 20 events in 1000 people over 2 years?
```

**Response:** 
```
The control risk is 1.0%, the treatment risk is 2.0%, the absolute risk difference is 1.0%, and the Number Needed to Harm (NNH) is 100.
```

**Prompt:** 
```
Validate if a trial with 120 events in a group of 100 subjects is mathematically possible.
```

**Response:** 
```
No, the data is invalid because the event count exceeds the total number of subjects in the group.
```

## Capabilities

### Risk Metric Calculation
Your agent calculates ARR, RRR, NNT, and NNH from trial event counts.

### Data Integrity Checks
The MCP verifies that trial data is logically sound before processing.

### Structured Reporting
Your AI client converts raw math into formatted summaries for clinical use.

### Custom Rounding Logic
The agent follows specific rounding instructions provided during the session.

## Use Cases

### Trial Data Validation
Check if event counts in a dataset are logically possible before running analysis.

### Comparative Risk Analysis
Compare treatment vs control groups to find the absolute risk reduction.

### Safety Assessment
Calculate the Number Needed to Harm to evaluate the safety profile of a treatment.

### Report Generation
Turn raw statistical outputs into formatted summaries for clinical documentation.

## Benefits

- Eliminates manual calculation errors in risk metrics.
- Prevents processing invalid trial data through built-in validation.
- Standardizes clinical summaries for faster review.
- Provides direct access to NNT and NNH calculations via your AI client.

## How It Works

Connect the MCP to your client and start analyzing data immediately.

1. Connect your preferred MCP-compatible client to Vinkius.
2. Provide your trial data or event counts to your AI client.
3. The agent validates the data for logical consistency.
4. The MCP calculates the requested risk metrics.
5. The agent formats the final results into a structured summary.

## Frequently Asked Questions

**What clinical metrics can this MCP calculate?**
It calculates Absolute Risk Reduction (ARR), Relative Risk Reduction (RRR), Number Needed to Treat (NNT), and Number Needed to Harm (NNH).

**How does the MCP handle incorrect trial data?**
The validate_clinical_data tool checks for logical errors, such as when event counts are higher than the total number of subjects, before any math is performed.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any MCP-compatible client including Claude, Cursor, and Windsurf.

**Does it support custom rounding?**
Yes, the get_rounding_instruction tool allows your agent to follow specific rounding logic requested by the user.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP for you. You just connect your client and start working.

**How do I ensure my trial data is valid before calculating metrics?**
You can use the `validate_clinical_data` tool to check if the event counts and total subjects provided are mathematically consistent and logically possible.

**What is the difference between NNT and NNH?**
NNT (Number Needed to Treat) is used when a treatment reduces risk, while NNH (Number Needed to Harm) is used when a treatment increases the risk of an adverse event.

**Can I get a structured report of the results?**
Yes, the `format_clinical_summary` tool organizes raw calculation outputs into a structured summary suitable for clinical review.
