mcp-package-version
by: sammcj
An MCP server that provides LLMs with the latest stable package versions when coding
📌Overview
Purpose: The MCP server aims to provide tools for checking the latest stable package versions from various package registries, ensuring that code recommendations are up-to-date.
Overview: The MCP package version server supports multiple programming languages and registries including npm, PyPI, Maven Central, Go Proxy, Swift, AWS Bedrock, Docker Hub, and GitHub Actions. It enhances the reliability of software dependencies by enabling developers to retrieve current package versions easily.
Key Features:
-
Multi-Registry Support: Allows checking of the latest stable versions across various package registries for different languages, enhancing cross-language compatibility.
-
Detailed Dependency Management Tools: Provides specific tools for different package formats, enabling users to check and manage dependencies effectively for Node.js, Python, Go, Java, Swift, GitHub Actions, and Docker.
Package Version MCP Server
An MCP server that provides tools for checking the latest stable package versions from multiple registries:
- npm (Node.js/JavaScript)
- PyPI (Python)
- Maven Central (Java)
- Go Proxy (Go)
- Swift Packages (Swift)
- AWS Bedrock (AI Models)
- Docker Hub (Container Images)
- GitHub Container Registry (Container Images)
- GitHub Actions
This server helps LLMs ensure they're recommending up-to-date package versions when writing code.
Running
Installing via Smithery
To install Package Version for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-package-version --client claude
Configure MCP Settings
Add the following to your MCP settings file:
{
"mcpServers": {
"package-version": {
"command": "npx",
"args": ["-y", "mcp-package-version"]
}
}
}
Tools
JavaScript/Node.js
check_npm_versions
Check latest stable versions for npm packages from a package.json dependencies object.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_npm_versions",
arguments: {
dependencies: {
"express": "^4.17.1",
"react": "^17.0.2"
}
}
});
Python
check_python_versions
Check latest stable versions for Python packages from requirements.txt entries.
check_pyproject_versions
Check latest stable versions for Python packages from pyproject.toml.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_pyproject_versions",
arguments: {
dependencies: {
dependencies: {
"requests": "^2.28.0",
"pandas": ">=1.5.0"
},
"optional-dependencies": {
"test": {
"pytest": ">=7.0.0"
}
},
"dev-dependencies": {
"black": "^22.0.0"
}
}
}
});
use_mcp_tool({
server_name: "package-version",
tool_name: "check_python_versions",
arguments: {
requirements: [
"requests==2.26.0",
"pandas>=1.3.0"
]
}
});
Go
check_go_versions
Check latest stable versions for Go packages from go.mod.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_go_versions",
arguments: {
dependencies: {
module: "example.com/mymodule",
require: [
{
path: "github.com/gin-gonic/gin",
version: "v1.7.0"
}
],
replace: [
{
old: "github.com/old/pkg",
new: "github.com/new/pkg",
version: "v2.0.0"
}
]
}
}
});
Java
check_maven_versions
Check latest stable versions for Java packages from pom.xml.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_maven_versions",
arguments: {
dependencies: [
{
groupId: "org.springframework.boot",
artifactId: "spring-boot-starter-web",
version: "2.7.0",
scope: "compile"
}
]
}
});
AWS Bedrock
check_bedrock_models
Search, list, and get information about Amazon Bedrock AI models.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_bedrock_models",
arguments: {
action: "list"
}
});
get_latest_bedrock_model
Get the latest Claude Sonnet model from Amazon Bedrock.
use_mcp_tool({
server_name: "package-version",
tool_name: "get_latest_bedrock_model",
arguments: {}
});
GitHub Actions
check_github_actions
Check latest versions for GitHub Actions.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_github_actions",
arguments: {
actions: [
{
owner: "actions",
repo: "checkout",
currentVersion: "v3"
},
{
owner: "actions",
repo: "setup-node",
currentVersion: "v3"
}
],
includeDetails: true
}
});
Docker Container Images
check_docker_tags
Check available tags for Docker container images.
use_mcp_tool({
server_name: "package-version",
tool_name: "check_docker_tags",
arguments: {
image: "nginx",
limit: 5
}
});
Example Integrations
Node.js Project
const versions = await use_mcp_tool({
server_name: "package-version",
tool_name: "check_npm_versions",
arguments: {
dependencies: {
"express": "^4.17.1",
"typescript": "~4.5.0"
}
}
});
Python Project with pyproject.toml
const versions = await use_mcp_tool({
server_name: "package-version",
tool_name: "check_pyproject_versions",
arguments: {
dependencies: {
dependencies: {
"requests": "^2.28.0",
"pandas": ">=1.5.0"
}
}
}
});
Development
-
Clone and Install Dependencies
git clone https://github.com/sammcj/mcp-package-version.git cd mcp-package-version npm i
-
Build the Server
npm run build
-
Development Workflow
- Use
npm run watch
for development to automatically rebuild on changes.
- Use
-
Release Process
npm run bump
-
Manual npm Publishing
gh workflow run publish.yml