Integrations
📦 NPM Helper - A tool to help your ai assistant with npm package management.🤖
A Model Context Protocol server for NPM dependency management. This server provides tools for NPM package search and tools for updating npm packages, ensuring your project's dependencies are up to date and updated to their latest compatible versions, without any conflicts or headaches.
As a baseline, for a safe upgrade of any project's package.json, your assistant can call the upgradePackagets tool with the 'peer' parameter set to true. This will likely not update all of your dependencies to the latest versions, but it will safely upgrade them to the latest compatible versions, without any errors.
If you are looking for a full upgrade of all dependencies, your assistant has many tools and parameters to safely explore. Parameter options and examples are provider below, in the "Available Tools" section. You can also find more information in the 'docs' directory.
There are also tools available to search and retrieve information from npmjs, if you are exploring options for new packages to add to your project, or if you are looking for information on a specific package.
✨ Features
npm-check-updates Tools
- 🔍 checkUpdates: Scan package.json for outdated dependencies
- 🚀 upgradePackages: Upgrade dependencies to latest versions
- 🔎 filterUpdates: Check updates for specific packages
- 🔄 resolveConflicts: Handle dependency conflicts
- ⚙️ setVersionConstraints: Configure version upgrade rules
- 🩺 runDoctor: Iteratively run upgrades and tests to detect breaking changes
NPM Search Tools
- 🔍 searchPackages: Search npmjs.org registry for packages
- 📝 fetchPackageContent: Scrape and extract content from npm package pages
- 📋 getPackageVersions: Retrieve version history of packages
- 📝 getPackageDetails: Fetch detailed package metadata
🚀 npm-helper-mcp Installation Guide
This guide will help you set up and run the npm-helper-mcp server.
📋 Prerequisites
Before you begin, ensure you have the following installed:
- Node.js (version 18.x or later)
- npm (version 8.x or later)
🔧 Configuration
The npm-helper-mcp server implements the Model Context Protocol, which enables it to communicate with LLM applications that support the protocol.
Configuration varies depending on the application. Generally, most mcp client applications will have a .json configuration file, or a place to enter the command to run the server. One of these 2 options should work in most cases.
Option 1: Run with npx
The easiest way to use the server is to run it with npx, which requires no local installation. Depending on your mcp client, use one of the following 2 methods:
- Copy and paste the json configuration into your application's mcp configuration file.
- Enter the command to run the server in your application's mcp configuration settings.
Option 2: Local installation
If you prefer to install the server locally, you can do so with the following command:
Configuration:
- Copy and paste the json configuration into your application's mcp configuration file.
- Enter the command to run the server in your application's mcp configuration settings.
Option 3: Install from source
Configuration:
- Copy and paste the json configuration into your application's mcp configuration file.
- Enter the command to run the server in your application's mcp configuration settings.
Using with LLMs
This server follows the Model Context Protocol, which allows it to be used by LLMs like Claude. The LLM can use the server's tools to perform various npm operations.
Available Tools
Tool: check_updates
Scans package.json for outdated dependencies.
Parameters:
packagePath
(optional): Path to package.json file (default: ./package.json)filter
(optional): List of package names to checkreject
(optional): List of package names to excludetarget
(optional): Target version to upgrade to (latest, newest, greatest, minor, patch, semver)interactive
(optional): Enable interactive mode for choosing updatespeer
(optional): Check peer dependencies of installed packagesminimal
(optional): Do not upgrade newer versions that are already satisfied by the version rangepackageManager
(optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)
Example:
Tool: upgrade_packages
Upgrades dependencies to their latest versions.
Parameters:
packagePath
(optional): Path to package.json file (default: ./package.json)upgradeType
(optional): Target version to upgrade to (latest, newest, greatest, minor, patch, semver)interactive
(optional): Enable interactive mode for choosing updatespeer
(optional): Check peer dependencies of installed packagesminimal
(optional): Do not upgrade newer versions that are already satisfied by the version rangepackageManager
(optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)
Example:
Tool: filter_updates
Checks updates for specific packages.
Parameters:
packagePath
(optional): Path to package.json file (default: ./package.json)filter
(required): List of package names to checkupgrade
(optional): Whether to upgrade the package.json file or just checkminimal
(optional): Do not upgrade newer versions that are already satisfied by the version rangepackageManager
(optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)
Example:
Tool: resolve_conflicts
Handles dependency conflicts using peer dependencies.
Parameters:
packagePath
(optional): Path to package.json file (default: ./package.json)upgrade
(optional): Whether to upgrade the package.json file or just checkminimal
(optional): Do not upgrade newer versions that are already satisfied by the version rangepackageManager
(optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)
Example:
Tool: set_version_constraints
Configures version upgrade rules.
Parameters:
packagePath
(optional): Path to package.json file (default: ./package.json)target
(required): Target version constraint strategy (latest, newest, greatest, minor, patch, semver)removeRange
(optional): Remove version ranges from the final package versionupgrade
(optional): Whether to upgrade the package.json file or just checkminimal
(optional): Do not upgrade newer versions that are already satisfied by the version rangepackageManager
(optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)
Example:
Tool: run_doctor
Iteratively installs upgrades and runs tests to identify breaking upgrades. It automatically reverts breaking upgrades and keeps working ones.
Parameters:
packagePath
(optional): Path to package.json file (default: ./package.json)doctorInstall
(optional): Custom install script to use (default: 'npm install' or 'yarn')doctorTest
(optional): Custom test script to use (default: 'npm test')packageManager
(optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)
Example:
Tool: search_npm
Searches for npm packages.
Parameters:
query
(required): Search query for npm packagesmaxResults
(optional): Maximum number of results to return (default: 10)
Example:
Tool: fetch_package_content
Fetch and parse detailed content from an npm package page.
Parameters:
url
(required): URL of the npm package page
Example:
Tool: get_package_versions
Gets available versions for an npm package.
Parameters:
packageName
(required): Name of the npm package
Example:
Tool: get_package_details
Gets detailed information about an npm package.
Parameters:
packageName
(required): Name of the npm package
Example:
📝 Response Format
All tools return responses in a standard format:
🆘 Troubleshooting
Connection Issues**:
- Ensure your LLM application is correctly configured to use the Model Context Protocol.
- Check your .json file for any errors, or verify your start command is correct.
- If running locally, verify your path to the index.js file. Use absolute paths if necessary.
Getting Help
If you encounter any issues not covered here:
- Check the GitHub issues for similar problems and solutions.
- Create a new issue with a detailed description of your problem.
📄 License
MIT
🙏 Credits
Made with ❤️ by Pink Pixel
This server cannot be installed
A Model Context Protocol server that provides tools for NPM package management, including dependency searching, updates, conflict resolution, and version management to help AI assistants safely upgrade project dependencies.
Related MCP Servers
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.Last updated -72JavaScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that integrates with Linear, enabling AI assistants to create, update, search, and comment on issues for project management and issue tracking.Last updated -56PythonApache 2.0
- -securityAlicense-qualityA Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.Last updated -9TypeScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that allows AI models to fetch detailed information about npm packages and discover popular packages in the npm ecosystem.Last updated -1TypeScript