# `npm_registry__npm_versions`

List recent versions of an npm package

- Server: [npm Registry](https://gateway.mcpharbor.dev/docs/servers/npm_registry) (`dev.mcpharbor.gateway/npm_registry`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/npm_registry`
- Upstream tool: exposed by the provider; called through this gateway as `npm_registry__npm_versions`
- Provider terms: <https://docs.npmjs.com/policies/open-source-terms> (verified 2026-09-19)
- Upstream API documentation: <https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md>
- Rate limit: 1000 requests per minute

## Parameters

- `count` (integer, optional): Number of versions to show Default: `10`.
- `name` (string, required): Package name

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: npm_registry__npm_versions
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "name": "example"
    },
    "name": "npm_registry__npm_versions"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider asks for no attribution. Their terms still apply: see the table above.

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "description": "List recent versions of an npm package",
  "inputSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "properties": {
      "count": {
        "default": 10,
        "description": "Number of versions to show",
        "maximum": 50,
        "minimum": 1,
        "type": "integer"
      },
      "name": {
        "description": "Package name",
        "type": "string"
      }
    },
    "required": [
      "name"
    ],
    "type": "object"
  },
  "name": "npm_registry__npm_versions"
}
```
