Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

list_carrier_packages

Retrieve available package types for a specific carrier in ShipStation to ensure proper shipping configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
carrierCodeYesCarrier code (e.g., 'ups', 'fedex', 'usps')

Implementation Reference

  • The MCP tool handler that fetches carrier packages using shipStationClient.getCarrierPackages and returns formatted JSON response or error.
    handler: async ({ carrierCode }) => { try { const packages = await shipStationClient.getCarrierPackages(carrierCode); return { content: [{ type: "text", text: JSON.stringify(packages, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod input schema defining the required 'carrierCode' string parameter.
    schema: { carrierCode: z.string().describe("Carrier code (e.g., 'ups', 'fedex', 'usps')") },
  • src/server.js:184-191 (registration)
    Registration loop that dynamically registers all tools (including 'list_carrier_packages') with the MCP server using server.tool(name, schema, handler).
    ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • ShipStationClient helper method that performs the API GET request to retrieve packages for the specified carrier.
    async getCarrierPackages(carrierCode) { return this.request('GET', '/carriers/listpackages', null, { carrierCode }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mattcoatsworth/shipstation-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server