# Run dispatch from Claude

> Connect Claude to Techvia TMS and find loads, assign a carrier, add notes and change load status by chatting, with a scoped key.

Source: https://techvia.software/docs/tms/use-cases/run-dispatch-from-claude/

**Outcome:** you ask Claude "which loads pick up tomorrow?" or "assign Swift Haul to LD-2026-000123" and it does it in your TMS, with every change shown in the load's History as "API key: Claude".

You need a TMS workspace with API access and admin rights to make a key.

## Steps

1. **Make a key for the assistant.** In **Settings > API keys** press **New key**, name it `Claude` and tick `loads.read`, `loads.write` and `directory.read`. Tick `directory.write` only if it may create or update customers, carriers and facilities. Leave `loads.rates` and `billing.read` off unless it should see or set rates. Copy the key; it is shown once.
2. **Connect Claude Code.** Replace `tms_YOUR_KEY` with your key:

   ```bash
   claude mcp add --transport http techvia-tms https://tms-api.techvia.software/mcp \
     --header "Authorization: Bearer tms_YOUR_KEY"
   ```

   Using Cursor, VS Code or n8n instead? See [Use with your AI](/docs/tms/ai/): one-click install for Cursor, step-by-step setup for VS Code and n8n.
3. **Check the connection.** Ask: "List the tools of techvia-tms." You should see `search_loads`, `get_load`, `assign_load`, `add_load_note` and more. The assistant sees only the tools your key's scopes allow.
4. **Ask for work in plain words.** For example:
   - "Show loads that are Covered and pick up on or after 2026-12-01." (`search_loads`)
   - "Open load LD-2026-000123 and tell me when the first stop is, in local time." (`get_load`; the tool tells the assistant to show `scheduledLocal`, not the UTC time)
   - "Assign carrier Swift Haul to that load." (`list_carriers`, then `assign_load`)
   - "Add a note: driver called, 30 minutes late." (`add_load_note`)
   - "Mark it AtPickup." (`update_load_status`)
5. **Review in the TMS app.** Open the load: the timeline and History show each change as made by "API key: Claude".

## What the assistant cannot do

- It cannot make payments, invoices or settlements, and it cannot delete anything.
- A key cannot set `PreBook`, `Cancelled`, `TONU`, `Completed` or `Invoiced`; a person does that in the TMS app. See [status values](/docs/tms/concepts/statuses/).
- A blacklisted or inactive carrier is refused, and a carrier with expired insurance is refused too; only a person can override insurance in the TMS app.
- A repeated create is recognised and does not make a second load ([idempotency](/docs/tms/concepts/idempotency/)).

When you ask an assistant about your loads, the data a tool returns is sent to that assistant's vendor under your own account with them, on their terms. Give the key only the scopes it needs.

## Next steps

- [MCP tools, scopes and limits](/docs/tms/ai/tools/): every tool and the scope it needs.
- [Track stops](/docs/tms/use-cases/track-stops/): have the assistant record arrivals and departures.
- [Rate limits and quota](/docs/tms/concepts/rate-limits/): one tool call is one request.
