# SemVer Calculator MCP for AI Agents MCP

> SemVer Calculator is a developer tool that handles Semantic Versioning 2.0.0 logic with total accuracy. It lets your AI client validate version strings, compare precedence between different releases, and automatically calculate the next version number for major, minor, or patch updates. It's built to remove the guesswork from software release cycles.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_yJEpNE57JcE1uyyKuo1JpnLMtFZJmcLXpXEbfESM/mcp
- **Tags:** semver, versioning, software-development, ci-cd, automation

## Description

When you're managing a software project, getting version numbers right isn't just a minor detail; it's the backbone of your release cycle. You need to know if a new build is compatible with an old one, or exactly which version should come next to avoid breaking things for your users. This MCP takes the manual heavy lifting out of that process. Instead of cross-referencing versioning rules or manually incrementing numbers in a spreadsheet, you can just ask your agent to handle the logic. 

Whether you're checking if a dependency falls within a specific range or trying to sort a messy list of releases into the correct order, this tool ensures everything follows the strict SemVer 2.0.0 standard. It handles the edge cases that usually cause headaches, like complex pre-release tags or build metadata. By plugging this into your workflow via the Vinkius catalog, you give your agent the ability to act as a precise release coordinator. You get consistent, error-free versioning every time you push a new update, allowing you to focus on the actual code rather than the housekeeping of release numbers.

## Tools

### sort_version_list
Orders a list of version strings from lowest to highest precedence. This helps you organize release history or dependency lists quickly.

### calculate_next_version
Computes the next version string based on a requested major, minor, or patch bump. It removes the risk of human error during manual versioning.

### check_range_satisfaction
Checks if a version string falls within a defined range like 2.3 or ~1.2.0. Use this to verify dependency compatibility.

### compare_versions
Determines the precedence relationship between two specific version strings. It tells you exactly which version is newer or older.

### validate_version
Verifies that a version string strictly follows the SemVer 2.0.0 syntax. This ensures your versioning stays consistent and standard-compliant.

## Prompt Examples

**Prompt:** 
```
Is '2.1.0-rc.1' a valid version?
```

**Response:** 
```
Yes, **2.1.0-rc.1** is a valid SemVer 2.0.0 string. It correctly follows the syntax for a pre-release version.
```

**Prompt:** 
```
Which is newer: 1.10.0 or 1.2.0?
```

**Response:** 
```
Version **1.10.0** is newer than 1.2.0. In Semantic Versioning, the major/minor/patch numbers are compared numerically, so 10 is greater than 2.
```

**Prompt:** 
```
What's the next version after 1.5.2 if I added a new feature but didn't break anything?
```

**Response:** 
```
Since you added a new feature without breaking compatibility, you should perform a minor bump. The next version is **1.6.0**.
```

## Capabilities

### Validate version strings
Check if a version follows the strict SemVer 2.0.0 syntax.

### Compare version precedence
Determine which of two version strings is higher or lower.

### Calculate next releases
Automatically figure out the next version number based on the type of change.

### Check range satisfaction
See if a specific version fits within a required range like ~1.2.0.

### Sort version lists
Organize a group of version strings from lowest to highest precedence.

## Use Cases

### Determining the next hotfix number
A developer is unsure if a hotfix should be a patch or a minor bump. They ask the agent to calculate the next version based on the change description.

### Verifying dependency ranges
A CI/CD pipeline fails because a dependency version is outside the allowed range. The agent uses check_range_satisfaction to find the correct version.

### Ordering a messy release history
A project lead needs to sort a list of 50 different library versions. The agent uses sort_version_list to provide a clean, ordered list.

### Resolving version precedence debates
A team is debating if 1.2.3-beta is newer than 1.2.3. The agent uses compare_versions to settle the precedence rule.

## Benefits

- Eliminate manual calculation errors by using calculate_next_version to handle every major, minor, and patch bump automatically.
- Ensure strict compliance with SemVer 2.0.0 standards by using validate_version to catch typos or invalid tags before they hit production.
- Simplify dependency management by using check_range_satisfaction to verify if your current software meets required version criteria.
- Organize complex release histories instantly with sort_version_list to see your project's progression in the correct order.
- Remove ambiguity during peer reviews by using compare_versions to provide a clear greater than or less than answer for any two versions.

## How It Works

The bottom line is that you get precise, standard-compliant versioning without having to memorize the SemVer spec.

1. Provide your AI client with a version string or a list of versions.
2. Request a specific action like a comparison, validation, or a version bump.
3. Receive the corrected string, the sorted list, or a boolean confirmation.

## Frequently Asked Questions

**Can the SemVer Calculator handle pre-release tags like 'beta' or 'rc'?**
Yes, it follows the full SemVer 2.0.0 spec, meaning it understands and validates complex tags like '1.0.0-alpha.1' or '2.0.0-rc.2'.

**How does SemVer Calculator help with my CI/CD pipeline?**
It allows your AI agent to automatically determine the next version number based on your commit notes, ensuring your automated deployments always have the correct version tag.

**Can I use SemVer Calculator to sort a long list of versions?**
Yes, you can give your agent a messy list of version strings and it will use the tool to put them in the correct order from lowest to highest precedence.

**Will SemVer Calculator tell me if my dependencies are out of date?**
It can check if a specific version satisfies a range (like ~1.2.0). You can ask your agent to verify if your current library versions fall within your allowed ranges.

**What happens if I enter an invalid version string?**
The tool will identify that the string doesn't follow the SemVer 2.0.0 syntax. This prevents you from accidentally using non-standard versioning in your project.

**What is Semantic Versioning?**
Semantic Versioning (SemVer) is a convention for version numbers that uses MAJOR.MINOR.PATCH format to communicate breaking changes, features, and bug fixes.

**How can I check if a version is valid?**
You can use the `validate_version` tool to verify that any string strictly adheres to the SemVer 2.0.0 syntax.

**Can I automate version increments?**
Yes, the `calculate_next_version` tool allows you to compute the next version based on a major, minor, or patch bump.