Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

list_carrier_services

Retrieve available shipping services for a specific carrier to select appropriate delivery options when creating shipments.

Input Schema

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

Implementation Reference

  • The main handler function for the 'list_carrier_services' tool. It takes carrierCode as input, calls shipStationClient.getCarrierServices, and returns the services as formatted JSON or an error message.
    handler: async ({ carrierCode }) => { try { const services = await shipStationClient.getCarrierServices(carrierCode); return { content: [{ type: "text", text: JSON.stringify(services, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod schema defining the input parameter 'carrierCode' as a required string with description.
    schema: { carrierCode: z.string().describe("Carrier code (e.g., 'ups', 'fedex', 'usps')") },
  • src/server.js:173-191 (registration)
    Tool registration loop in the MCP server that spreads the carrierTools array (among others) and registers each tool by calling server.tool with its name, schema, handler, and description.
    // Register all tools [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • Helper method in ShipStationClient that performs the actual API request to ShipStation's /carriers/listservices endpoint with the carrierCode parameter.
    async getCarrierServices(carrierCode) { return this.request('GET', '/carriers/listservices', 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