NPM Helperのロゴ

NPM Helper

組織
pinkpixel-dev

A Model Context Protocol (MCP) server providing tools for NPM package management and dependency updates. Helps LLMs like Claude interact with npm packages, search npm registry, and keep dependencies up-to-date.

公開者pinkpixel-dev
リポジトリnpm-helper-mcp
言語JavaScript
フォーク
5
スター
8
利用可能なツール
10
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    NPM Helperは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 10個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには8件のスターと5件のフォークがあります。

MseeP.ai Security Assessment Badge

📦 NPM Helper - A tool to help your ai assistant with npm package management.🤖 npm version

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:

  1. Copy and paste the json configuration into your application's mcp configuration file.
json
{
    "mcpServers": {
      "npm-helper": {
        "command": "npx",
        "args": [
            "-y",
            "@pinkpixel/npm-helper-mcp"
        ]
      }
    }
  }
  1. Enter the command to run the server in your application's mcp configuration settings.
bash
  npx -y @pinkpixel/npm-helper-mcp

Option 2: Local installation

If you prefer to install the server locally, you can do so with the following command:

bash
# Install the package globally
npm install -g npm-helper-mcp

Configuration:

  1. Copy and paste the json configuration into your application's mcp configuration file.
json
{
    "mcpServers": {
      "npm-helper": {
        "command": "npx",
        "args": [
            "-y",
            "@pinkpixel/npm-helper-mcp"
        ]
      }
    }
  }
  1. Enter the command to run the server in your application's mcp configuration settings.
bash
  npm-helper-mcp

Option 3: Install from source

bash
# Clone the repository
git clone https://github.com/pinkpixel-dev/npm-helper-mcp.git
cd npm-helper-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Optionally run/test the server
npm start

Configuration:

  1. Copy and paste the json configuration into your application's mcp configuration file.
json
{
    "mcpServers": {
      "npm-helper": {
        "command": "node",
        "args": [
            "/path/to/npm-helper-mcp/dist/index.js"
        ]
      }
    }
  }
  1. Enter the command to run the server in your application's mcp configuration settings.
bash
 node /path/to/npm-helper-mcp/dist/index.js

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 check
  • reject (optional): List of package names to exclude
  • target (optional): Target version to upgrade to (latest, newest, greatest, minor, patch, semver)
  • interactive (optional): Enable interactive mode for choosing updates
  • peer (optional): Check peer dependencies of installed packages
  • minimal (optional): Do not upgrade newer versions that are already satisfied by the version range
  • packageManager (optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)

Example:

json
{
  "name": "check_updates",
  "arguments": {
    "packagePath": "./package.json",
    "filter": ["react", "lodash"],
    "peer": true,
    "minimal": true,
    "packageManager": "npm"
  }
}

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 updates
  • peer (optional): Check peer dependencies of installed packages
  • minimal (optional): Do not upgrade newer versions that are already satisfied by the version range
  • packageManager (optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)

Example:

json
{
  "name": "upgrade_packages",
  "arguments": {
    "upgradeType": "minor",
    "peer": true,
    "minimal": true,
    "packageManager": "yarn"
  }
}

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 check
  • upgrade (optional): Whether to upgrade the package.json file or just check
  • minimal (optional): Do not upgrade newer versions that are already satisfied by the version range
  • packageManager (optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)

Example:

json
{
  "name": "filter_updates",
  "arguments": {
    "filter": ["react", "react-dom"],
    "upgrade": false,
    "minimal": true
  }
}

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 check
  • minimal (optional): Do not upgrade newer versions that are already satisfied by the version range
  • packageManager (optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)

Example:

json
{
  "name": "resolve_conflicts",
  "arguments": {
    "upgrade": true,
    "packageManager": "npm"
  }
}

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 version
  • upgrade (optional): Whether to upgrade the package.json file or just check
  • minimal (optional): Do not upgrade newer versions that are already satisfied by the version range
  • packageManager (optional): Package manager to use (npm, yarn, pnpm, deno, bun, staticRegistry)

Example:

json
{
  "name": "set_version_constraints",
  "arguments": {
    "target": "minor",
    "removeRange": false,
    "upgrade": true,
    "packageManager": "pnpm"
  }
}

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:

json
{
  "name": "run_doctor",
  "arguments": {
    "packagePath": "./package.json",
    "doctorInstall": "npm ci",
    "doctorTest": "npm run test:ci",
    "packageManager": "npm"
  }
}

Tool: search_npm

Searches for npm packages.

Parameters:

  • query (required): Search query for npm packages
  • maxResults (optional): Maximum number of results to return (default: 10)

Example:

json
{
  "name": "search_npm",
  "arguments": {
    "query": "react state management",
    "maxResults": 5
  }
}

Tool: fetch_package_content

Fetch and parse detailed content from an npm package page.

Parameters:

  • url (required): URL of the npm package page

Example:

json
{
  "name": "fetch_package_content",
  "arguments": {
    "url": "https://www.npmjs.com/package/react"
  }
}

Tool: get_package_versions

Gets available versions for an npm package.

Parameters:

  • packageName (required): Name of the npm package

Example:

json
{
  "name": "get_package_versions",
  "arguments": {
    "packageName": "react"
  }
}

Tool: get_package_details

Gets detailed information about an npm package.

Parameters:

  • packageName (required): Name of the npm package

Example:

json
{
  "name": "get_package_details",
  "arguments": {
    "packageName": "react"
  }
}

📝 Response Format

All tools return responses in a standard format:

json
{
  "status": "success" | "error",
  "data": {}, // Tool-specific data
  "message": "Human-readable message"
}

🆘 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

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "npm-helper": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/npm-helper-mcp"
      ]
    }
  }
}

利用可能なツール

  • search_npm

    Search for npm packages

  • fetch_package_content

    Fetch detailed content from an npm package page URL

  • get_package_versions

    Get available versions for an npm package

  • get_package_details

    Get detailed information about an npm package

  • check_updates

    Scan package.json for outdated dependencies

  • upgrade_packages

    Upgrade dependencies in package.json

  • filter_updates

    Check/upgrade updates for specific packages

  • resolve_conflicts

    Handle dependency conflicts (uses 'peer' strategy)

  • set_version_constraints

    Configure version upgrade rules for dependencies

  • run_doctor

    Iteratively install upgrades and run tests

NPM HelperのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度NPM Helperに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

NPM Helperをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. NPM HelperのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "npm-helper": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/npm-helper-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてNPM HelperのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. NPM HelperのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
NPM Helperを使ってこのタスクを手伝ってもらえますか?
NPM Helper
はい、読みました。
NPM Helperで調べた結果をお伝えします。

よくある質問

NPM Helper MCPサーバーは何に使いますか?

NPM Helperは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでNPM Helper MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでNPM Helperを利用できます。

TypingMindでNPM Helper MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。NPM Helperを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

NPM Helper MCPをTypingMindに接続するにはどうすればよいですか?

NPM HelperはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでNPM Helper MCPのどのようなツールを利用できますか?

NPM Helperは10個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

NPM Helper MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。NPM Helperで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇