Skip to main content
Glama
Sendify MCP Server

Sendify MCP Server

by braask
README.md
# sendify-mcp-server

An [MCP](https://modelcontextprotocol.io) server that talks to the Sendify shipping API over stdio. It can check that an API key works, create a shipment, fetch shipping rates, and book a shipment.

Author: Eeric Brask.

Built during [Sendify's MCP workshop](https://github.com/holgersendify/mcp-workshop-v1), with exercise scaffolding by Sendify. This project started from exercise 05 (`exercises/05-sendify-mcp`) and adds rate lookup and booking on top of the workshop's create-shipment flow.

## What it provides

### Tools

- `ping_status` — `GET /status`. Confirms the API key and returns status and team name.
- `create_shipment` — `POST /shipments`. Creates a shipment (sender, receiver, packages, references). Validation errors from the API (HTTP 422) are returned as tool errors.
- `get_rates` — `POST /shipments/rates`. Takes a `shipment_id` and `requested_pickup_time` (ISO 8601) and returns available rates, including carrier, price, transit time, and a booking token.
- `book_shipment` — `POST /shipments/book`. Books a shipment with a `booking_token` from `get_rates`. Optional `pickup_instructions` and `delivery_instructions`. Returns `shipment_id` and `main_tracking_id`.

### Prompts

- `favorite_shipment` — A pre-filled shipment template. Pass a `reference_id`; edit the receiver details in `src/prompts.ts` before using it for real bookings.

### Configuration

The HTTP client in `src/api.ts` calls `https://app.dev.sendify.se/external/v1` and sends the API key in the `x-api-key` header.

## Requirements

- Node.js 20 or later
- A Sendify API key

## Install, build, and run

```bash
git clone https://github.com/braask/sendify-mcp-server.git
cd sendify-mcp-server
npm install
cp .env.example .env
# Edit .env, or export the variable in your shell
npm run build
```

The server reads `SENDIFY_API_KEY` from the environment (it does not load `.env` by itself). For a quick local run:

```bash
export SENDIFY_API_KEY=your-sendify-api-key
npm start
```

During development you can run TypeScript directly:

```bash
export SENDIFY_API_KEY=your-sendify-api-key
npm run dev
```

The process speaks MCP over stdin/stdout. Log lines are written to stderr.

## Environment variables

| Variable | Required | Description |
|----------|----------|-------------|
| `SENDIFY_API_KEY` | Yes | Sendify API key, sent as the `x-api-key` header |

## Connect to an MCP client

After `npm run build`, point your client at `build/index.js` and pass the API key in the process environment.

Example Claude Desktop config (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "sendify": {
      "command": "node",
      "args": ["/absolute/path/to/sendify-mcp-server/build/index.js"],
      "env": {
        "SENDIFY_API_KEY": "your-sendify-api-key"
      }
    }
  }
}
```

You can also inspect the server with the official MCP inspector:

```bash
export SENDIFY_API_KEY=your-sendify-api-key
npx @modelcontextprotocol/inspector node build/index.js
```

## License

MIT. This repository includes the original copyright notice from Sendify AB, as required by the workshop license, plus copyright for Eeric Brask's modifications.

TDQS

B3.1/5.0

Scored across 4 tools

Disambiguation4/5

Each tool targets a distinct action, but create_shipment and book_shipment sit close together conceptually and an agent could plausibly mistake one for the other without reading carefully. The descriptions do clarify the dependency (booking token comes from get_rates), which resolves most of the ambiguity.

Naming Consistency5/5

All four tools follow a clean verb_noun snake_case pattern: ping_status, book_shipment, create_shipment, get_rates. No mixed conventions or vague verbs.

Tool Count4/5

Four tools is on the thin side but each maps to a real step in the shipping workflow (auth check, rate lookup, shipment creation, booking). Nothing extraneous, though the surface feels minimal for a shipping API.

Completeness3/5

The core rate-to-booking path is covered, but obvious lifecycle operations are missing: label/PDF retrieval, shipment tracking, cancellation, and listing shipments. Agents would hit dead ends after booking.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues