Skip to main content
Glama

royalmail-mcp

npm version licence node CI

Claude、Cursor、WindsurfなどのMCP互換AIから、Royal MailおよびParcelforceの配送予約、ラベル発行、追跡、キャンセルを行います。

ライブのClick & Drop API(2026年4月版)で検証済みです。予約、追跡、キャンセルはエンドツーエンドでテスト済みです。ラベル取得はOBAアカウントの仕様に基づいて検証されています。

機能

MCPに対応したあらゆるAIに対して、6つのツールを提供します:

ツール

機能

book_order

Click & Dropで注文を作成します。orderIdentifierを返します。

book_batch_and_label

複数の注文を一度に予約し、すべてのラベルを結合したPDFを取得して印刷可能な状態にします。

get_label

配送ラベルをPDFとしてディスクに保存します。OBAアカウントが必要です(下記参照)。

track_order

現在のステータス、追跡番号、発送日を取得します。

cancel_order

マニフェスト作成前に注文をキャンセルします。料金は発生しません。

list_services

このMCPがサポートするすべてのRoyal MailおよびParcelforceサービスをコード付きで一覧表示します。

内部的には、Click & Drop APIキーを使用して https://api.parcel.royalmail.com/api/v1 と通信します。

Related MCP server: UK Property Intelligence

プロンプト例

AIクライアントにMCPをインストールすると、以下のような指示が可能になります:

「Alex Taylor(住所:45 High Street, Manchester M1 1AA、重量:80g)宛てに1st Classの郵便物を予約して。参照番号はORDER-1842にして。」

「これら3つの注文をTracked 48で発送して、orderIdentifierを教えて。」 (住所リストを貼り付け)

「Special Delivery by 1pm(補償額£1,000)でこの住所に予約して、ラベルを取得して。」

「注文1004をキャンセルして。顧客が郵便番号を間違えたため。」

「500gの小包に最適な、署名が必要な最安のサービスは何?」 (AIが list_services を呼び出して判断)

「注文1002、1003、1004を追跡して、それぞれの状況を要約して。」

「ここに10件の注文がある。すべてRoyal Mail Tracked 24で予約して、印刷用のPDFを1つ作成して。」 (AIが book_batch_and_label を呼び出し、結合されたPDFのパスを返す)

AIが住所の解析、サービスの選択、エラー復旧を処理します。ビジネス上の判断はユーザーが行います。

ビジネス向けのワークフロー案

AIエージェントに組み込むことで、実際の配送業務を自動化できます:

  • 日々の注文処理: 毎朝、AIがShopify、WooCommerce、またはスプレッドシートから新しい注文を読み取り、適切なサービスレベルでRoyal Mailを通じて予約し、追跡番号を顧客に返信します。

  • カスタマーサービスのトリアージ: 顧客から「荷物はどこ?」というメールが届くと、AIが track_order を呼び出し、最新の状況を平易な英語で要約して返信案を作成します。

  • 返品対応: 顧客が返品をリクエストすると、AIがリクエストを読み取り、適切な返品サービスを予約し、印刷可能なラベルを直接メールで送信します。スタッフの手間はかかりません。

  • 複数配送業者による選択: apc-mcp と併用することで、AIが予約時にRoyal MailとAPCを比較し、目的地ごとに最も安く、または最も速いオプションを選択します。

  • 大量発送日: セールイベントやサブスクリプションボックスの発送時に、数百件の注文のCSVをAIに渡します。AIが適切なサービスと補償レベルで一括予約し、要約を提示します。

  • チェックアウト時の見積もり: 顧客がチェックアウト時に送料を尋ねると、AIが重量と郵便番号に基づいて適切なサービスを選択し、料金を計算して数秒以内に回答します。

互換性

stdioトランスポートをサポートするすべてのMCPクライアントで動作します:

  • Claude Desktop

  • Cursor

  • Windsurf

  • Claude Code

  • Zed

ChatGPT、Smitheryなどのリモート専用MCPクライアントにはHTTPトランスポートが必要ですが、現時点では含まれていません。必要であればIssueを作成してください。優先的に対応します。

インストール

npm install -g royalmail-mcp

またはインストールせずに実行:

npx royalmail-mcp

設定

Click & Drop → Settings → API credentials からAPIキーを取得し、以下を設定します:

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

サーバーの隣にある .env ファイル、またはMCPクライアントの設定(下記参照)で行います。

Claude Desktop

~/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

~/.cursor/mcp.json に追加:

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

サポートされているサービス

キー

Royal Mailサービス

コード

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

その他、署名付きバリエーション、年齢確認サービス、Parcelforce国際便など22種類以上に対応しています。全リストは list_services を実行してください。

フレンドリーキー(first-class)または生のサービスレジスターコード(OLP1)のどちらでも指定可能です。どちらも機能します。アカウントで使用可能なサービスは、Click & Dropの「Settings → Shipping services」で有効になっているものに依存します。

制限事項

ラベル発行にはOBAアカウントが必要

get_label は、Royal Mailの Online Business Account (OBA)(請求書払いビジネスアカウント)を持つ顧客のみ利用可能です。標準の都度払い(Pay-as-you-go)Click & Dropアカウントでは、get_label で 403 Forbidden (Feature not available) が返されます。

予約、追跡、キャンセルはすべてのアカウントタイプで動作します。OBAをお持ちでない場合でも、このMCPを通じて注文作成を自動化し、Click & DropのUIで手動でラベルを印刷することは可能です。

OBAへの登録は auth.parcel.royalmail.com/register/oba から行ってください。

OBAユーザー:自動送料適用を有効にする

OBAをご利用の場合は、Click & Dropの「Settings」で 「Apply postage automatically on orders imported via API」 にチェックを入れてください。これがないと注文はドラフトのままとなり、get_label は "Label generation only available for orders with postage applied status" を返します。

セキュリティ

APIキーはClick & Dropアカウントへのフルアクセス権限を持ちます。パスワードと同様に扱ってください。

  • .env をgitにコミットしないでください。このリポジトリの .gitignore では既に除外されています。

  • チャットメッセージや共有ドキュメントにキーを貼り付けないでください。

  • 万が一漏洩した場合は、Click & Dropの「Settings → API credentials」からキーを再生成してください。

プライバシーとデータ処理

このMCPは完全にローカルマシン上で動作します。顧客データ、認証情報、APIトラフィックは、作者が所有または運営するサーバーを経由しません。

データパスは以下の通りです:

  • AIアシスタントに提供する配送詳細は、ユーザーのアカウント下でAIプロバイダー(Claudeを使用している場合はAnthropicなど)に送信されます。

  • 予約リクエストは、APIキーを使用してRoyal Mail Click & Dropに送信されます。

  • ラベルはローカルディスクの ~/Downloads/parcel-toolkit/ に保存されます(環境変数 PARCEL_TOOLKIT_LABELS_DIR で変更可能)。

英国のビジネスでこれを使用する場合、ユーザーは英国GDPRに基づくデータ管理者となります。実務上の推奨事項:

  1. コンシューマー向けのClaude.aiではなく、Claude Team、Claude Enterprise、またはClaude APIを直接使用し、Anthropicとのデータ処理契約(DPA)が締結されている状態にしてください。コンシューマー向けプランの場合は、少なくともプライバシー設定で「Help improve Claude」をオフにしてください。

  2. プライバシーポリシーにおいて、決済プロバイダーやメールサービスと同様に、AnthropicとRoyal Mailをサブプロセッサーとして記載してください。

  3. 法的レビューなしに、特別なカテゴリのデータ(健康、生体認証、子供のデータ)にこのツールを使用することは避けてください。

  4. 本ソフトウェアはMITライセンスの下で現状のまま提供されます。作者はデータ処理者ではなく、ユーザーのコンプライアンス義務について一切の責任を負いません。これらはデータ管理者であるユーザーの責任となります。

貢献

Issueやプルリクエストは github.com/catrinmdonnelly/royalmail-mcp で歓迎します。Royal MailがAPIを変更した場合や、アカウントタイプ特有のエッジケースに遭遇した場合は、送信したリクエストボディと受信したレスポンス(APIキーは削除してください)を添えてIssueを作成してください。

関連MCP

APC Overnightについては apc-mcp を参照してください。

免責事項

本プロジェクトはRoyal Mail Group Ltd.と提携、推奨、後援されていません。「Royal Mail」、「Parcelforce」、「Click & Drop」は各所有者の商標です。自己責任で使用してください。

ライセンス

MIT。 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