mcpField
P
PostEx MCP Server

PostEx MCP Server

Local
github.com/faizan45640Maps & Travel2Updated 80w ago

About PostEx MCP Server

PostEx MCP Server connects MCP clients to PostEx Merchant API v4.1.9 for merchants handling orders and parcel logistics. Its tools cover order creation, tracking, status checks, and merchant pickup addresses.

Key features

  1. 01Create and cancel orders
  2. 02Track one or multiple orders
  3. 03List orders by date and status
  4. 04Manage merchant pickup addresses
  5. 05Check payment and order status
  6. 06Retrieve shipper advice

Use cases

  1. 01Book a parcel for pickup
  2. 02Check a shipment's tracking progress
  3. 03Review orders within a date range
  4. 04Check payment settlement for an order

MCP support

The server exposes PostEx Merchant API endpoint operations as tools for MCP clients. It communicates over standard I/O and uses a merchant API token for API requests.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

PostEx MCP Server

This project implements a Model Context Protocol (MCP) server that provides tools for interacting with various endpoints of the PostEx Merchant API (v4.1.9).

Prerequisites

  • Node.js (LTS version recommended)
  • npm or yarn
  • A valid PostEx Merchant API Token

Setup

  1. Clone the repository (if applicable) or ensure you have the index.js file.
  2. Install dependencies:
    npm install @modelcontextprotocol/sdk zod node-fetch@2 # Use v2 for require syntax compatibility
    # or
    yarn add @modelcontextprotocol/sdk zod node-fetch@2
    
  3. Obtain your PostEx API Token from your PostEx merchant account or representative.

Running the Server

Execute the server using Node.js, providing your PostEx API token as a command-line argument:

node index.js <YOUR_POSTEX_API_TOKEN>

Replace <YOUR_POSTEX_API_TOKEN> with your actual token.

The server will connect via standard I/O and log status messages to standard error. It is now ready to receive MCP requests.

Available Tools

The server exposes the following tools, corresponding to PostEx API endpoints:

  • getOperationalCities: Get a list of cities where PostEx operates.
  • getMerchantAddress: Get the merchant's registered pickup addresses.
  • createMerchantAddress: Create a new pickup address for the merchant.
  • getOrderTypes: Get the types of orders supported (e.g., "Normal", "Reverse").
  • createOrder: Create a new order in the PostEx system.
  • getUnbookedOrders: List orders created but not yet booked for pickup within a date range.
  • trackOrder: Track a single order using its tracking number.
  • trackBulkOrder: Track multiple orders using a list of tracking numbers. (Note: API docs specify GET but require a body; implementation uses GET as per latest code change, which might not work as expected with a body).
  • saveShipperAdvice: Provide advice (e.g., retry, return) for an attempted parcel.
  • getShipperAdvice: Retrieve shipper advice history for a tracking number.
  • cancelOrder: Cancel an order using its tracking number. (Note: Implemented as PUT with a JSON body).
  • getPaymentStatus: Check the payment settlement status for an order.
  • getOrderStatus: Get a list of all possible order statuses.
  • listOrders: List orders within a date range, optionally filtered by status ID.

Note: Tools corresponding to API endpoints that return PDF files (generate-load-sheet, get-invoice) are not implemented in this version.

Development Notes

  • The server uses node-fetch for making HTTP requests to the PostEx API.
  • zod is used for input validation for the tool parameters.
  • The API token is passed securely as a command-line argument and used in the Authorization header for API calls.
  • Error handling is basic; check console output for potential issues during API calls.
  • Graceful shutdown is handled for SIGINT and SIGTERM signals.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.