Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

create_label

Generate shipping labels by processing JSON-formatted label data through the ShipStation API MCP Server, streamlining order fulfillment and shipment management.

Input Schema

NameRequiredDescriptionDefault
labelDataYesJSON string containing the label data

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "labelData": { "description": "JSON string containing the label data", "type": "string" } }, "required": [ "labelData" ], "type": "object" }

Implementation Reference

  • The MCP tool handler function that parses the JSON labelData, calls the ShipStation API via shipStationClient.createLabel, formats the result as text content, and handles errors.
    handler: async ({ labelData }) => { try { const parsedData = JSON.parse(labelData); const result = await shipStationClient.createLabel(parsedData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod input schema for the create_label tool, expecting a JSON string with label data.
    schema: { labelData: z.string().describe("JSON string containing the label data") },
  • src/server.js:173-191 (registration)
    Registration code that spreads shipmentTools (containing create_label) and registers each tool with the MCP server using server.tool().
    // 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 makes the POST request to ShipStation API endpoint /shipments/createlabel, called by the tool handler.
    async createLabel(data) { return this.request('POST', '/shipments/createlabel', data); }

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