# Gaussian Peak Fitter AI Agent Connect

> Gaussian Peak Fitter MCP provides the mathematical tools needed to model physical phenomena through peak fitting. Your AI client can use it to handle Gaussian, Lorentzian, or Voigt profiles, making it easy to break down complex spectral or photometric data into individual, measurable components.

## Overview
- **Category:** science
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_0CwXdzRSwPAk8ZvGotTmlmYqJ2KnhMAi0uv0VNef/ai-agent-connect
- **Tags:** spectroscopy, peak-fitting, gaussian, data-science, signal-processing

## Description

You can use this MCP to handle the heavy lifting of spectral decomposition. Instead of manually calculating parameters for complex datasets, you let your AI agent manage the mathematical modeling. It supports Gaussian, Lorentzian, and Voigt profiles, allowing you to model a wide range of physical phenomena accurately. 

When you have raw spectral or photometric data, you can ask your AI client to find the best fit for your peaks. It handles the initial optimization by suggesting starting values based on your raw data. If your peaks are too close together and look like a single feature, the MCP identifies that overlap. You can also get a statistical breakdown of how well the chosen parameters actually describe your dataset. This turns a tedious manual fitting process into a conversational task where you focus on the physics while the MCP handles the curve fitting.

## Tools

### evaluate_fit_quality
This tool provides a statistical assessment of how well your peak parameters match the dataset.

### detect_peak_overlap
This tool checks if your fitted peaks are too close to be considered distinct features.

### fit_spectral_peaks
This tool performs the primary mathematical operation of fitting peaks to your provided dataset.

### generate_peak_priors
This tool suggests reasonable starting values for optimization based on your raw data.

## Prompt Examples

**Prompt:** 
```
Fit 2 Gaussian peaks to these samples: [{'position': 10, 'intensity': 1}, {'position': 11, 'intensity': 2}, {'position': 20, 'intensity': 1.5}, {'position': 21, 'intensity': 2.5}]
```

**Response:** 
```
The fit was successful. Peak 1 is at position 11.0 with an amplitude of 2.0. Peak 2 is at position 21.0 with an amplitude of 2.5.
```

**Prompt:** 
```
Suggest initial guesses for 3 peaks in this data: [{'position': 5, 'intensity': 10}, {'position': 50, 'intensity': 12}, {'position': 95, 'intensity': 11}]
```

**Response:** 
```
Suggested priors: Peak 1 (center: 5, amplitude: 10), Peak 2 (center: 50, amplitude: 12), Peak 3 (center: 95, amplitude: 11).
```

**Prompt:** 
```
Evaluate the quality of a fit with these parameters: [{'amplitude': 5, 'center': 10, 'width': 2}] for the given samples.
```

**Response:** 
```
The fit quality assessment shows a reduced chi-squared of 1.05 and a root mean square error of 0.12.
```

## Capabilities

### Multi-profile modeling
Your agent can choose between Gaussian, Lorentzian, or Voigt profiles for different data types.

### Automated parameter guessing
The MCP suggests starting values to help the optimization process converge faster.

### Overlap detection
The tool identifies when peaks are too close to be treated as separate entities.

### Statistical validation
Your AI client can run quality checks to see how well the model fits the raw data.

## Use Cases

### Spectral Decomposition
Break down a complex spectrum into its individual Gaussian or Lorentzian components.

### Photometric Data Analysis
Model peak profiles in photometric datasets to study physical properties.

### Signal Validation
Check if a fitted model is statistically sound using quality assessment tools.

### Feature Identification
Determine if two detected peaks are actually distinct or only a single overlapping feature.

## Benefits

- Reduces manual parameter tuning by suggesting priors from raw data.
- Supports multiple profile types including Voigt and Lorentzian.
- Provides statistical metrics to verify the accuracy of a fit.
- Identifies blended features that might skew your analysis.

## How It Works

You connect the MCP to your AI client and start analyzing data through natural language.

1. Connect your preferred MCP-compatible client to Vinkius.
2. Provide your spectral or photometric data to your AI agent.
3. Ask your agent to generate priors or perform the primary fit.
4. Request a quality evaluation or overlap check to finalize the results.

## Frequently Asked Questions

**What types of peak profiles does this MCP support?**
The MCP supports Gaussian, Lorentzian, and Voigt profiles for modeling different physical phenomena.

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

**How does the MCP help with optimization?**
It uses the generate_peak_priors tool to suggest reasonable starting values based on your raw data, which helps the fitting process.

**Can I check if my peaks are overlapping?**
Yes, you can use the detect_peak_overlap tool to see if your fitted peaks are too close to be considered distinct.

**How do I know if my fit is accurate?**
You can use the evaluate_fit_quality tool to get a statistical assessment of how well the parameters describe your data.

**What peak models are supported?**
The server supports Gaussian, Lorentzian, and Voigt profiles for fitting spectral data.

**How can I get initial guesses for my peaks?**
You can use the `generate_peak_priors` tool to automatically suggest amplitude, center, and width values based on your raw samples.
