npm · Capability

npm Registry API — Packages

npm Registry API — Packages. 2 operations. Lead operation: Get a package document (packument). Self-contained Naftiko capability covering one Npm business surface.

Run with Naftiko NpmPackages

What You Can Do

GET
Getpackagedocument — Get a package document (packument)
/v1/{package}
GET
Getpackageversion — Get a specific package version
/v1/{package}/{version}

MCP Tools

get-package-document-packument

Get a package document (packument)

read-only idempotent
get-specific-package-version

Get a specific package version

read-only idempotent

Capability Spec

registry-packages.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: npm Registry API — Packages
  description: 'npm Registry API — Packages. 2 operations. Lead operation: Get a package document (packument). Self-contained
    Naftiko capability covering one Npm business surface.'
  tags:
  - Npm
  - Packages
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NPM_API_KEY: NPM_API_KEY
capability:
  consumes:
  - type: http
    namespace: registry-packages
    baseUri: https://registry.npmjs.org
    description: npm Registry API — Packages business capability. Self-contained, no shared references.
    resources:
    - name: package
      path: /{package}
      operations:
      - name: getpackagedocument
        method: GET
        description: Get a package document (packument)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: package-version
      path: /{package}/{version}
      operations:
      - name: getpackageversion
        method: GET
        description: Get a specific package version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: registry-packages-rest
    port: 8080
    description: REST adapter for npm Registry API — Packages. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/{package}
      name: package
      description: REST surface for package.
      operations:
      - method: GET
        name: getpackagedocument
        description: Get a package document (packument)
        call: registry-packages.getpackagedocument
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{package}/{version}
      name: package-version
      description: REST surface for package-version.
      operations:
      - method: GET
        name: getpackageversion
        description: Get a specific package version
        call: registry-packages.getpackageversion
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: registry-packages-mcp
    port: 9090
    transport: http
    description: MCP adapter for npm Registry API — Packages. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-package-document-packument
      description: Get a package document (packument)
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-packages.getpackagedocument
      outputParameters:
      - type: object
        mapping: $.
    - name: get-specific-package-version
      description: Get a specific package version
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-packages.getpackageversion
      outputParameters:
      - type: object
        mapping: $.