Skip to main content
Glama

royalmail-mcp

npm version licence node CI

Reserva, etiqueta, rastrea y cancela envíos de Royal Mail y Parcelforce desde cualquier IA compatible con MCP, como Claude, Cursor o Windsurf.

Verificado con la API en vivo de Click & Drop (abril de 2026). La reserva, el seguimiento y la cancelación han sido probados de extremo a extremo. La recuperación de etiquetas ha sido verificada según las especificaciones para cuentas OBA.

Qué hace

Expone seis herramientas a cualquier IA que hable MCP:

Herramienta

Qué hace

book_order

Crea un pedido en Click & Drop. Devuelve un orderIdentifier.

book_batch_and_label

Reserva muchos pedidos a la vez y devuelve un único PDF combinado de todas las etiquetas, listo para imprimir.

get_label

Guarda la etiqueta de envío en el disco como un PDF. Requiere una cuenta OBA (ver más abajo).

track_order

Estado actual, número de seguimiento y fecha de envío.

cancel_order

Cancela un pedido antes de que sea manifestado. No se aplica ningún cargo.

list_services

Todos los servicios de Royal Mail y Parcelforce que soporta este MCP, con sus códigos.

Internamente, se comunica con https://api.parcel.royalmail.com/api/v1 usando tu clave de API de Click & Drop.

Related MCP server: UK Property Intelligence

Ejemplos de prompts

Una vez que el MCP esté instalado en tu cliente de IA, puedes decir cosas como:

"Reserva una carta de 1ª clase para Alex Taylor, 45 High Street, Manchester M1 1AA, 80 gramos. Asígnala como ORDER-1842."

"Envía estos tres pedidos mediante Tracked 48 y dame los orderIdentifiers." (pega una lista de direcciones)

"Reserva Special Delivery antes de la 1pm con £1,000 de compensación para esta dirección, luego obtén la etiqueta."

"Cancela el pedido 1004. El cliente envió el código postal incorrecto."

"¿Cuál es el servicio certificado más barato para un paquete de 500g?" (la IA llama a list_services y razona)

"Rastrea los pedidos 1002, 1003 y 1004 y resume dónde está cada uno."

"Aquí hay diez pedidos: resérvalos todos en Royal Mail Tracked 24 y dame un PDF que pueda imprimir." (la IA llama a book_batch_and_label y devuelve la ruta a un PDF combinado.)

La IA se encarga del análisis de direcciones, la selección de servicios y la recuperación de errores. Tú te encargas de las decisiones comerciales.

Ideas de flujo de trabajo para empresas

Conectado a cualquier agente de IA, este MCP puede automatizar operaciones de envío reales:

  • Cumplimiento de pedidos diario. Cada mañana, tu IA lee nuevos pedidos de Shopify, WooCommerce o una hoja de cálculo, reserva cada uno a través de Royal Mail con el nivel de servicio adecuado y publica los números de seguimiento de vuelta al cliente.

  • Triaje de atención al cliente. Cuando un cliente envía un correo electrónico preguntando "¿dónde está mi paquete?", tu IA llama a track_order, resume el estado más reciente en lenguaje sencillo y redacta una respuesta.

  • Gestión de devoluciones. Un cliente solicita una devolución. Tu IA lee la solicitud, reserva el servicio de devolución correcto y envía la etiqueta imprimible directamente por correo electrónico, sin intervención del personal.

  • Selección de múltiples transportistas. Instalado junto a apc-mcp, tu IA compara Royal Mail y APC en el momento de la reserva y elige la opción más barata o rápida por destino.

  • Días de cumplimiento masivo. Para eventos de ventas o envíos de cajas de suscripción, dale a tu IA un CSV de cientos de pedidos. Los reserva todos en el servicio y nivel de compensación correctos en una sola ejecución, luego te entrega un resumen.

  • Cotizaciones en el checkout. Cuando un cliente pregunta por el costo de envío en el checkout, tu IA elige el servicio correcto para el peso y el código postal, calcula el precio y responde en segundos.

Compatibilidad

Funciona con cualquier cliente MCP que soporte transporte stdio:

  • Claude Desktop

  • Cursor

  • Windsurf

  • Claude Code

  • Zed

ChatGPT, Smithery y otros clientes MCP remotos necesitan un transporte HTTP, que aún no está incluido. Si eso es importante para ti, abre un issue para que pueda priorizarlo.

Instalación

npm install -g royalmail-mcp

O ejecútalo sin instalar:

npx royalmail-mcp

Configuración

Obtén tu clave de API en Click & Drop → Settings → API credentials, luego configura:

RM_API_KEY=your-royal-mail-api-key
RM_BASE_URL=https://api.parcel.royalmail.com/api/v1

Ya sea en un archivo .env junto al servidor, o a través de la configuración de tu cliente MCP (ver más abajo).

Claude Desktop

Añade a ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "royalmail": {
      "command": "npx",
      "args": ["-y", "royalmail-mcp"],
      "env": {
        "RM_API_KEY": "your-royal-mail-api-key"
      }
    }
  }
}

Cursor

Añade a ~/.cursor/mcp.json:

{
  "mcpServers": {
    "royalmail": {
      "command": "npx",
      "args": ["-y", "royalmail-mcp"],
      "env": {
        "RM_API_KEY": "your-royal-mail-api-key"
      }
    }
  }
}

Servicios soportados

Clave

Servicio de Royal Mail

Código

first-class

1st Class

OLP1

first-class-signed

Signed For 1st Class

OLP1SF

second-class

2nd Class

OLP2

tracked-24

Tracked 24

TOLP24

tracked-48

Tracked 48

TOLP48

special-delivery-750

Special Delivery by 1pm (£750)

SD1OLP

special-delivery-1000

Special Delivery by 1pm (£1,000)

SD2OLP

special-delivery-2500

Special Delivery by 1pm (£2,500)

SD3OLP

parcelforce-24

Parcelforce express24

PFE24

parcelforce-48

Parcelforce express48

PFE48

international-tracked

International Tracked

ITROLP

Además de otros 22, incluyendo variantes certificadas, servicios de verificación de edad y Parcelforce internacional. Ejecuta list_services para ver la lista completa.

Puedes pasar la clave amigable (first-class) o el código bruto del Registro de Servicios (OLP1). Ambos funcionan. Qué servicios puede usar tu cuenta depende de lo que esté habilitado en Click & Drop → Settings → Shipping services.

Limitaciones

Las etiquetas requieren una cuenta OBA

get_label solo funciona para clientes con una Online Business Account (OBA) de Royal Mail, la cuenta comercial facturada. Las cuentas estándar de pago por uso de Click & Drop recibirán 403 Forbidden (Feature not available) en get_label.

La reserva, el seguimiento y la cancelación funcionan en todos los tipos de cuenta. Si no tienes una OBA, aún puedes automatizar la creación de pedidos a través de este MCP y luego imprimir las etiquetas manualmente en la interfaz de usuario de Click & Drop.

Regístrate para OBA en auth.parcel.royalmail.com/register/oba.

Usuarios de OBA: habilitar auto-apply-postage

Si tienes una OBA, marca también "Apply postage automatically on orders imported via API" en Click & Drop → Settings. Sin esto, los pedidos permanecen como borradores y get_label devuelve "Label generation only available for orders with postage applied status".

Seguridad

Tu clave de API otorga acceso total a tu cuenta de Click & Drop. Trátala como una contraseña.

  • Nunca subas .env a git. El .gitignore en este repositorio ya lo excluye.

  • No pegues tu clave en mensajes de chat o documentos compartidos.

  • Rótala en Click & Drop → Settings → API credentials si alguna vez se expone.

Privacidad y manejo de datos

Este MCP se ejecuta completamente en tu máquina. Ningún dato de cliente, credenciales o tráfico de API fluye a través de ningún servidor propiedad del autor u operado por él.

La ruta de los datos es:

  • Los detalles de envío que le das a tu asistente de IA van a tu proveedor de IA (por ejemplo, Anthropic, si usas Claude) bajo tu cuenta.

  • Las solicitudes de reserva van a Royal Mail Click & Drop usando tu clave de API.

  • Las etiquetas se guardan en tu disco local en ~/Downloads/parcel-toolkit/ (se puede sobrescribir mediante la variable de entorno PARCEL_TOOLKIT_LABELS_DIR).

Si estás usando esto en una empresa del Reino Unido, eres el responsable del tratamiento de datos bajo el RGPD del Reino Unido. Recomendaciones prácticas:

  1. Usa Claude Team, Claude Enterprise o la API de Claude directamente (no la versión de consumo Claude.ai) para que exista un Acuerdo de Procesamiento de Datos con Anthropic. En los niveles de consumo, desactiva "Help improve Claude" en la configuración de Privacidad como mínimo.

  2. Incluye a Anthropic y Royal Mail como subprocesadores en tu política de privacidad, de la misma manera que incluirías a un proveedor de pagos o servicio de correo electrónico.

  3. Evita usar esta herramienta para datos de categorías especiales (salud, biométricos, datos de menores) sin una revisión legal adicional.

  4. Este software se proporciona tal cual bajo la licencia MIT. El autor no es un procesador de datos y no asume ninguna responsabilidad por tus obligaciones de cumplimiento; esas recaen sobre ti como responsable del tratamiento de datos.

Contribución

Los issues y pull requests son bienvenidos en github.com/catrinmdonnelly/royalmail-mcp. Si Royal Mail cambia su API, o encuentras un caso extremo en tu tipo de cuenta, por favor abre un issue con el cuerpo de la solicitud que enviaste y la respuesta que obtuviste (limpia tu clave de API primero).

MCP complementario

Para APC Overnight, consulta apc-mcp.

Descargo de responsabilidad

Este proyecto no está afiliado, respaldado ni patrocinado por Royal Mail Group Ltd. "Royal Mail", "Parcelforce" y "Click & Drop" son marcas comerciales de sus respectivos propietarios. Úsalo bajo tu propio riesgo.

Licencia

MIT. Ver LICENSE.

Available Tools

5 tools
book_orderA

Book a Royal Mail shipment via Click & Drop. Returns an orderIdentifier used to retrieve the label.

ParametersJSON Schema
NameRequiredDescriptionDefault
serviceYesRoyal Mail / Parcelforce service. Defaults to first-class (OLP1) if omitted. Raw Service Register codes (e.g. OLP1, TOLP24, PFE48) are also accepted.
packageFormatNoPackage format. Determines which services are available and pricingsmall-parcel
weightGramsYesTotal weight in grams (e.g. 500 for 500g)
recipientYesRecipient / delivery address
senderNoSender address. Omit to use the address saved in your Click & Drop account
referenceNoYour internal order or job reference
subtotalNoOrder subtotal in GBP (used for customs/insurance)
shippingCostNoShipping cost charged to recipient in GBP
totalNoOrder total in GBP
despatchDateNoPlanned despatch date YYYY-MM-DD. Omit if your account does not allow future-dated orders
requireSignatureNoRequest signature on delivery
safePlaceNoSafe place instructions e.g. "leave in porch"
notifyEmailNoEmail address for delivery notifications
notifyPhoneNoMobile number for SMS delivery notifications
dimensionsNoPackage dimensions in mm (optional)
goodsDescriptionNoBrief description of contents
specialInstructionsNoSpecial handling instructions

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description indicates the tool returns an orderIdentifier, which is useful. However, since no annotations are provided, the description carries full burden for behavioral disclosure. It does not mention mutability, side effects, prerequisites (e.g., account setup), or error conditions. It is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with 15 words, front-loading the key action and outcome. Every word serves a purpose. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (17 parameters, nested objects, no output schema), the description is concise but omits details like what happens on failure, pricing implications, or whether label retrieval is synchronous. However, the schema is well-documented, and the return value is stated. The description is nearly complete for the tool's core function.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, meaning all parameters include descriptions. The tool description itself does not repeat parameter details, but the schema already provides sufficient meaning. However, the description highlights the return value (orderIdentifier), which adds context beyond the schema. Given high schema coverage, baseline is 3, but the explicit mention of the return value and the tool's core action adds value, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to book a Royal Mail shipment via Click & Drop. It specifies the action (book), resource (shipment), and the system (Click & Drop), and mentions the return value (orderIdentifier). This distinguishes it from siblings like cancel_order, get_label, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus alternatives like cancel_order or list_services. It implies usage for booking shipments, but no exclusions or alternatives are mentioned. The context of sibling tools is present, but the description lacks explicit usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

cancel_orderA

Cancel a Royal Mail Click & Drop order. Must be done before the order is manifested/despatched.

ParametersJSON Schema
NameRequiredDescriptionDefault
orderIdentifierYesThe orderIdentifier to cancel

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry full behavioral disclosure. It indicates a destructive action ('Cancel') but does not clarify if the cancellation is reversible, what happens to associated labels, or whether special permissions are needed. The description adds minimal behavioral context beyond the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero waste. The first sentence states the core action, and the second provides a critical constraint. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (single param, no output schema, no annotations), the description is mostly adequate but lacks any mention of return values, error conditions, or side effects. It does not specify what happens on success or failure, which would help the agent handle responses.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single required parameter 'orderIdentifier', and the schema description is self-explanatory ('The orderIdentifier to cancel'). The description adds no additional parameter meaning, so a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Cancel', the resource 'Royal Mail Click & Drop order', and the critical precondition 'Must be done before the order is manifested/despatched', making the purpose unambiguous and distinct from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states a timing constraint ('before order is manifested/despatched') and implies this tool is for cancellation only. However, it does not mention what to do if the order is already manifested or suggest alternative tools like track_order for status checking.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_labelA

Get the shipping label for a Royal Mail Click & Drop order. Returns base64-encoded PDF label.

ParametersJSON Schema
NameRequiredDescriptionDefault
orderIdentifierYesThe orderIdentifier returned when booking the order

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the burden. It reveals that the output is base64-encoded PDF, which is helpful. However, it does not mention any side effects, authentication needs, or whether it is a read-only operation (likely read-only but not explicit).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loads the core purpose, and includes a key detail about the return format. No extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple retrieval tool with one parameter and no output schema, the description covers the essential purpose and output format. It could mention that the label is for printing or include a link to orderIdentifier documentation, but overall it is complete enough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the single parameter with high coverage (100%), and the description mentions it ('orderIdentifier returned when booking the order'). This adds context by linking the parameter to a previous step, which is useful but not transformative given schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get'), the resource ('shipping label'), and the context ('Royal Mail Click & Drop order'). It also specifies the return format ('base64-encoded PDF label'), which adds precision. This distinguishes it from siblings like book_order or cancel_order.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for retrieving a label after booking, but does not explicitly state when to use it versus alternatives. It mentions the input parameter ('orderIdentifier') but does not provide guidance on prerequisites or conditions for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_servicesA

List supported Royal Mail and Parcelforce services with their Service Register codes. Availability depends on your Click & Drop account.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses that the list may vary by account, which is a key behavioral trait (dynamic response based on account), and implies a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: first states purpose and output, second adds important caveat. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description is sufficient to understand what the tool does and its constraints. Could optionally mention return format (e.g., list of objects) but not essential.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has no parameters (0 params) and schema description coverage is 100%, so no additional param info needed. Description adds value by stating the output will include Service Register codes and account dependency.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it lists supported Royal Mail and Parcelforce services with Service Register codes, differentiating it from sibling tools like book_order or cancel_order by focusing on service listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions availability depends on Click & Drop account, implying account setup prerequisite, but no explicit when-to-use or comparison with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

track_orderA

Get the current status and tracking details for a Royal Mail Click & Drop order.

ParametersJSON Schema
NameRequiredDescriptionDefault
orderIdentifierYesThe orderIdentifier returned when booking the order

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool is read-only (Get) and focuses on status/tracking, which is appropriate. However, it does not disclose any behavioral traits like data freshness, rate limits, or potential errors. With no annotations, a 3 is reasonable but could be improved.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no waste. It front-loads the purpose and is appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one required parameter and no output schema, the description is largely complete. It explains the tool's purpose and expected input. Minor gap: it could mention that the output contains tracking details, but this is implied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a single parameter 'orderIdentifier' already described in schema. The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get'), clearly identifies the resource ('current status and tracking details'), and specifies the domain ('Royal Mail Click & Drop order'). It distinguishes the tool from siblings like book_order or cancel_order.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (after booking an order, to check status/tracking), but does not explicitly state when not to use it or mention alternatives. Since there is no sibling with similar purpose, no explicit exclusion is needed.

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.

  1. 5 tool updatesv0.1.0
    • First observedbook_order
    • First observedcancel_order
    • First observedget_label
    • First observedlist_services
    • First observedtrack_order

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct operation (booking, canceling, label retrieval, service listing, tracking) with no overlapping purposes. The descriptions clearly differentiate their roles.

Naming Consistency4/5

Tools follow a consistent verb_noun pattern (book_order, cancel_order, get_label, list_services, track_order). 'get_label' uses 'get' while others use verbs like 'book' and 'cancel', but the pattern is clear and predictable.

Tool Count5/5

With 5 tools covering the essential operations for Royal Mail shipments (create, cancel, label, tracking, service discovery), the count is well-scoped and appropriate for the server's purpose.

Completeness4/5

The set covers the core lifecycle of an order (create, cancel, label retrieval, tracking). Missing features like updating an order or manifesting are minor gaps that can be worked around, as most workflows are supported.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers