{
  "question": "How do I check the license of an npm or PyPI package?",
  "slug": "how-to-check-an-npm-or-pypi-package-license",
  "url": "https://www.rightshold.com/answers/how-to-check-an-npm-or-pypi-package-license",
  "short_answer": "Example: a package declaring MIT, shipped commercially: Yes.",
  "framing": "Packages declare their license in registry metadata. Rightshold reads it for you: pass the package page URL as source_url.",
  "checks": [
    {
      "label": "Example: a package declaring MIT, shipped commercially",
      "license": "MIT",
      "license_name": "MIT License",
      "intended_use": {
        "commercial_use": true,
        "redistribution": true
      },
      "verdict": "permitted",
      "answer": "Yes",
      "findings": [
        "Every use you described is granted by MIT, and nothing you described is prohibited."
      ],
      "duties": [
        "attribution",
        "license_notice"
      ],
      "curation": "curated",
      "official_text": "https://opensource.org/license/mit"
    }
  ],
  "context": [
    "A declared license is the publisher's claim; check the LICENSE file for anything unusual. Packages with no declared license have no grant: no license found is not permission."
  ],
  "sources": [
    {
      "title": "npm package.json license field",
      "url": "https://docs.npmjs.com/cli/v10/configuring-npm/package-json#license"
    },
    {
      "title": "PyPI core metadata: License-Expression",
      "url": "https://packaging.python.org/en/latest/specifications/core-metadata/#license-expression"
    }
  ],
  "check_it_yourself": {
    "mcp": {
      "tool": "check_license",
      "arguments": {
        "license": "MIT",
        "intended_use": {
          "commercial_use": true,
          "redistribution": true
        }
      }
    },
    "rest": "POST https://www.rightshold.com/v1/licenses/check"
  },
  "computed_from": "Rightshold license profiles at render time; not legal advice",
  "updated": "2026-10-19"
}