Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

list_customers

Retrieve customer data from ShipStation with pagination, sorting, and filtering options to manage and analyze customer information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number
pageSizeNoNumber of customers per page (max 500)
sortByNoSort customers by a specific field
sortDirNoSort direction
nameNoFilter by customer name
stateCodeNoFilter by state code
countryCodeNoFilter by country code
marketplaceIdNoFilter by marketplace ID

Implementation Reference

  • The handler function for the 'list_customers' tool. It calls shipStationClient.getCustomers(params), stringifies the result as JSON, or returns an error message.
    handler: async (params) => { try { const customers = await shipStationClient.getCustomers(params); return { content: [{ type: "text", text: JSON.stringify(customers, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod input schema defining optional parameters for filtering, sorting, and pagination of customers.
    schema: { page: z.number().optional().describe("Page number"), pageSize: z.number().optional().describe("Number of customers per page (max 500)"), sortBy: z.string().optional().describe("Sort customers by a specific field"), sortDir: z.enum(["ASC", "DESC"]).optional().describe("Sort direction"), name: z.string().optional().describe("Filter by customer name"), stateCode: z.string().optional().describe("Filter by state code"), countryCode: z.string().optional().describe("Filter by country code"), marketplaceId: z.number().optional().describe("Filter by marketplace ID") },
  • src/server.js:174-191 (registration)
    Registration of all tools, including 'list_customers' from customerTools, using server.tool() in a loop.
    [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });

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