TrackMage MCP Server - Shipment Tracking API & Logistics API Integration
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server for shipment tracking api, package monitoring, and logistics management using the TrackMage API. Supports tracking across 1600+ carriers worldwide.
Features
- **Carrier Support**: Track packages across 1600+ carriers worldwide (full list)
- **Resources**: Workspaces, shipments, orders, carriers, tracking statuses
- **Tools**: Create shipments/orders, get shipment checkpoints, carrier detection
- **Authentication**: OAuth with client credentials
⚠️ Data Privacy Notice
**Data sharing with your LLM provider**: This MCP server provides data to whichever LLM you're using (Claude, ChatGPT, etc.). While this is the expected behavior for MCP servers, please ensure you're comfortable sharing logistics data including tracking numbers, customer emails, addresses, and shipment details with your chosen LLM provider.
**Best practices:**
- Only use with non-sensitive or test data if you have privacy concerns
- Check your LLM provider's data handling policies
- Consider opting out of training data programs if available
- Ensure compliance with your organization's data policies
Prerequisites
- Node.js v18+
- TrackMage account
Getting Credentials
1. Register and log into TrackMage.
2. Go to **Settings > API KEYS**.
3. Enter an **App Name** (e.g., "MCP") and **App URL** (e.g., http://localhost:3000).
4. Click **Generate** and copy your **Client ID** and **Client Secret**.
5. Note your **Workspace ID** from the dashboard URL.
Installation
Option 1: Local Setup
Configuration
Edit .env:
Usage
Run the server:
and then use
or using file process:
MCP Resources
- trackmage:///workspaces/{id}
- trackmage:///shipments/{id}
- trackmage:///orders/{id}
- trackmage:///carriers/{id}
- trackmage:///tracking_statuses/{id}
MCP Tools
Shipment Management
- **create_shipment**: Create a new shipment
- Parameters: { trackingNumber, originCarrier?, email?, workspaceId? }
- Returns: Created shipment object
- **update_shipment**: Update an existing shipment
- Parameters: { shipmentId, trackingNumber?, originCarrier?, email?, status? }
- Returns: Updated shipment object
- **list_shipments**: List shipments from workspace
- Parameters: { workspaceId?, page?, itemsPerPage? }
- Returns: Array of shipment objects
- **get_shipment_checkpoints**: Get tracking checkpoints for a shipment
- Parameters: { shipmentId }
- Returns: Array of tracking checkpoint events
- **retrack_shipments**: Retrack multiple shipments by tracking numbers
- Parameters: { trackingNumbers: [{ number, originCarrier? }], workspaceId? }
- Returns: Retracking results