# Actuarial GLM Calculator AI Agent Connect

> Actuarial GLM Calculator MCP lets your agent perform complex insurance modeling. You can fit deterministic Generalized Linear Models to claim data, handling both frequency and severity. It supports Poisson, Negative Binomial, Gamma, and Inverse Gaussian distributions to help you model risk accurately.

## Overview
- **Category:** insurance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_zq90WiswMEg0ICjL6wX44ZTfVXDD4I8N4PaAg4Ad/ai-agent-connect
- **Tags:** glm, insurance, actuarial, statistics, modeling

## Description

You can now run actuarial modeling workflows without leaving your coding environment or chat interface. This MCP gives your agent the ability to fit deterministic Generalized Linear Models to insurance claim datasets. Whether you are working on claim frequency using Poisson or Negative Binomial distributions, or modeling claim severity with Gamma or Inverse Gaussian distributions, your agent handles the heavy lifting. 

You can use it to build models from scratch, calculate how specific predictors change your expected response, and check if your model actually fits the data. It's built for technical users who need to move from raw observation data to fitted models and predictions quickly. Instead of writing custom scripts for each model run, you provide the data and the distribution type, and your agent executes the math.

## Tools

### evaluate_model_diagnostics
This tool provides a summary of how well your model fits the data and the distribution of errors.

### fit_glm_model
Use this to fit a deterministic GLM to a specific dataset of insurance observations.

### get_fitted_predictions
This tool generates expected responses for new, unseen observations once a model is trained.

### get_model_relativities
This tool calculates the specific impact that different predictor levels have on the expected response.

## Prompt Examples

**Prompt:** 
```
Fit a Poisson GLM for these observations: [{'count': 2, 'exposure': 1, 'age': 30}, {'count': 5, 'exposure': 1, 'age': 45}] using a log link.
```

**Response:** 
```
The model has converged. The coefficients are {'intercept': -0.5, 'age': 0.02} and the total deviance is 1.45.
```

**Prompt:** 
```
What is the relative impact of age 45 compared to age 30 if the coefficient for age is 0.02 and the intercept is -0.5?
```

**Response:** 
```
The relativity for age 45 compared to the baseline of 30 is 1.0202.
```

**Prompt:** 
```
Evaluate the diagnostics for a model with deviance 10.5 and residuals [{'raw': 0.1, 'pearson': 0.2}, {'raw': -0.1, 'pearson': -0.2}] and expected values [1.0, 1.0] and observed values [1.1, 0.9].
```

**Response:** 
```
The goodness of fit score is 5.25, with a mean error of 0.1 and low residual variance.
```

## Capabilities

### Frequency Modeling
Your agent uses Poisson or Negative Binomial distributions to model claim counts.

### Severity Modeling
Your agent applies Gamma or Inverse Gaussian distributions to model claim amounts.

### Risk Relativity
Your agent calculates how specific variables change the expected outcome.

### Model Validation
Your agent checks goodness-of-fit and error distributions to verify model accuracy.

### Predictive Analysis
Your agent generates expected values for new data points based on trained models.

## Use Cases

### Frequency Modeling
Model the number of claims occurring within a specific exposure period.

### Severity Estimation
Estimate the expected cost of claims using Gamma or Inverse Gaussian distributions.

### Relativity Calculation
Determine how much a specific driver age or vehicle type increases expected risk.

### Model Testing
Run diagnostics on a fitted model to check for error distribution and goodness-of-fit.

## Benefits

- Fits deterministic GLMs to insurance data without manual coding.
- Supports multiple distributions for both frequency and severity modeling.
- Calculates risk relativities and model diagnostics through natural language.
- Generates predictions for new observations using trained models.

## How It Works

Connect your client to Vinkius and start modeling immediately.

1. Connect your MCP-compatible client to Vinkius.
2. Provide your insurance observation data to your agent.
3. Instruct your agent to fit a specific GLM model.
4. Request predictions or diagnostics to complete your analysis.

## Frequently Asked Questions

**What distributions does this MCP support?**
It supports Poisson and Negative Binomial for frequency, and Gamma or Inverse Gaussian for severity.

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

**How do I calculate risk relativities?**
You can ask your agent to use the get_model_relativities tool to find the impact of specific predictor levels.

**Does this MCP host the data?**
Vinkius hosts the MCP and manages the connection, but you provide the insurance data for the models.

**Can I predict values for new data?**
Yes, once a model is fitted, your agent can use the get_fitted_predictions tool for new observations.

**What distributions can I use for frequency modeling?**
For frequency modeling, you can use Poisson or Negative Binomial distributions via the `fit_glm_model` tool.

**How do I calculate risk multipliers for specific predictors?**
You can use the `get_model_relativities` tool by providing the coefficients from a fitted model, the predictor name, and a baseline value.

**Can I predict values for new data points?**
Yes, the `get_fitted_predictions` tool allows you to generate expected responses for new observations using previously trained coefficients.
