Skip to main content
Glama

SFC WebService MCP

MCP server for the SFC customer logistics WebService (rates, create/delete orders, labels, tracking).

Chinese install guide: README.zh-CN.md

Credentials stay on the customer machine (MCP env or ~/.sfc/credentials.json). Tools inject HeaderRequest automatically — never put secrets in chat or source control.

Requirements

  • Node.js 20+

  • SFC-issued appKey, token, userId (ask your SFC account manager)

Related MCP server: Easyship MCP

Cursor install

cd sfc-webservice-mcp
npm install

Add to Cursor MCP settings (use your absolute path):

{
  "mcpServers": {
    "sfc-webservice": {
      "command": "node",
      "args": ["/absolute/path/sfc-webservice-mcp/src/index.js"],
      "env": {
        "SFC_APP_KEY": "your-app-key",
        "SFC_TOKEN": "your-token",
        "SFC_USER_ID": "your-user-id",
        "SFC_DIVISION_ID": "1"
      }
    }
  }
}

Optional: omit env and call tool sfc_setup once to write ~/.sfc/credentials.json (mode 600).

Tools

Tool

Purpose

Mutates

sfc_setup

Save local credentials

local file only

sfc_credential_status

Check config (no secrets)

no

sfc_verify_credentials

Probe ship types / division

no

sfc_list_ship_types

List methods

no

sfc_get_rates

Quote

no

sfc_preview_order

Build order payload

no

sfc_create_order

Submit order (confirm=true)

yes

sfc_search_order

Order lookup

no

sfc_get_fee

Fee by order

no

sfc_get_label_url

Label PDF URL

no

sfc_get_track

Tracking

no

sfc_delete_order

Delete (confirm=true)

yes

Disable delete with SFC_ALLOW_DELETE=false.

Suggested flow

  1. sfc_verify_credentials

  2. sfc_list_ship_types → sfc_get_rates

  3. sfc_preview_order → customer OK → sfc_create_order with confirm=true

  4. sfc_get_label_url / sfc_get_track

  5. Cancel: sfc_search_order then sfc_delete_order with confirm=true

On timeout / unknown create result: do not retry — search by customer order number first.

Official docs

Field schemas on those pages are authoritative.

Develop

npm install
npm run check
npm test
npm start   # stdio MCP (used by the host)

See .env.example for optional host overrides.

Available Tools

12 tools
sfc_create_orderA

Create an SFC order (addOrder). Requires confirm=true. Prefer sfc_preview_order first. Do not retry on timeout — search the customer order number instead.

Inputs: confirm (required), goodsDetails (required), recipientName (required), shippingMethod (required), +20 more.

sfc_credential_statusB

Check whether SFC credentials are configured (does not print secrets).

Inputs: no named parameters.

sfc_delete_orderA

Delete an SFC order by orderCode. Requires confirm=true. Prefer searching the order first.

Inputs: confirm (required), orderCode (required).

sfc_get_feeC

Get fee by SFC order code (getFeeByOrderCode).

Inputs: orderCode (required).

sfc_get_label_urlB

Build a label PDF URL for a confirmed SFC orderCode. Does not call print if you only need the link.

Inputs: orderCode (required), printSize, printType, isPrintDeclare.

sfc_get_ratesC

Quote rates. If shipTypeCodes is set, uses HTTPS getRatesByShip; otherwise SOAP/HTTPS getRates for all methods.

Inputs: country (required), widthCm (required), heightCm (required), lengthCm (required), +8 more.

sfc_get_trackB

Track shipments by tracking number(s). Uses tracking.sfcservice.com (up to 40 numbers).

Inputs: numbers (required), client.

sfc_list_ship_typesB

List shipping methods available for a destination country and parcel size (HTTPS getShiptypesByCountry).

Inputs: country (required), widthCm, heightCm, lengthCm, +2 more.

sfc_preview_orderA

Build and validate an addOrder payload locally. Does NOT submit. Call sfc_create_order with confirm=true after customer approval.

Inputs: goodsDetails (required), recipientName (required), shippingMethod (required), goodsDescription (required), +19 more.

sfc_search_orderB

Look up an order by SFC orderCode (searchOrder).

Inputs: orderCode (required).

sfc_setupA

Save SFC API credentials to a private local file (~/.sfc/credentials.json). Prefer MCP env vars when possible. Never put credentials in chat after setup.

Inputs: token (required), appKey (required), userId (required), divisionId.

sfc_verify_credentialsC

Read-only check: probe ship types for US with a small parcel. Tries division 1 then 17 unless divisionId is set.

Inputs: country, divisionId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 12 tools

    Disambiguation4/5

    Core order lifecycle tools (preview_order, create_order, search_order, delete_order, get_fee, get_label_url, get_track) have clearly distinct purposes, and the descriptions explicitly disambiguate preview vs. submit. The only real overlap is the credentials trio (sfc_verify_credentials, sfc_credential_status, sfc_setup), where an agent could plausibly pick the wrong one for 'check my credentials'.

    Naming Consistency4/5

    Nearly all tools follow a uniform sfc_verb_noun snake_case pattern with a consistent prefix. Minor deviations: sfc_credential_status is noun-first rather than verb-first, and sfc_setup is a bare verb with no object.

    Tool Count5/5

    12 tools is right in the sweet spot for a shipping-carrier integration. Each tool maps to a concrete API operation (rates, ship types, order CRUD, fee, label, tracking), with no filler tools.

    Completeness4/5

    The surface covers the full order lifecycle from quoting through preview, creation, fee lookup, labeling, tracking, and deletion, plus credential setup. Gaps are minor: no order update/modify, no order listing by date range, and no cancellation/void of an already-printed label.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to manage global shipping operations, including rate comparison, shipment creation, label purchasing, tracking, pickup scheduling, address validation, billing, and analytics, via natural language.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to track packages, rate and create shipments, manage pickups and customs documentation, and perform international shipping logistics checks through natural language.
      MIT