Package Version Checker MCP server

Get package version data from npm and PyPI registries to assist with dependency management.
Back to servers
Setup instructions
Provider
Sam McLeod
Release date
Dec 16, 2024
Language
TypeScript
Package
Stats
13.1K downloads
118 stars

This MCP server helps you check and validate the latest stable package versions across multiple popular registries, providing valuable information when recommending or using packages in your code.

Installation Requirements

Installation Methods

Using Go Install (Recommended)

go install github.com/sammcj/mcp-package-version/v2@HEAD

Building from Source

git clone https://github.com/sammcj/mcp-package-version.git
cd mcp-package-version
make

Using Docker Container

docker run -p 18080:18080 ghcr.io/sammcj/mcp-package-version:main

Setting Up MCP Client

After installation, configure your MCP client to use the server:

Command-Based Configuration

If you installed with go install, provide the full path to the binary:

{
  "mcpServers": {
    "package-version": {
      "command": "/Users/yourusername/go/bin/mcp-package-version"
    }
  }
}

URL-Based Configuration (for Docker)

If running in a container, use the URL configuration:

{
  "mcpServers": {
    "package-version": {
      "url": "http://localhost:18080"
    }
  }
}

Configuration File Locations

  • For Cline VSCode Extension: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • For Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
  • For GoMCP: ~/.config/gomcp/config.yaml

Go Path Tips

If you're new to Go, you might need to set up your $GOPATH for go install to work correctly. Add this to your shell configuration file (e.g., ~/.zshrc):

[ -z "$GOPATH" ] && export GOPATH="$HOME/go"; echo "$PATH" | grep -q ":$GOPATH/bin" || export PATH="$PATH:$GOPATH/bin"

Usage

The server supports two transport modes:

STDIO Transport (Default)

mcp-package-version

SSE Transport

mcp-package-version --transport sse --port 18080 --base-url "http://localhost:18080"

This makes the server available at http://localhost:18080/sse.

Command-line Options

  • --transport, -t: Transport type (stdio or sse). Default: stdio
  • --port: Port for SSE transport. Default: 18080
  • --base-url: Base URL for SSE transport. Default: http://localhost

Available Tools

NPM Packages

Check latest versions of NPM packages:

{
  "name": "check_npm_versions",
  "arguments": {
    "dependencies": {
      "react": "^17.0.2",
      "react-dom": "^17.0.2",
      "lodash": "4.17.21"
    },
    "constraints": {
      "react": {
        "majorVersion": 17
      }
    }
  }
}

Python Packages (requirements.txt)

{
  "name": "check_python_versions",
  "arguments": {
    "requirements": [
      "requests==2.28.1",
      "flask>=2.0.0",
      "numpy"
    ]
  }
}

Python Packages (pyproject.toml)

{
  "name": "check_pyproject_versions",
  "arguments": {
    "dependencies": {
      "dependencies": {
        "requests": "^2.28.1",
        "flask": ">=2.0.0"
      },
      "optional-dependencies": {
        "dev": {
          "pytest": "^7.0.0"
        }
      },
      "dev-dependencies": {
        "black": "^22.6.0"
      }
    }
  }
}

Java Packages (Maven)

{
  "name": "check_maven_versions",
  "arguments": {
    "dependencies": [
      {
        "groupId": "org.springframework.boot",
        "artifactId": "spring-boot-starter-web",
        "version": "2.7.0"
      },
      {
        "groupId": "com.google.guava",
        "artifactId": "guava",
        "version": "31.1-jre"
      }
    ]
  }
}

Java Packages (Gradle)

{
  "name": "check_gradle_versions",
  "arguments": {
    "dependencies": [
      {
        "configuration": "implementation",
        "group": "org.springframework.boot",
        "name": "spring-boot-starter-web",
        "version": "2.7.0"
      },
      {
        "configuration": "testImplementation",
        "group": "junit",
        "name": "junit",
        "version": "4.13.2"
      }
    ]
  }
}

Go Packages

{
  "name": "check_go_versions",
  "arguments": {
    "dependencies": {
      "module": "github.com/example/mymodule",
      "require": [
        {
          "path": "github.com/gorilla/mux",
          "version": "v1.8.0"
        },
        {
          "path": "github.com/spf13/cobra",
          "version": "v1.5.0"
        }
      ]
    }
  }
}

Docker Images

{
  "name": "check_docker_tags",
  "arguments": {
    "image": "nginx",
    "registry": "dockerhub",
    "limit": 5,
    "filterTags": ["^1\\."],
    "includeDigest": true
  }
}

AWS Bedrock Models

List all models:

{
  "name": "check_bedrock_models",
  "arguments": {
    "action": "list"
  }
}

Search specific models:

{
  "name": "check_bedrock_models",
  "arguments": {
    "action": "search",
    "query": "claude",
    "provider": "anthropic"
  }
}

Get latest Claude Sonnet model:

{
  "name": "get_latest_bedrock_model",
  "arguments": {}
}

Swift Packages

{
  "name": "check_swift_versions",
  "arguments": {
    "dependencies": [
      {
        "url": "https://github.com/apple/swift-argument-parser",
        "version": "1.1.4"
      },
      {
        "url": "https://github.com/vapor/vapor",
        "version": "4.65.1"
      }
    ],
    "constraints": {
      "https://github.com/apple/swift-argument-parser": {
        "majorVersion": 1
      }
    }
  }
}

GitHub Actions

{
  "name": "check_github_actions",
  "arguments": {
    "actions": [
      {
        "owner": "actions",
        "repo": "checkout",
        "currentVersion": "v3"
      },
      {
        "owner": "actions",
        "repo": "setup-node",
        "currentVersion": "v3"
      }
    ],
    "includeDetails": true
  }
}

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "package-version" '{"command":"mcp-package-version"}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "package-version": {
            "command": "mcp-package-version"
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "package-version": {
            "command": "mcp-package-version"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later