ShiprocketAPI

Shiprocket MCP

The Model Context Protocol (MCP) is an open standard that lets an AI client call tools exposed by a local or remote server. There are two ways to work with your Shiprocket account from an AI assistant:

  • Shiprocket connector for Claude: nothing to install. Connect it in Claude and sign in with your Shiprocket seller account. Start here if you want to manage your shipping from a conversation.
  • Shiprocket MCP Server: an open-source server you run on your own machine and sign in to with an API user. Use it with Claude Desktop, Cursor, Claude Code or another MCP client.

Use Shiprocket in Claude

The Shiprocket connector is published in Claude's Connectors Directory. Once it is connected, you can ask Claude to check rates, create and ship orders, schedule pickups, track shipments and start returns or exchanges on your Shiprocket account.

Connect the connector

  1. Open claude.ai/directory/connectors/shiprocket, or search for "Shiprocket" in Claude's connector directory.
  2. Select Connect, review what Claude will be allowed to do, and select Allow.
  3. Log in with your Shiprocket seller account.

You need a Shiprocket seller account. The connector signs in with that account itself, so you do not need to create an API user for it. (The API and the self-hosted MCP server below sign in with an API user instead.)

What you can do

The connector gives Claude 12 tools across four flows. The last column tells you whether a call changes anything on your live Shiprocket account.

Orders

ToolWhat it doesChanges live data
order_listLists your orders, optionally filtered by the customer's phone number or by status: NEW, READY_TO_SHIP, IN_TRANSIT, DELIVERED, CANCELLED or RTO.No
order_detailReturns the full details of one order, looked up by AWB, channel order ID or Shiprocket order ID.No
create_orderCreates a custom order from a pickup location, the customer's name, email, phone and delivery address, package dimensions and weight, COD or prepaid, and a list of items.Yes
cancel_orderCancels an order by Shiprocket order ID, and optionally cancels it on the sales channel it came from.Yes

Shipping

ToolWhat it doesChanges live data
shipping_rate_calculatorLists the couriers that serve a route, with their prices and estimated delivery dates, for a pickup pincode, a delivery pincode, a weight in kg, and COD or prepaid.No
list_pickup_addressesLists the pickup addresses configured on your account.No
ship_orderShips an order by assigning a courier to it. Takes an order ID, channel order ID or shipment ID, and optionally a courier ID.Yes
generate_shipment_labelGenerates the shipping label PDF for a shipment. Takes a shipment ID, not an order ID; order_detail shows the shipment ID.No (records that a label was generated)
schedule_pickupSchedules a pickup for an order's shipment on a given date.Yes

Tracking

ToolWhat it doesChanges live data
order_trackTracks a shipment by AWB number or channel order ID.No

Returns & exchanges

ToolWhat it doesChanges live data
return_orderStarts a return for a delivered order, with the reason for the return.Yes
order_exchangePlaces an exchange order for a delivered order, with the reason for the exchange.Yes

Example prompts for Claude

  • "Show my orders that are ready to ship."
  • "What are the shipping rates from 110001 to 400001 for a 1 kg COD parcel?"
  • "Ship order <order id> with the cheapest courier, then schedule the pickup for tomorrow."
  • "Where is the shipment with AWB <awb number>?"
  • "Start a return for order <order id>: the customer received the wrong size."

The pincodes in the second prompt are examples; use your own.

Before you approve an action

Tools marked Yes above act on your live Shiprocket account as soon as they run: a created order, an assigned courier, a scheduled pickup, a cancellation, a return or an exchange is real. Read what Claude is about to do before you approve the call. To stop Claude from reaching your account, remove the Shiprocket connector in Claude's connector settings.

Shiprocket MCP Server

The Shiprocket MCP server is a small Node.js program that runs on your machine, logs in to your Shiprocket account with an API user, and exposes ten tools so your AI client can quote rates, track shipments, list orders, create orders, assign couriers, schedule pickups, cancel orders and generate labels on that account. The source is at github.com/bfrs/shiprocket-mcp.

What you need

  • Node.js 20 to 22 (the project asks for a version above 20.0.0 and below 23.0.0) and npm.
  • git, to clone the repository.
  • An MCP client. This guide covers Claude Desktop, Cursor and Claude Code; any client that supports local stdio servers works the same way.
  • A Shiprocket API user. Create one in the Shiprocket panel under Settings → API → Add New API User. The server signs in through the same POST /v1/external/auth/login call that every API integration uses, and that endpoint does not accept your dashboard (panel) login. If you have not created an API user yet, see Getting Started and Authentication.

Get Started

1. Clone and build the server

bash
git clone https://github.com/bfrs/shiprocket-mcp.git
cd shiprocket-mcp
npm install
npm run build

npm run build compiles the TypeScript source into a dist/ folder. The client starts the server with npm start from this folder, so keep the folder where it is and note its absolute path; the client configuration below refers to it as /path/to/shiprocket-mcp.

The repository has no tagged releases yet, so you are running the current main branch. Review the code before you run it with your credentials, and check it again whenever you update.

2. Register the server with your client

The server reads two environment variables, SELLER_EMAIL and SELLER_PASSWORD. Set them to the API user's email and password (not your panel login). If either is missing the server exits at start with the message Seller email and password is required in ENV.

Claude Desktop

Add the following to claude_desktop_config.json, creating the file if it does not exist:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "shiprocket": {
      "command": "npm",
      "args": ["--prefix", "/path/to/shiprocket-mcp", "start", "--silent"],
      "env": {
        "SELLER_EMAIL": "<API user email>",
        "SELLER_PASSWORD": "<API user password>"
      }
    }
  }
}

Cursor

Add the same block to ~/.cursor/mcp.json.

Claude Code

Run this from a terminal, replacing the path and credentials:

bash
claude mcp add shiprocket \
  -e SELLER_EMAIL=<API user email> \
  -e SELLER_PASSWORD=<API user password> \
  -- npm --prefix /path/to/shiprocket-mcp start --silent

The key you choose (shiprocket above) is the name the client shows for the integration.

This command puts the password in your shell history. Start the command with a space (most shells then leave it out of history), or delete the entry afterwards.

3. Restart and check

Quit and reopen the client (for Claude Code, start a new session). Open the client's tools or integrations list and confirm the ten tools in the next section are present. If they are not, see Troubleshooting.

Tools

The server exposes these ten tools. The last column tells you whether a call changes anything on your live Shiprocket account.

ToolWhat it doesChanges live dataAPI operation
shipping_rate_calculatorReturns courier options with freight charge, estimated delivery time and RTO charge between a pickup pincode and a delivery pincode for a given weight in kg, COD or prepaid. Pincodes only, not city or state names.NoSimilar to Check Courier Serviceability
estimated_deliveryReturns the estimated delivery time to a delivery pincode, measured from the first pickup address on your account, assuming a 0.5 kg prepaid parcel; reports the first courier's estimate.NoSimilar to Check Courier Serviceability
order_trackReturns tracking for one AWB number. It does not accept a Shiprocket order ID or a channel order ID.NoGet Tracking through AWB, under Tracking
order_listLists orders on your account, optionally filtered by status: NEW, READY_TO_SHIP, IN_TRANSIT, DELIVERED, RTO or CANCELLED.NoGet all Orders
list_pickup_addressesLists up to ten pickup addresses configured on your account.NoGet All Pickup Locations
generate_shipment_labelGenerates the shipping label for a shipment ID and returns the PDF's file URL. Takes a shipment ID, not an order ID.No (records that a label was generated)Generate Label
order_createCreates a custom order from a pickup location name, customer name, email and phone, delivery address, package dimensions and weight, COD or prepaid, and a list of items. The server generates the order ID itself (prefixed MCP-) and dates the order today.YesCreate Custom Order
order_shipAssigns a courier and generates the AWB for an order. Takes an order ID (Shiprocket order ID, channel order ID or shipment ID) and optionally a numeric courier ID; without one, Shiprocket's default courier rules apply.YesGenerate AWB for Shipment
order_schedule_pickupRequests a pickup for an order on a given date (YYYY-MM-DD). There is no time-slot input.YesRequest for Shipment Pickup
order_cancelCancels an order by Shiprocket order ID. By default it also cancels the order on the sales channel it came from.YesCancel an Order

Example prompts

Once the server is connected, the client decides which tool to call from your wording. Prompts like these map cleanly to the tools above:

  • "What are the shipping rates from 110001 to 400001 for a 1 kg COD parcel?"
  • "Track the shipment with AWB <awb number>."
  • "Show my ten most recent orders that are ready to ship."
  • "Which pickup addresses are configured on my account?"
  • "Create a prepaid order from my <pickup location name> address for <customer name, phone, email and delivery address>, one <item> at <price>, package 20 x 15 x 10 cm and 0.5 kg, then assign a courier to it."
  • "Schedule a pickup for order <order id> on <date> and generate the label for its shipment."

The pincodes in the first prompt are examples; use your own.

Safety

  • order_create, order_ship, order_schedule_pickup and order_cancel act on your live account immediately. The server has no confirmation or dry-run step of its own. It marks these four tools as destructive so that the client can ask before calling them; keep your client's per-tool approval switched on and read each proposed call before approving it.
  • The API user's email and password sit in plain text in the client's configuration file (or, for Claude Code, in its saved settings). Do not commit that file, share it or paste it into a chat. Use an API user created for this purpose so you can delete it from Settings → API and create a new one if the file is ever exposed.
  • The login token the server obtains is held in the server process's memory only. It is not written to disk, and it is discarded when the client stops the server.

Troubleshooting

A tool answers "401", "unauthorised" or "Your Shiprocket session has expired"

Check that SELLER_EMAIL and SELLER_PASSWORD are the API user's credentials and not your panel login, and that the API user still exists under Settings → API. Then quit and reopen the client. The server logs in once at start and does not log in again by itself, so an expired or rejected token stays rejected until the client restarts it. If the message tells you to reconnect through a Settings → Integrations menu, ignore that part: it applies to hosted setups, and restarting the client is the fix here.

The tools are not listed in the client

  • Run npm run build again in the shiprocket-mcp folder; npm start needs the compiled dist/ folder.
  • Check that the path after --prefix is the absolute path to the folder that contains package.json.
  • Check that both environment variables are set in the configuration; the server exits immediately if either is missing.
  • Restart the client after every change to the configuration.

Node.js version errors

If npm install or npm run build fails with a syntax or engine error, run node --version and confirm it is 20.x, 21.x or 22.x. Install a supported version and run npm install and npm run build again.


The server's source code and issue tracker are on GitHub at github.com/bfrs/shiprocket-mcp.