# Predictive Value Calculator AI Agent Connect

> Predictive Value Calculator MCP gives your AI agent a precision engine for clinical epidemiology. It handles the heavy lifting of calculating PPV, NPV, prevalence, accuracy, and likelihood ratios. Whether you are working with raw contingency tables or established sensitivity and specificity parameters, this MCP ensures your diagnostic math is sound and ready for clinical analysis.

## Overview
- **Category:** healthcare
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_uOFbFSNHTY6blrmjdB9exiBJ8YLE2F37ov9p2QmN/ai-agent-connect
- **Tags:** clinical, diagnostic, statistics, epidemiology, medical

## Description

You can use this MCP to turn raw clinical data into actionable diagnostic insights. Instead of manually calculating complex epidemiological metrics, you can hand your data to your AI client and get immediate results. You can provide raw two-by-two contingency table counts to get a full breakdown of test performance. If you already have sensitivity, specificity, and prevalence, the MCP handles those inputs too. It also includes a validation layer to make sure your clinical parameters are mathematically valid before you rely on the output. This makes it a reliable tool for analyzing test accuracy and predictive values in a clinical or research setting.

## Tools

### calculate_from_counts
This tool calculates diagnostic metrics using raw contingency table values. It's the best way to process raw patient counts.

### calculate_from_parameters
This tool computes diagnostic metrics based on established sensitivity, specificity, and prevalence. Use this when you have summary statistics rather than raw counts.

### get_diagnostic_summary
This tool generates a formatted summary of specific metrics for a single patient scenario. It's designed to give you a quick overview of a test's performance.

### validate_input_bounds
This tool checks that all provided clinical parameters are mathematically valid. It prevents errors by ensuring your data stays within logical bounds.

## Prompt Examples

**Prompt:** 
```
Calculate metrics for a test with 80 true positives, 10 false positives, 5 false negatives, and 105 true negatives.
```

**Response:** 
```
The Positive Predictive Value (PPV) is 88.89%, the Negative Predictive Value (NPV) is 95.35%, the prevalence is 44.44%, and the overall accuracy is 90.00%.
```

**Prompt:** 
```
What are the predictive values if sensitivity is 90%, specificity is 85%, and prevalence is 10%?
```

**Response:** 
```
The Positive Predictive Value (PPV) is 39.13%, the Negative Predictive Value (NPV) is 98.64%, and the accuracy is 92.65%.
```

**Prompt:** 
```
Give me a summary for a scenario where PPV is 95% and NPV is 95%.
```

**Response:** 
```
The diagnostic metrics indicate high confidence in the test results.
```

## Capabilities

### Contingency Table Processing
Your agent uses this to derive metrics from raw true/false positive and negative counts.

### Parameter-Based Calculation
Your agent uses this to find predictive values when given sensitivity and specificity.

### Data Validation
Your agent uses this to confirm that clinical inputs are mathematically possible.

### Scenario Summarization
Your agent uses this to create a concise report of diagnostic performance for specific cases.

## Use Cases

### Test Performance Evaluation
Calculate the PPV and NPV of a new diagnostic test based on clinical trial results.

### Prevalence Impact Analysis
Determine how changing prevalence affects the predictive value of a specific test.

### Data Integrity Checks
Verify that a set of clinical parameters is mathematically valid before running a model.

### Clinical Scenario Reporting
Generate a quick summary of diagnostic confidence for a specific patient case.

## Benefits

- Eliminates manual calculation errors in diagnostic math.
- Processes raw contingency tables into full metric sets instantly.
- Validates clinical inputs to ensure mathematical consistency.
- Provides formatted summaries for specific patient scenarios.

## How It Works

You connect the MCP to your AI client and start sending data immediately.

1. Connect your AI client to the Vinkius-hosted MCP.
2. Provide raw counts or sensitivity/specificity parameters to your agent.
3. The agent uses the appropriate tool to process your specific data type.
4. The MCP validates the math and returns the calculated metrics.

## Frequently Asked Questions

**What metrics can this MCP calculate?**
It calculates PPV, NPV, prevalence, accuracy, and likelihood ratios.

**Can I use raw data instead of percentages?**
Yes. You can use the calculate_from_counts tool to process raw two-by-two contingency table counts.

**How does it handle sensitivity and specificity?**
You can use the calculate_from_parameters tool to provide those specific values to get predictive results.

**Does it check if my data is valid?**
Yes. The validate_input_bounds tool ensures your clinical parameters are mathematically sound.

**Which AI clients can use this MCP?**
You can use this with any MCP-compatible client like Claude, Cursor, Windsurf, or VS Code.

**What kind of data can I provide for calculations?**
You can provide raw counts of true positives, false positives, true negatives, and false negatives, or you can provide sensitivity, specificity, and prevalence percentages.

**How do I verify if my input values are valid?**
You can use the `validate_input_bounds` tool to check if your percentages or counts fall within mathematically valid ranges.

**Can I get a summary of a specific patient's diagnostic confidence?**
Yes, by using `get_diagnostic_summary`, you can receive a classification based on the provided PPV and NPV values.
