Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

get_customer

Retrieve customer details from the ShipStation API using a specific customer ID. Simplify customer data management by accessing structured customer information efficiently.

Input Schema

NameRequiredDescriptionDefault
customerIdYesCustomer ID to retrieve

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "customerId": { "description": "Customer ID to retrieve", "type": "number" } }, "required": [ "customerId" ], "type": "object" }

Implementation Reference

  • The handler function implementing the core logic of the 'get_customer' tool. It fetches the customer data via the ShipStation API client and formats the response as JSON or handles errors.
    handler: async ({ customerId }) => { try { const customer = await shipStationClient.getCustomer(customerId); return { content: [{ type: "text", text: JSON.stringify(customer, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Input schema using Zod for validating the customerId parameter required by the get_customer tool.
    schema: { customerId: z.number().describe("Customer ID to retrieve") },
  • src/server.js:174-191 (registration)
    Registration of the get_customer tool (included via ...customerTools spread) to the MCP server using server.tool() method.
    [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • Supporting helper method in ShipStationClient class that performs the actual API request to retrieve customer details by ID.
    async getCustomer(customerId) { return this.request('GET', `/customers/${customerId}`); }

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