# PostNL

> PostNL is an open-source MCP server for freight and logistics. Unofficial MCP server to create PostNL shipments, barcodes and parcel tracking from AI. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, macOS, Windows, Linux, VS Code, Self-hosted
- **Website:** https://developer.postnl.nl
- **Repository:** https://github.com/bartwaardenburg/postnl-mcp
- **MCP Registry name:** io.github.BartWaardenburg/postnl-mcp
- **Categories:** [freight and logistics](https://ai-powered.com/categories/freight-and-logistics)
- **Listing updated:** 2026-11-28

## About

Connects an AI assistant to the PostNL shipping API so it can create shipments with PDF or ZPL labels, generate barcodes for domestic, mailbox, EU and international parcels, and look up parcel status by barcode. It also covers expected delivery dates, delivery timeframes and nearby pickup and drop-off points.

The server runs locally over stdio and is started with npx. It needs a PostNL API key along with a customer code and customer number from a PostNL business account. Responses are cached for a configurable time, rate-limited requests are retried with backoff, and tools can be limited to specific categories to keep the context small.

It suits people who ship parcels for a business or webshop and want to handle routine PostNL tasks in plain language. Each API area needs its own subscription on the PostNL developer portal.

## Features

- **Shipment creation with labels:** Creates a shipment from sender and receiver addresses and returns a PDF or ZPL shipping label.
- **Barcode generation:** Produces barcodes for domestic, mailbox, EU and international parcel types.
- **Parcel tracking:** Looks up a parcel by barcode and returns its current status and event history.
- **Delivery date and timeframes:** Calculates expected delivery dates and available morning, afternoon or evening windows.
- **Pickup location finder:** Searches PostNL pickup and drop-off points by postal code, city or coordinates.
- **Toolset filtering:** Enables only chosen tool categories through an environment variable.

## Good for

- Print shipping labels for orders from a webshop or warehouse
- Track a parcel's status from a chat with an AI assistant
- Check expected delivery dates before promising a delivery day to a customer
- Find a nearby PostNL pickup point for a customer address

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add postnl-mcp --env POSTNL_API_KEY='<POSTNL_API_KEY>' --env POSTNL_CUSTOMER_CODE='<POSTNL_CUSTOMER_CODE>' --env POSTNL_CUSTOMER_NUMBER='<POSTNL_CUSTOMER_NUMBER>' -- npx -y postnl-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add postnl-mcp --env POSTNL_API_KEY='<POSTNL_API_KEY>' --env POSTNL_CUSTOMER_CODE='<POSTNL_CUSTOMER_CODE>' --env POSTNL_CUSTOMER_NUMBER='<POSTNL_CUSTOMER_NUMBER>' -- npx -y postnl-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.postnl-mcp]
command = "npx"
args = ["-y", "postnl-mcp"]
env = { POSTNL_API_KEY = "<POSTNL_API_KEY>", POSTNL_CUSTOMER_CODE = "<POSTNL_CUSTOMER_CODE>", POSTNL_CUSTOMER_NUMBER = "<POSTNL_CUSTOMER_NUMBER>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e POSTNL_API_KEY='<POSTNL_API_KEY>' -e POSTNL_CUSTOMER_CODE='<POSTNL_CUSTOMER_CODE>' -e POSTNL_CUSTOMER_NUMBER='<POSTNL_CUSTOMER_NUMBER>' postnl-mcp npx -- -y postnl-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "postnl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "postnl-mcp"
      ],
      "env": {
        "POSTNL_API_KEY": "<POSTNL_API_KEY>",
        "POSTNL_CUSTOMER_CODE": "<POSTNL_CUSTOMER_CODE>",
        "POSTNL_CUSTOMER_NUMBER": "<POSTNL_CUSTOMER_NUMBER>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 7 tools changes data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `generate_barcode`: Generate a PostNL barcode for shipping
- `create_shipment` (name suggests: changes): Create a shipment with label generation
- `get_shipment_status` (name suggests: reads): Track a parcel by barcode
- `get_delivery_date` (name suggests: reads): Calculate the expected delivery date for a shipment
- `get_delivery_options` (name suggests: reads): Get available delivery timeframes for an address
- `find_locations` (name suggests: reads): Find nearby PostNL pickup/drop-off points
- `get_location` (name suggests: reads): Get details of a specific PostNL location by location code

## FAQ

### Is this an official PostNL product?

No. It is a community-maintained project and is not affiliated with or endorsed by PostNL.

### What credentials are needed?

A PostNL API key, a customer code and a customer number, which are set as environment variables.

### Which AI clients can use PostNL?

Any MCP-compatible client that can start a stdio server, such as Claude Desktop, Cursor, VS Code or Claude Code.

### Are write actions protected?

The documentation recommends enabling host-side approvals for mutating tools such as shipment creation.

### Is PostNL free?

Yes. PostNL is open source, so you can use and self-host it for free.

### How do I add PostNL to Claude Code?

Run this command in your terminal: claude mcp add postnl-mcp --env POSTNL_API_KEY='<POSTNL_API_KEY>' --env POSTNL_CUSTOMER_CODE='<POSTNL_CUSTOMER_CODE>' --env POSTNL_CUSTOMER_NUMBER='<POSTNL_CUSTOMER_NUMBER>' -- npx -y postnl-mcp

### What are the best alternatives to PostNL?

The closest alternatives to PostNL are Australia Post MCP by UnClick, Apc MCP, Sendle MCP by UnClick, Royalmail MCP and GlobKurier Shipping MCP.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Australia Post MCP by UnClick](https://ai-powered.com/mcp/australia-post-mcp-by-unclick): Australia Post MCP by UnClick is an open-source MCP server for freight and logistics.
- [Apc MCP](https://ai-powered.com/mcp/apc-mcp): Apc MCP is an open-source MCP server for freight and logistics.
- [Sendle MCP by UnClick](https://ai-powered.com/mcp/sendle-mcp-by-unclick): Sendle MCP by UnClick is an open-source MCP server for freight and logistics.
- [Royalmail MCP](https://ai-powered.com/mcp/royalmail-mcp): Royalmail MCP is an open-source MCP server for freight and logistics.
- [GlobKurier Shipping MCP](https://ai-powered.com/mcp/globkurier-shipping-mcp): GlobKurier Shipping MCP is an open-source MCP server for freight and logistics.
- [parcelLab Order Status and Returns](https://ai-powered.com/mcp/parcellab-order-status-and-returns): parcelLab Order Status and Returns is an MCP server for freight and logistics.
- [Ship24 Tracking](https://ai-powered.com/mcp/ship24-tracking): Ship24 Tracking is an MCP server for freight and logistics.
- [NetCourier Parcel Tracking](https://ai-powered.com/mcp/netcourier-parcel-tracking): NetCourier Parcel Tracking is an MCP server for freight and logistics.

---
Source: https://ai-powered.com/mcp/postnl
