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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_barcode Generate Barcode

Generate a PostNL barcode for shipping. The barcode is required before creating a shipment. Types: 2S (mailbox parcel), 3S (domestic NL parcels), CC/CP/CD/CF (EU parcels), LA (EU letter), RI (registered international), UE (non-EU parcels).

ParameterTypeDescription
rangestringCustomer code override (defaults to env POSTNL_CUSTOMER_CODE)
seriestringBarcode serie range
typestringBarcode type. 2S = mailbox parcel, 3S = domestic, CC = EU consumer parcel, CP = EU compact, CD = EU parcel, CF = EU bulk, LA = EU letter, RI = registered international, UE = non-EU

create_shipment Create Shipment

Create a PostNL shipment and generate a shipping label. Requires a barcode (use generate_barcode first), sender address (AddressType 02), and receiver address (AddressType 01). Returns a PDF label as base64. Common product codes: 3085 (standard), 3385 (stated address only), 3090 (neighbour + return), 3087 (extra cover), 3089 (signature on delivery), 3533/3534 (pickup point). Evening delivery: use product option {Characteristic: '118', Option: '006'} with a DeliveryDate. WARNING: Creating a shipment incurs shipping costs. Always confirm with the user before calling this tool.

ParameterTypeDescription
addresses *arrayArray of addresses. Must include sender (AddressType 02) and receiver (AddressType 01)
barcode *stringThe barcode for this shipment (use generate_barcode to create one)
confirmbooleanConfirm the shipment immediately (true) or save as concept (false)
contactsarrayContact information for notifications
customsobjectCustoms information (required for international shipments)
deliveryDatestringRequested delivery date (format: dd-MM-yyyy HH:mm:ss)
dimensionobjectPackage dimensions
printerTypestringLabel output format
productCodeDeliverystringProduct code: 3085 (standard), 3385 (evening), 3090 (pickup), 3087 (extra@home), 3089 (signature)
productOptionsarrayAdditional product options
referencestringYour reference for this shipment
remarkstringRemark for the shipment

get_shipment_status Get Shipment Status

Track a PostNL shipment by barcode. Returns the current status, expected delivery date, and status history of the shipment.

ParameterTypeDescription
barcode *stringThe PostNL barcode/tracking number of the shipment

get_delivery_date Get Delivery Date

Calculate the expected delivery date for a shipment based on the shipping date, postal code, and delivery options. Useful for showing customers when they can expect their parcel.

ParameterTypeDescription
postalCode *stringDestination postal code (Dutch format: 1234AB)
shippingDate *stringShipping date in format dd-MM-yyyy HH:mm:ss (e.g. '29-06-2024 14:00:00')
citystringDestination city
countryCodestringDestination country code (ISO 3166-1 alpha-2)
cutOffTimestringCut-off time for same-day processing (format: HH:mm:ss)
houseNrstringDestination house number
houseNrExtstringHouse number extension
optionsarrayDelivery options: Daytime, Evening, Morning, Noon, Sunday, Sameday
originCountryCodestringOrigin country code (ISO 3166-1 alpha-2)
shippingDurationintegerNumber of days for shipping (default depends on destination)

get_delivery_options Get Delivery Options

Get available delivery time windows for a specific address and date range. Returns available timeframes including daytime, evening, and morning delivery options.

ParameterTypeDescription
endDate *stringEnd date for the timeframe calculation (format: dd-MM-yyyy)
postalCode *stringDestination postal code (Dutch format: 1234AB)
startDate *stringStart date for the timeframe calculation (format: dd-MM-yyyy)
allowSundaySortingbooleanAllow Sunday sorting for delivery
citystringDestination city
countryCodestringDestination country code (ISO 3166-1 alpha-2)
houseNrExtstringHouse number extension
houseNumberintegerDestination house number
optionsarrayDelivery options to query: Daytime, Evening, Morning, Noon, Sunday, Sameday
streetstringDestination street name

find_locations Find PostNL Locations

Find nearby PostNL pickup/drop-off points (post offices, parcel lockers, retail points). Search by postal code, city, coordinates, or a combination. Useful for finding the nearest place to drop off or collect a parcel.

ParameterTypeDescription
citystringCity to search in
countryCodestringCountry code (ISO 3166-1 alpha-2)
deliveryDatestringDelivery date (format: dd-MM-yyyy)
deliveryOptionsarrayFilter by delivery options: PG (pickup), PGE (early pickup), PA (parcel automat)
houseNumberintegerHouse number
latitudenumberLatitude for geo-search
longitudenumberLongitude for geo-search
openingTimestringRequired opening time (format: HH:mm:ss)
postalCodestringPostal code to search near (Dutch format: 1234AB)
streetstringStreet name

get_location Get PostNL Location

Get detailed information about a specific PostNL location by its location code. Returns address, opening hours, available delivery options, and contact information.

ParameterTypeDescription
locationCode *stringThe PostNL location code
retailNetworkIDstringRetail network ID (default: PNPNL-01 for PostNL Netherlands)