PostNL
Unofficial MCP server to create PostNL shipments, barcodes and parcel tracking from AI
PostNL is an open-source MCP server for freight and logistics. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, API, macOS
- Runs
- Locally
- What it can do
- Can change data (1 tool)
- Access
- Needs a secret key or token
- Version
- 0.3.1
Similar MCP servers
Install
Add with the CLI
Run in a 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-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.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>"
}
}
}
}Add to claude_desktop_config.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.
Add to ~/.cursor/mcp.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.
Add to ~/.copilot/mcp-config.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.
Add with the CLI
Run in a terminal
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-mcpOr add to config.toml
Add to ~/.codex/config.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>" }Add to your client's MCP settings (most use this shape)
{
"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>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.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
Antigravity
Add to ~/.gemini/config/mcp_config.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 (formerly Windsurf)
Add to ~/.config/devin/mcp_config.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
Add to cline_mcp_settings.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
Add to Zed settings.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
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "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.
Junie
Add to ~/.junie/mcp/mcp.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
Add to ~/.kiro/settings/mcp.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.
Using several servers? Build one config file with the MCP config generator.
Configuration
POSTNL_API_KEYPostNL API key.RequiredPOSTNL_CUSTOMER_CODEPostNL customer code, used for barcodes and shipments.RequiredPOSTNL_CUSTOMER_NUMBERPostNL customer number, used in shipment requests.RequiredPOSTNL_CACHE_TTLResponse cache lifetime in seconds. Use 0 to turn the cache off.POSTNL_MAX_RETRIESMaximum retries for rate-limited requests.POSTNL_TOOLSETSComma-separated tool categories to enable: shipping, tracking, delivery, locations.
About PostNL
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.
Tools this server provides (7)
Taken from the project documentation; the running server may differ.
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_shipmentName suggests: changes
- Create a shipment with label generation
- get_shipment_statusName suggests: reads
- Track a parcel by barcode
- get_delivery_dateName suggests: reads
- Calculate the expected delivery date for a shipment
- get_delivery_optionsName suggests: reads
- Get available delivery timeframes for an address
- find_locationsName suggests: reads
- Find nearby PostNL pickup/drop-off points
- get_locationName suggests: reads
- Get details of a specific PostNL location by location code
What it does
- 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
Pricing
Open source
Open-source MIT server; PostNL API access requires a PostNL business account and subscriptions.
Prices change. Check developer.postnl.nl before you buy.
PostNL 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.