SemverKit

Semver parse, compare, npm range checks, max-satisfying and version bumps (node-semver compatible).

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
100%
命名品質
88%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~1,874Token(工具定義)
~2.7 KB典型回應大小
中等的注意力影響(128k 上下文的 1.46%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "semverkit": {
      "url": "https://semverkit.mike-tusa.workers.dev/mcp"
    }
  }
}

遠端端點

https://semverkit.mike-tusa.workers.dev/mcpstreamable-http

它能做什麼

工具清單

工具(5)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢parse_version(version)

Validate a version against SemVer 2.0.0 and split it into major, minor, patch, prerelease identifiers and build metadata, with isPrerelease/isStable flags. Read-only. Same engine as GET /api/parse.

輸入結構描述

{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Version: a semantic version such as \"1.4.2\", \"v2.0.0\" or \"3.0.0-rc.1+build.5\"."
    }
  },
  "required": [
    "version"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "input": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "major": {
      "type": "integer"
    },
    "minor": {
      "type": "integer"
    },
    "patch": {
      "type": "integer"
    },
    "prerelease": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "integer"
        ]
      }
    },
    "build": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "isPrerelease": {
      "type": "boolean"
    },
    "isStable": {
      "type": "boolean"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "apiVersion": {
      "type": "string"
    }
  },
  "required": [
    "version",
    "major",
    "minor",
    "patch",
    "isPrerelease",
    "apiVersion"
  ]
}
🟢compare_versions(a, b)

Compare a and b by SemVer precedence (prereleases sort before the release, build metadata ignored). Returns -1, 0 or 1 and the change type from the lower to the higher version (major, minor, patch, premajor, preminor, prepatch, prerelease) exactly like semver.diff. Read-only. Same engine as GET /api/compare.

輸入結構描述

{
  "type": "object",
  "properties": {
    "a": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "First version: a semantic version such as \"1.4.2\", \"v2.0.0\" or \"3.0.0-rc.1+build.5\"."
    },
    "b": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Second version: a semantic version such as \"1.4.2\", \"v2.0.0\" or \"3.0.0-rc.1+build.5\"."
    }
  },
  "required": [
    "a",
    "b"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "a": {
      "type": "string"
    },
    "b": {
      "type": "string"
    },
    "result": {
      "type": "integer"
    },
    "relation": {
      "type": "string"
    },
    "diff": {
      "type": [
        "string",
        "null"
      ]
    },
    "buildDiffers": {
      "type": "boolean"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "apiVersion": {
      "type": "string"
    }
  },
  "required": [
    "result",
    "relation",
    "diff",
    "apiVersion"
  ]
}
🟢check_range(version, range, includePrerelease)

Does a version satisfy an npm-style range (^, ~, x-ranges, hyphen ranges, comparators, || alternatives)? Returns the answer and the range desugared into plain comparators (e.g. ^0.2.3 → >=0.2.3 <0.3.0-0), with a note when npm's prerelease rule is why it fails. Read-only. Same engine as GET /api/satisfies.

輸入結構描述

{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Version to test: a semantic version such as \"1.4.2\", \"v2.0.0\" or \"3.0.0-rc.1+build.5\"."
    },
    "range": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "npm-style range, e.g. \"^1.2.0\", \"~1.4\", \">=1.0.0 <2.0.0\", \"1.2.3 - 2.x\", \"1.x || >=3.0.0-beta.1\"."
    },
    "includePrerelease": {
      "type": "boolean",
      "default": false,
      "description": "Let prereleases match any range they fall inside (npm includePrerelease). Default false (npm behaviour)."
    }
  },
  "required": [
    "version",
    "range"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "version": {
      "type": "string"
    },
    "range": {
      "type": "string"
    },
    "normalized": {
      "type": "string"
    },
    "satisfies": {
      "type": "boolean"
    },
    "includePrerelease": {
      "type": "boolean"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "apiVersion": {
      "type": "string"
    }
  },
  "required": [
    "satisfies",
    "normalized",
    "apiVersion"
  ]
}
🟢resolve_versions(versions, range, includePrerelease)

Sort 1 to 200 versions by SemVer precedence (duplicates removed, invalid ones listed separately) and, if a range is given, return the matching versions plus maxSatisfying / minSatisfying (what npm would install from that list) and the latest stable version. Read-only. Same engine as GET /api/resolve.

輸入結構描述

{
  "type": "object",
  "properties": {
    "versions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 200,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256,
        "description": "Version: a semantic version such as \"1.4.2\", \"v2.0.0\" or \"3.0.0-rc.1+build.5\"."
      },
      "description": "1 to 200 versions."
    },
    "range": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "npm-style range, e.g. \"^1.2.0\", \"~1.4\", \">=1.0.0 <2.0.0\", \"1.2.3 - 2.x\", \"1.x || >=3.0.0-beta.1\"."
    },
    "includePrerelease": {
      "type": "boolean",
      "default": false,
      "description": "Let prereleases match any range they fall inside (npm includePrerelease). Default false (npm behaviour)."
    }
  },
  "required": [
    "versions"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "range": {
      "type": [
        "string",
        "null"
      ]
    },
    "normalized": {
      "type": [
        "string",
        "null"
      ]
    },
    "includePrerelease": {
      "type": "boolean"
    },
    "sorted": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "count": {
      "type": "integer"
    },
    "matching": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "maxSatisfying": {
      "type": [
        "string",
        "null"
      ]
    },
    "minSatisfying": {
      "type": [
        "string",
        "null"
      ]
    },
    "latestStable": {
      "type": [
        "string",
        "null"
      ]
    },
    "invalid": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "duplicatesRemoved": {
      "type": "integer"
    },
    "apiVersion": {
      "type": "string"
    }
  },
  "required": [
    "sorted",
    "matching",
    "maxSatisfying",
    "apiVersion"
  ]
}
🟢bump_version(version, release, preid)

Compute the next version for a release type (major, minor, patch, premajor, preminor, prepatch, prerelease, release), with an optional prerelease id such as alpha, beta or rc, exactly like npm version / semver.inc. Read-only: nothing is published. Same engine as GET /api/bump.

輸入結構描述

{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Current version: a semantic version such as \"1.4.2\", \"v2.0.0\" or \"3.0.0-rc.1+build.5\"."
    },
    "release": {
      "type": "string",
      "enum": [
        "major",
        "minor",
        "patch",
        "premajor",
        "preminor",
        "prepatch",
        "prerelease",
        "release"
      ],
      "default": "patch",
      "description": "Release type."
    },
    "preid": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Prerelease identifier, e.g. \"beta\" (for pre* and prerelease)."
    }
  },
  "required": [
    "version"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "from": {
      "type": "string"
    },
    "release": {
      "type": "string"
    },
    "preid": {
      "type": [
        "string",
        "null"
      ]
    },
    "version": {
      "type": "string"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "apiVersion": {
      "type": "string"
    }
  },
  "required": [
    "from",
    "version",
    "apiVersion"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本5 個工具