https://github.com/sammcj/mcp-package-version
- Developer Tools
Suggests the latest stable package versions when writing code.
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
check_npm_versions | Check latest stable versions for npm packages |
check_python_versions | Check latest stable versions for Python packages |
check_package_versions | Bulk check latest stable versions for npm and Python packages |
Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
No arguments |
Package Version MCP Server
An MCP server that provides tools for checking latest stable package versions from multiple package registries:
- npm (Node.js/JavaScript)
- PyPI (Python)
- Maven Central (Java)
- Go Proxy (Go)
This server helps LLMs ensure they're recommending up-to-date package versions when writing code.
Screenshot
Running
Configure MCP Settings
Add the following to your MCP settings file:
- For the Cline VSCode Extension this will be
~/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
Tools
1. JavaScript/Node.js
check_npm_versions
Check latest stable versions for npm packages from a package.json dependencies object.
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.
3. Go
check_go_versions
Check latest stable versions for Go packages from go.mod.
4. Java
But seriously, don't write Java in 2025.
check_maven_versions
Check latest stable versions for Java packages from pom.xml.
check_gradle_versions
Check latest stable versions for Java packages from build.gradle.
5. check_package_versions
Bulk check latest stable versions for multiple packages from npm and PyPI.
Guidelines for LLMs
When writing code that includes package dependencies, LLMs should:
- Choose the Right Tool for the Job
- Use language-specific tools for detailed dependency management:
check_npm_versions
for package.jsoncheck_python_versions
for requirements.txtcheck_pyproject_versions
for pyproject.tomlcheck_maven_versions
for pom.xmlcheck_gradle_versions
for build.gradlecheck_go_versions
for go.mod
- Use
check_package_versions
for quick bulk checks across npm and PyPI
- Use language-specific tools for detailed dependency management:
- Always Check Versions Before Writing
- Before writing a package.json or requirements.txt file, use the appropriate tool to check latest versions
- Use the bulk check tool when dealing with multiple packages
- Consider the project's needs when deciding whether to use exact versions or version ranges
- Package.json Best PracticesCopy// Before writing package.json, check versions const versions = await use_mcp_tool({ server_name: "package-version", tool_name: "check_package_versions", arguments: { packages: [ { name: "express", registry: "npm" }, { name: "react", registry: "npm" } ] } }); // Use the returned versions in package.json { "dependencies": { "express": "^{express.latestVersion}", "react": "^{react.latestVersion}" } }
- Requirements.txt Best PracticesCopy// Before writing requirements.txt, check versions const versions = await use_mcp_tool({ server_name: "package-version", tool_name: "check_package_versions", arguments: { packages: [ { name: "requests", registry: "pypi" }, { name: "pandas", registry: "pypi" } ] } }); // Use the returned versions in requirements.txt requests=={requests.latestVersion} pandas=={pandas.latestVersion}
- Version Range Considerations
- For applications: Consider using exact versions (= for Python, no prefix for npm)
- For libraries: Consider using compatible ranges (>= for Python, ^ for npm)
- Always document version choices in comments
- Error Handling
- If version check fails for a package, document it in comments
- Consider falling back to known stable versions if checks fail
- Warn users about any packages that couldn't be verified
Example Integrations
Here's how an LLM should approach creating new projects with different package managers:
Node.js Project
Python Project with pyproject.toml
Go Project
Java Project with Maven
This ensures that new projects always start with the latest stable versions of packages.
Example System Prompt
Example system prompt for users:
Development
- Clone and Install DependenciesCopygit clone https://github.com/sammcj/mcp-package-version.git cd mcp-package-version npm i
- Build the ServerCopynpm run build
- Development Workflow
- Use
npm run watch
for development to automatically rebuild on changes - Use
npm run build
for production builds
- Use
- Release ProcessCopy# 1. Make your changes vim src/your-file.ts # 2. Commit your changes git add . git commit -m "feat: your new feature" # 3. Run bump command (this will): # - Update version in package.json # - Update CHANGELOG.md # - Commit changes # - Push to GitHub npm run bump # GitHub Actions will then: # - Create a git tag # - Create a GitHub release # - Publish to npm (when triggered manually)
- Manual npm PublishingCopy# To trigger a manual npm publish gh workflow run publish.yml
No environment variables are required as this server uses public registries:
- npm registry (registry.npmjs.org)
- PyPI (pypi.org)
- Go Proxy (proxy.golang.org)
- Maven Central (search.maven.org)
License
GitHub Badge
Glama performs regular codebase and documentation scans to:
- Confirm that the MCP server is working as expected.
- Confirm that there are no obvious security issues with dependencies of the server.
- Extract server characteristics such as tools, resources, prompts, and required parameters.
Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.
Copy the following code to your README.md file: