PostNL

v0.3.1
io.github.BartWaardenburg/postnl-mcp Checked 1 day ago Published 6 days ago

Create shipments, generate barcodes, track parcels, and find pickup locations via the PostNL API

Values you need

VariableWhat it is
POSTNL_API_KEYrequired secret PostNL API key.
POSTNL_CUSTOMER_CODErequired PostNL customer code, used for barcodes and shipments.
POSTNL_CUSTOMER_NUMBERrequired PostNL customer number, used in shipment requests.
POSTNL_CACHE_TTLoptional Response cache lifetime in seconds. Use 0 to turn the cache off.
POSTNL_MAX_RETRIESoptional Maximum retries for rate-limited requests.
POSTNL_TOOLSETSoptional Comma-separated tool categories to enable: shipping, tracking, delivery, locations.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add postnl-mcp -e 'POSTNL_API_KEY=<POSTNL_API_KEY>' -e 'POSTNL_CUSTOMER_CODE=<POSTNL_CUSTOMER_CODE>' -e 'POSTNL_CUSTOMER_NUMBER=<POSTNL_CUSTOMER_NUMBER>' -- npx -y postnl-mcp@0.3.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "postnl-mcp": {
      "args": [
        "-y",
        "postnl-mcp@0.3.1"
      ],
      "command": "npx",
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "postnl-mcp": {
      "args": [
        "-y",
        "postnl-mcp@0.3.1"
      ],
      "command": "npx",
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "POSTNL_API_KEY",
      "id": "postnl-api-key",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "POSTNL_CUSTOMER_CODE",
      "id": "postnl-customer-code",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "POSTNL_CUSTOMER_NUMBER",
      "id": "postnl-customer-number",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "postnl-mcp": {
      "args": [
        "-y",
        "postnl-mcp@0.3.1"
      ],
      "command": "npx",
      "env": {
        "POSTNL_API_KEY": "${input:postnl-api-key}",
        "POSTNL_CUSTOMER_CODE": "${input:postnl-customer-code}",
        "POSTNL_CUSTOMER_NUMBER": "${input:postnl-customer-number}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.postnl-mcp]
command = "npx"
args = ["-y", "postnl-mcp@0.3.1"]
env = { "POSTNL_API_KEY" = "<POSTNL_API_KEY>", "POSTNL_CUSTOMER_CODE" = "<POSTNL_CUSTOMER_CODE>", "POSTNL_CUSTOMER_NUMBER" = "<POSTNL_CUSTOMER_NUMBER>" }

For AI agents

  1. Ask the user for: POSTNL_API_KEY, POSTNL_CUSTOMER_CODE, POSTNL_CUSTOMER_NUMBER. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: generate_barcode, create_shipment, get_shipment_status, get_delivery_date, get_delivery_options, find_locations, get_location.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json