Skip to main content
Glama

ShipStation API MCP Server

carrier-tools.js2.07 kB
import { z } from 'zod'; import { shipStationClient } from '../api-client.js'; const carrierTools = [ { name: "list_carriers", description: "List all carriers available to the account", schema: {}, handler: async () => { try { const carriers = await shipStationClient.getCarriers(); return { content: [{ type: "text", text: JSON.stringify(carriers, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } } }, { name: "list_carrier_packages", description: "List all packages available for a carrier", schema: { carrierCode: z.string().describe("Carrier code (e.g., 'ups', 'fedex', 'usps')") }, 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 }; } } }, { name: "list_carrier_services", description: "List all services available for a carrier", schema: { carrierCode: z.string().describe("Carrier code (e.g., 'ups', 'fedex', 'usps')") }, 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 }; } } } ]; export default carrierTools;

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