@striderlabs/mcp-usps 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -0
- package/dist/index.js +18265 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# @striderlabs/mcp-usps
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for USPS package tracking, location finding, and shipping rate calculation using browser automation.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Track packages** — Get real-time status, location history, and estimated delivery for any USPS tracking number
|
|
8
|
+
- **Find locations** — Locate nearby USPS post offices and collection boxes by ZIP code
|
|
9
|
+
- **Calculate rates** — Get shipping rates for packages between ZIP codes
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @striderlabs/mcp-usps
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or use directly via npx:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx @striderlabs/mcp-usps
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Prerequisites
|
|
24
|
+
|
|
25
|
+
Playwright Chromium browser must be installed:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx playwright install chromium
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## MCP Configuration
|
|
32
|
+
|
|
33
|
+
Add to your Claude Desktop or MCP client config:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"usps": {
|
|
39
|
+
"command": "npx",
|
|
40
|
+
"args": ["@striderlabs/mcp-usps"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Tools
|
|
47
|
+
|
|
48
|
+
### `track_package`
|
|
49
|
+
|
|
50
|
+
Track a USPS package by tracking number.
|
|
51
|
+
|
|
52
|
+
**Parameters:**
|
|
53
|
+
- `tracking_number` (string, required) — USPS tracking number (e.g. `9400111899223397556826`)
|
|
54
|
+
|
|
55
|
+
**Example:**
|
|
56
|
+
```
|
|
57
|
+
Track package 9400111899223397556826
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### `find_locations`
|
|
63
|
+
|
|
64
|
+
Find USPS post offices and collection boxes near a ZIP code.
|
|
65
|
+
|
|
66
|
+
**Parameters:**
|
|
67
|
+
- `zip` (string, required) — 5-digit ZIP code
|
|
68
|
+
- `type` (string, optional) — `post_office` | `collection_box` | `all` (default: `all`)
|
|
69
|
+
|
|
70
|
+
**Example:**
|
|
71
|
+
```
|
|
72
|
+
Find post offices near 10001
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### `calculate_rates`
|
|
78
|
+
|
|
79
|
+
Calculate shipping rates between two ZIP codes.
|
|
80
|
+
|
|
81
|
+
**Parameters:**
|
|
82
|
+
- `from_zip` (string, required) — Origin 5-digit ZIP code
|
|
83
|
+
- `to_zip` (string, required) — Destination 5-digit ZIP code
|
|
84
|
+
- `weight_oz` (number, required) — Package weight in ounces
|
|
85
|
+
- `length_in` (number, optional) — Length in inches
|
|
86
|
+
- `width_in` (number, optional) — Width in inches
|
|
87
|
+
- `height_in` (number, optional) — Height in inches
|
|
88
|
+
- `mail_class` (string, optional) — Service type: `priority_mail` | `priority_mail_express` | `first_class` | `ground_advantage` | `media_mail` (default: `priority_mail`)
|
|
89
|
+
|
|
90
|
+
**Example:**
|
|
91
|
+
```
|
|
92
|
+
Calculate shipping rates from 10001 to 90210 for a 16oz package
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## How It Works
|
|
96
|
+
|
|
97
|
+
This server uses [Playwright](https://playwright.dev/) to automate Chromium and scrape data directly from USPS.com tools:
|
|
98
|
+
|
|
99
|
+
- Tracking: `https://tools.usps.com/go/TrackConfirmAction`
|
|
100
|
+
- Locations: `https://tools.usps.com/find-location.htm`
|
|
101
|
+
- Rates: `https://postcalc.usps.com/`
|
|
102
|
+
|
|
103
|
+
No USPS API key required.
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT
|