shiplabel-mcp
Allows creating shipping labels and tracking numbers for DHL Paket (DE) shipments in both sandbox and production with your own DHL business account.
Enables label creation and tracking for DPD shipments using your DPD business account.
Provides integration for creating FedEx labels and tracking numbers, including sandbox support.
Supports generating shipping labels and tracking numbers for UPS shipments, with sandbox mode available.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shiplabel-mcpCreate a DHL label for a 2kg parcel to Berlin"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
shiplabel-mcp
Carrier-agnostic shipping labels as a self-hostable MCP server. Build one shipment request, get a tracking number and a print-ready label back — the same way for DHL, DPD, UPS, FedEx, GLS, Sendcloud, Shipcloud and DHL Return. Run it yourself, connect it to Claude (or any MCP client), and create labels straight from a chat, a script, or your own agent.
Carrier-direct: no account with anyone is required to run this — you bring your own account with the carrier(s) you ship with.
Built and open-sourced by Xentral, the ERP for growing product businesses. This server is fully standalone and needs no Xentral account.
Don't want to self-host? The same engine is available ready-to-use, fully hosted, as the Carrier Kit in Xentral AgentOS — no server to run, no setup: agent.xentral.com/en/starter-kits.
Try it in 2 minutes
Looking around needs no carrier account — list_carriers and describe_carrier
work out of the box:
pip install shiplabel-mcp # or: uv pip install shiplabel-mcp
shiplabel carriers # lists every carrier, no credentials neededYour first real label — the fastest path is Sendcloud (self-serve API key, no per-carrier contract). Grab a public/secret key and a shipping-method id from the Sendcloud panel, then:
export SHIPLABEL_SENDCLOUD_PUBLIC_KEY="..."
export SHIPLABEL_SENDCLOUD_SECRET_KEY="..."
export SHIPLABEL_SENDCLOUD_METHOD_ID="8" # a shipping method from your panel
shiplabel create --carrier sendcloud --from examples/sendcloud_request.json --out label.pdfPrefer DHL? The DHL sandbox needs no production contract. Full setup for every carrier: per-carrier guides · configuration.
Related MCP server: royalmail-mcp
How it works
Carriers are data, not code. One generic engine executes a declarative JSON
spec per carrier (endpoints, auth, a payload template, response paths). You build
a single canonical shipment request (address + parcel + options); the engine
maps it onto the carrier's API and normalizes the response to tracking number + base64 label. Adding or tweaking a carrier is a JSON file, not a code change.
Supported carriers
Carrier | Sandbox | What you need (your own account) |
| ✅ | developer.dhl.com app + DHL business/GKP contract — see the note below |
| ✅ | DHL returns API key + receiver id |
| — | DPD business account (partner + cloud credentials) |
| ✅ | UPS developer app + account number |
| ✅ | FedEx developer app + account number |
| — | GLS business account |
| — | Sendcloud account (self-serve API key; aggregates PostNL, Swiss Post, Österr. Post, DPD, DHL…) |
| — | Shipcloud account (self-serve API key) — spec shipped, not yet exercised in tests |
Bring your own carrier account. Every production carrier API requires a business/shipping account with that carrier. This project provides the integration; it does not include and cannot provide carrier credentials. The easiest self-serve entry points are the aggregators Sendcloud and Shipcloud.
Per-carrier setup & examples
Each guide has a concrete example: where to register, the exact env config, an example request, and the command to create a label.
DHL — includes a free sandbox quickstart
UPS — has a sandbox
Sendcloud — self-serve keys, easiest to start
FedEx, Shipcloud and DHL Return follow the same pattern — run
describe_carrier <code>for their keys and see the configuration guide below.
→ Configuration guide — how credentials and options reach any carrier (env vars, TOML profiles, inline config, sandbox flags, adding your own carrier). Same mechanism for all of them.
⚠️ DHL needs your own credentials
This repo ships no DHL keys. To use DHL you need:
your own app on developer.dhl.com (client id + secret) — free to register; sandbox works immediately;
for production, additionally a DHL business-customer contract (Post & DHL Geschäftskundenportal, "GKP") with a customer/billing number. You don't get this "out of the box" — you register with DHL as a business customer.
To try it out, the sandbox is enough (public DHL test login, see
docs/carriers/dhl.md). Without a GKP contract you cannot create real (production) labels — that's a DHL requirement, not a limit of this tool.
Quickstart
Option A — Docker
git clone https://github.com/xentral/shiplabel-mcp.git
cd shiplabel-mcp
cp .env.example .env # fill in the carrier(s) you use
docker compose up # HTTP MCP server on http://127.0.0.1:8000/mcpOption B — local (Python 3.11+)
pip install shiplabel-mcp # or: uv pip install shiplabel-mcp
cp .env.example .env # and export/source it, or set env vars directly
shiplabel-mcp # stdio server (for Claude Desktop / Claude Code)
shiplabel-mcp --http # or streamable HTTP on 127.0.0.1:8000Connect it to an MCP client
The server exposes three tools: list_carriers, describe_carrier,
create_label.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"shiplabel": {
"command": "shiplabel-mcp",
"env": {
"DHL_API_CLIENT_ID_SANDBOX": "your-dev-app-id",
"DHL_API_CLIENT_SECRET_SANDBOX": "your-dev-app-secret",
"SHIPLABEL_DHL_USERNAME": "your-gkp-user",
"SHIPLABEL_DHL_PASSWORD": "your-gkp-password",
"SHIPLABEL_DHL_ACCOUNTNUMBER": "your-billing-number",
"SHIPLABEL_DHL_SANDBOX": "true"
}
}
}
}Claude Code
claude mcp add shiplabel \
-e SHIPLABEL_DHL_SANDBOX=true \
-e SHIPLABEL_DHL_USERNAME=... \
-- shiplabel-mcpHTTP mode
Start with shiplabel-mcp --http and point your client at
http://127.0.0.1:8000/mcp (streamable HTTP transport).
Then just ask: "list the shipping carriers", "describe what dhl needs", "create a DHL label from Muster GmbH, Bonn to Erika Beispiel, Bonn, 1.5 kg."
Use it as a library or CLI
The MCP server is a thin wrapper over the shiplabel Python package, which you
can also use directly:
from decimal import Decimal
from shiplabel import CanonicalShipmentRequest, CarrierSelection, Party, Parcel, create_label
req = CanonicalShipmentRequest(
carrier=CarrierSelection(code="dhl", product="V01PAK"),
sender=Party(name="Muster GmbH", street="Sträßchensweg", house_number="10",
postal_code="53113", city="Bonn", country="DE"),
recipient=Party(name="Erika Beispiel", street="Kurt-Schumacher-Str.", house_number="20",
postal_code="53113", city="Bonn", country="DE"),
parcels=[Parcel(id="p1", weight_kg=Decimal("1.5"))],
)
config = {"dhl_username": "...", "dhl_password": "...", "dhl_accountnumber": "...",
"dhl_api_key": "...", "dhl_api_secret": "...", "dhl_sandbox": True}
result = create_label(config, req)
print(result.parcels[0].tracking_number) # + result.parcels[0].label.data (base64 PDF)shiplabel carriers # list carriers
echo '{...}' | shiplabel create --carrier dhl --out label.pdf # canonical request on stdinSee src/shiplabel/README.md for the full library /
CLI reference and the canonical request shape.
Configuration
Copy .env.example and set only the carriers you use.
SHIPLABEL_<KEY>→ the lowercase carrier config key<key>(e.g.SHIPLABEL_DHL_USERNAME→dhl_username).DHL developer-app credentials are read from
DHL_API_CLIENT_ID[_SANDBOX]/DHL_API_CLIENT_SECRET[_SANDBOX].SHIPLABEL_CARRIERS_DIR— a directory of extra*.jsonspecs to add or override carriers without forking.
Credentials can always also be passed inline per call (the MCP create_label
config argument, or the library config dict) — inline wins over env.
See the configuration guide for TOML profiles, source precedence, sandbox flags, and the full canonical request shape.
Add a carrier
Drop a <code>.json spec into src/shiplabel/carriers/ (or a
SHIPLABEL_CARRIERS_DIR). A spec has five parts — transport, auth,
capabilities, request (a Jinja payload template), response. See
src/shiplabel/README.md
and dhl.json for a complete example. Modern REST/JSON carrier APIs fit the
declarative model; carriers needing computed security (e.g. SOAP WSSE) are out
of scope.
Security
Never commit credentials.
.env,*.env(except.env.example) andcarriers.tomlare git-ignored.Labels are returned as base64 blobs; the CLI writes them to disk only where you ask. Generated
*.pdf/*.zpl/*.pngare git-ignored.Report vulnerabilities per
SECURITY.md.
Development
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
python -m pytest # transport is mocked — no live carrier calls
ruff check .License
MIT © Xentral ERP Software GmbH.
Available Tools
3 toolscreate_labelA
Create a shipping label from a canonical shipment request.
request is a canonical shipment request:
{carrier: {code, product}, sender, recipient, parcels: [{id, weight_kg, dimensions_cm}], references, label: {format}}. Addresses need
name/street/postal_code/city/country.
carrier overrides request.carrier.code when set. config supplies carrier
credential keys (e.g. dhl_username) merged over the environment; use it for
ad-hoc testing without setting SHIPLABEL_* env vars. include_label=false
returns a compact tracking-only reply without the base64 label.
Returns the shipment number and, per parcel, the tracking number/URL, label format and (unless disabled) the base64-encoded label.
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | ||
| carrier | No | ||
| request | Yes | ||
| include_label | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses behavioral traits: input structure, override logic, optional output suppression, and return format. It mentions that config is for testing, implying normal credential loading from environment. It does not mention costs or destructive nature, but the behavior is well-explained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: purpose first, then request details, then optional parameters and return value. It is somewhat verbose but every sentence adds value. Front-loading works well.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (4 params, nested objects, output schema exists), the description covers input structure, overrides, credential handling, and return format. It does not detail all sub-fields but provides sufficient context for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description fully compensates by detailing the nested request structure, address fields, carrier/product, parcels, references, label format, and the purpose of carrier, config, and include_label. This adds significant meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Create a shipping label from a canonical shipment request,' specifying the verb, resource, and primary action. It distinguishes itself from siblings (describe_carrier, list_carriers) which are about carrier info, not label creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use optional parameters like 'carrier' (overrides request value) and 'config' (for ad-hoc testing without env vars). It does not explicitly state when not to use the tool or compare to alternatives, but the sibling tools are clearly different in purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_carrierA
Describe the canonical shipment request and, if carrier is given, that
carrier's required config keys, supported services and label formats.
Call this before create_label to learn exactly what to pass.
| Name | Required | Description | Default |
|---|---|---|---|
| carrier | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses what is returned (required config keys, supported services, label formats) and implies read-only behavior. Does not mention side effects, auth needs, or errors, but is sufficient for a describe tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. Purpose and usage are front-loaded. Highly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Output schema exists, so description need not detail return format. It covers what info is returned and usage hint. Lacks mention of alternative sibling 'list_carriers', but overall complete for a simple describe tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage for parameter, but description explains that if 'carrier' is given, carrier-specific details are returned; otherwise, canonical request. Adds meaning beyond bare schema, though could clarify null behavior more explicitly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it describes the canonical shipment request and carrier-specific details if carrier is given. Verb 'describe' and resource 'shipment request and carrier config' are specific. Distinguishes from sibling 'create_label' by advising to call before it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Call this before `create_label` to learn exactly what to pass,' providing clear when to use. Does not mention when not to use or alternatives, but context with 'list_carriers' suggests this is for detailed info.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_carriersA
List the shipping carriers this server can create labels for.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It states the tool lists carriers, but does not mention ordering, filtering, side effects, or scope. Since the tool has no parameters and a likely output schema, the transparency is adequate but minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence with no unnecessary words. Every part contributes meaning, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters and an output schema is provided, the description sufficiently explains the tool's purpose. It could mention that it returns all carriers without filtering, but the context is already complete for a simple listing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters with 100% coverage. The description adds no parameter info because none is needed; it implicitly indicates no parameters are required. This is a baseline 4 for no-parameter tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: to list shipping carriers that the server can create labels for. It uses a specific verb ('List') and resource ('carriers'), and distinguishes itself from sibling tools (create_label, describe_carrier) by its focus on enumeration rather than creation or details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives like describe_carrier or create_label. Usage is implied by the tool's name and purpose, but no direct guidance is given, which leaves the agent to infer from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
create_label - First observed
describe_carrier - First observed
list_carriers
TDQS
Scored across 3 tools
Each tool has a distinct purpose: list_carriers discovers carriers, describe_carrier explains requirements, create_label performs the main action. No functional overlap.
All tools follow a consistent verb_noun pattern with lowercase and underscores (list_carriers, describe_carrier, create_label), making the API predictable.
Three tools is slightly minimal but appropriate for a focused shipping label MCP. It covers discovery, guidance, and creation without extra fluff.
The core workflow (list carriers, describe requirements, create label) is fully covered. Missing operations like label retrieval or cancellation are minor gaps given the server's purpose.
Maintenance
Related MCP Connectors
Multi-carrier shipping functionality with built-in, discounted carrier accounts. Compare rates, generate PDF shipping labels, schedule pickups and track packages in automated way or in your chatbox, no coding required. This is a demo server that is functional with no account needed and no auth. For production use please find our production version.
MCP server for EasyPost — rate shipments, buy & refund labels, track packages, verify addresses.
Furgonetka MCP Server is an extension for LLMs (such as Claude) that integrates AI assistants with Poland's most popular courier brokerage platform. The server enables models to interact directly with services from various couriers (including InPost, DPD, DHL, UPS, and Poczta Polska) through a single, unified interface. With this integration, your AI stops just "writing about logistics" and starts actually managing it.
Multi-carrier shipping for AI agents: compare rates, buy labels, track packages, validate addresses
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with ShipEngine's shipping API, allowing users to manage shipments, labels, carriers, and other shipping operations through natural language commands.-
- AlicenseAqualityDmaintenanceConnect any MCP-compatible AI to Royal Mail shipping. This server exposes five tools that let Claude, Cursor or any MCP client book orders, fetch postage labels, track shipments and cancel bookings through the official Click & Drop API.515 npm3MIT
- AlicenseAqualityCmaintenanceMCP server for APC Overnight. Book, label, track and cancel UK parcel shipments from any MCP-compatible AI.63 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA horizontally scalable Model Context Protocol server for exposing shipment tracking (and other data sources) as authenticated MCP tools, starting with DB Schenker's public tracking endpoint.1MIT