Skip to content

AI agents (MCP)

Contents 14 pages

Connect your own AI assistant to ShipEasy. It can rate freight, find your shipments and follow them, read their documents, and, when you allow it to, book, cancel and keep your address book. It follows the same rules as the REST API.

ShipEasy speaks the Model Context Protocol at one URL:

https://app.shipeasyco.com/mcp

Every organization can use it, unless ShipEasy has switched its API access off. Whether an assistant may also book, cancel or edit is yours to decide, connection by connection and key by key, and only an owner or admin can allow it. ShipEasy can switch the tools that book, cancel or edit off for everyone during an incident.

Connect#

Add ShipEasy to your AI app#

AI apps sign in to ShipEasy instead of taking a key, so there is nothing to copy but the address. The same steps, one tab per app, are under AI apps & API in /portal/settings.

Claude (on the web, desktop and phone):

  1. In Claude, open Customize → Connectors, press + Add and choose Add custom connector.
  2. Name it ShipEasy, paste https://app.shipeasyco.com/mcp as its URL and continue.
  3. Press Connect. Claude sends you to ShipEasy: sign in as an owner or admin, and choose what it may do. Allow takes you back to Claude.

ChatGPT:

  1. Open Plugins, press Add and choose Add custom MCP server.
  2. Name it ShipEasy, paste the address as the server URL and leave authentication on OAuth.
  3. Tick I understand and want to continue, create it, then sign in to ShipEasy and choose what ChatGPT may do.

Cursor and VS Code: press Add to Cursor or Add to VS Code in the settings tab, or add the server by hand: in Cursor, a server named shipeasy whose url is the address; in VS Code, MCP: Add Server from the Command Palette, then HTTP and the address. Each asks you to sign in to ShipEasy the first time it connects.

Any other app that can add a remote MCP server (some call it a custom connector or custom app) works the same way: give it the address, and it sends you to ShipEasy to sign in.

On the ShipEasy page:

  • It names the organization. If you are an owner or admin of more than one, choose which.
  • Choose what the app may do: Quote and track (the default), Quote, track and book, or Quote, track, book and manage. The last two are hidden only while ShipEasy has the tools that book and edit switched off.
  • It names the address the app will send you back to, and warns when it is not one ShipEasy knows.
  • Unless you signed in within the last few minutes, confirm it's you: type your password, or sign in again with Google or a passkey, which brings you back to the same page with the organization and choice you picked still selected, and then press Allow. If Google takes more than 10 minutes, you come back to the same page too, told to try again, with your choice kept, and the AI app is still waiting.
  • If it can't connect, it says why: a member is told which owner to ask, and an organization ShipEasy switched off is named. Without two-factor sign-in it offers Set up two-factor, which comes back to the page when done.

Claude Code#

Shell
claude mcp add --transport http shipeasy https://app.shipeasyco.com/mcp

Then type /mcp in a Claude Code session and choose ShipEasy to sign in, the same way as above. No key is needed.

With an API key#

Any other MCP client, a script, or the Claude API connects with an API key from /portal/api-keys. The agent sees only the tools that key's scopes reach, so give it what it needs and no more. For an assistant that quotes and tracks, press For an AI agent (MCP) above the scopes when you create the key (it shows while MCP is on), or tick:

  • account:read
  • quotes:read and quotes:write
  • shipments:read
  • addresses:read

To let it book, press For an AI agent that books instead, or also tick bookings:write, bookings:read and payments:read. Only an owner or admin can, and the key's booking limits apply (see Booking). Add shipments:write for cancelling and refreshing tracking, and addresses:write for editing saved addresses.

Any MCP client. Use the Streamable HTTP transport, and send the key as Authorization: Bearer se_live_… on every request. The server keeps no session: each POST carries one JSON-RPC message and gets one JSON answer. In Claude Code, add --header "Authorization: Bearer se_live_…" to the command above.

The Claude API's MCP connector. Pass the same URL, with the key as the server's authorization_token.

The connection#

The app then holds a connection, not a key you can see. Its access token lasts an hour and the app renews it by itself; a connection not renewed for 90 days ends. The token works only at /mcp, and the REST API refuses it. Every renewal checks that the person who connected it is still an owner or admin and that the organization's API access is on.

The connection is listed on /portal/api-keys under Connected AI apps, with who connected it and what it may do. Disconnect ends it at once, and so does removing the connector in the app.

A connection belongs to the person who allowed it as well as to the organization, so it also ends at once whenever every one of that person's sessions does: when they Sign out everywhere, change or reset their password, change their sign-in email, lock password checks with wrong guesses, or delete their account, and when ShipEasy disables or deletes the account, resets its two-factor or sets it a temporary password. Each one is disconnected the way Disconnect does it, in every organization the person connected it to. When the person leaves an organization, or is removed from it, only the connections to that organization end. A renewal also refuses any connection allowed before the person's latest such cutoff. The organization's ordinary API keys are not touched. Connect the app again afterwards.

For client authors: the server publishes /.well-known/oauth-protected-resource (RFC 9728), also at its path-suffixed address /.well-known/oauth-protected-resource/mcp, and /.well-known/oauth-authorization-server (RFC 8414). It offers dynamic client registration (RFC 7591), the authorization code flow with PKCE S256 only, refresh tokens that rotate on every use, and revocation (RFC 7009).

  • Registering. Up to 10 redirect URIs, each https, http to localhost, 127.0.0.1 or [::1], or Cursor's own cursor://anysphere.cursor-mcp link, with no fragment. One address may register 20 clients an hour. A client nothing has used for 30 days, and that holds no live connection, is deleted; register again when /oauth/authorize says the connector isn't registered.
  • Authorizing. A code must be traded within 5 minutes. A request with a problem in it (another response_type, no PKCE, another resource) goes back to the client as ?error=, with its state and iss (RFC 9207), only when it returns to Cursor's own link or the redirect's host is one ShipEasy knows: claude.ai, claude.com, chatgpt.com, chat.openai.com, vscode.dev, localhost, 127.0.0.1 or [::1]. For any other host the person sees the problem and is sent nowhere, so a registered client cannot use ShipEasy to send people to another site. An unknown client, or a redirect it never registered, is always shown and never followed.
  • Refreshing. A refresh token used after it was rotated ends the connection, except the one replaced in the last 60 seconds: that request is refused with invalid_grant and the connection stays, so two refreshes sent close together cost you nothing. A connection whose person has signed out everywhere (or had every session ended another way) since allowing it is refused with invalid_grant and ended; send the person through /oauth/authorize again.
  • Calling. The resource is https://app.shipeasyco.com/mcp, and a trailing slash is ignored there and on the URL you call: /mcp/ is /mcp. A /mcp request with no token gets a 401 whose WWW-Authenticate names the first document as resource_metadata.

Tools#

Each tool is one REST endpoint. Its arguments and its answer are that endpoint's own: query parameters and the request body become arguments, path parameters become snake_case arguments (shipment_id), and the Idempotency-Key header becomes an idempotency_key argument.

Tool Endpoint Scope
get_account GET /api/v1/account account:read
quote_freight POST /api/v1/quotes quotes:write
quote_freight_bulk POST /api/v1/quotes/bulk quotes:write
list_quotes GET /api/v1/quotes quotes:read
get_quote GET /api/v1/quotes/{quoteId} quotes:read
book_quote POST /api/v1/bookings bookings:write
get_booking GET /api/v1/bookings/{chargeId} bookings:read
list_payment_methods GET /api/v1/payment_methods payments:read
list_shipments GET /api/v1/shipments shipments:read
get_shipment GET /api/v1/shipments/{shipmentId} shipments:read
list_shipment_events GET /api/v1/shipments/{shipmentId}/events shipments:read
list_events GET /api/v1/events shipments:read
get_shipment_bol GET /api/v1/shipments/{shipmentId}/bol shipments:read
get_shipment_pod GET /api/v1/shipments/{shipmentId}/pod shipments:read
get_shipment_label GET /api/v1/shipments/{shipmentId}/label shipments:read
refresh_shipment_status POST /api/v1/shipments/{shipmentId}/refresh-status shipments:write
request_cancellation POST /api/v1/shipments/{shipmentId}/cancel shipments:write
track_shipment GET /api/v1/tracking/{pro} shipments:read
list_origins GET /api/v1/origins addresses:read
get_origin GET /api/v1/origins/{originId} addresses:read
save_origin POST /api/v1/origins addresses:write
replace_origin PATCH /api/v1/origins/{originId} addresses:write
delete_origin DELETE /api/v1/origins/{originId} addresses:write
list_destinations GET /api/v1/destinations addresses:read
get_destination GET /api/v1/destinations/{destinationId} addresses:read
save_destination POST /api/v1/destinations addresses:write
replace_destination PATCH /api/v1/destinations/{destinationId} addresses:write
archive_destination DELETE /api/v1/destinations/{destinationId} addresses:write

GET /api/v1/ping and GET /api/v1/openapi.json have no tool: connecting already proves the key, and each tool carries its own schema.

Every tool says whether it only reads. book_quote, request_cancellation and the replace, delete and archive tools are marked destructive, so a client that honours the marking asks the person before it runs them.

A few answers add a field the REST endpoint doesn't have:

  • quote_freight and quote_freight_bulk. Each rate gains book_url, the web app page where a person books that exact rate. Pass include_all_carriers: true to get every carrier's rate for each service, not only the cheapest; each one has its own book_url.
  • get_shipment. It gains links: the shipment's web app page, plus the BOL and POD downloads (/api/v1/shipments/{id}/bol and /pod, which take the same key) once they exist. A connection made by signing in cannot fetch those downloads; it reads the documents with get_shipment_bol and get_shipment_pod.
  • get_shipment_bol and get_shipment_pod. They answer with the PDF itself, as an embedded resource, so the assistant can read it. A document over 5 MB is refused; download it from the web app instead.

Booking#

book_quote is POST /api/v1/bookings, with every rule that endpoint has:

  • It takes that endpoint's own body: a rate's quote_id, the pickup and delivery contacts and addresses (origin, destination), a pickup_date, and an idempotency_key. Booking has every field.
  • An invoiced organization books on account. Otherwise it names a card from list_payment_methods that is enabled for API bookings.
  • The key's booking limits apply: its largest booking amount and its bookings per day.
  • When the card's bank wants the cardholder to approve the charge, the answer says requires_authentication and carries an authenticate_url. The assistant should give that link to the person, then poll get_booking. The link is handed out once.

Idempotency#

quote_freight_bulk, book_quote and request_cancellation require an idempotency_key; every other write accepts one. Send a fresh UUID for each new intent, and the same one to retry it. A retry answers with the first outcome instead of doing the work twice, exactly as Idempotency describes for the header. The key is shared with the REST API: the same key on the same endpoint is the same request on either.

Limits, quotas and refusals#

Everything in Rate limits & quotas applies.

  • Each POST to /mcp counts as one request.
  • Each quote_freight that returns rates counts as one quote against your organization's daily budget, which it shares with the web app and the REST API. quote_freight_bulk counts one per lane that rated.

A refusal is a tool result with isError: true. Its text is the REST API's own error envelope, with the same code and request_id, so you handle it the way you would the REST call. A tool that books, cancels or edits answers api_unavailable while ShipEasy has those tools switched off. A missing or bad key is refused before any tool runs, with the same 401 the REST API sends.

Some other refusals also come before any tool:

  • With MCP switched off, /mcp answers 503 api_unavailable.
  • A body that is not sent as application/json, is not JSON, is over 1 MiB, or is a JSON-RPC batch gets a JSON-RPC error: HTTP 415 for the content type, 413 for the size, 400 otherwise.
  • An unknown tool name is a JSON-RPC InvalidParams error.