Register for a USPS Web Tools account and then migrate to the new APIs v3 platform at developers.usps.com to obtain a client_id and client_secret
POST to /oauth2/v3/token with grant_type=client_credentials and Content-Type application/x-www-form-urlencoded to receive an access_token
Replace the legacy UserId query-parameter auth pattern in all API calls with an Authorization: Bearer <token> header
Update endpoint base URLs from production.shippingapis.com to api.usps.com and map old XML API resource names to the new REST paths
Test all migrated endpoints in the USPS sandbox; specifically verify address standardization, domestic price calculations, and label purchase still return expected results
Set up automated token refresh: the access_token expires; request a new one using the same client_credentials grant before expiry
Known gotchas
The legacy XML-based USPS Web Tools API has a published sunset date; delaying migration risks service interruption for label purchase and tracking workflows
USPS Ground Advantage replaced First Class Package and Retail Ground; update service type identifiers in rate shopping and label purchase calls accordingly
The new APIs require a separate set of credentials from legacy Web Tools; you cannot reuse the old UserId in the new OAuth flow
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp