# Onfleet MCP

> Onfleet MCP gives your AI client full control over last-mile delivery logistics. Create tasks, check real-time driver locations, confirm ETAs, and audit historical routes—all from one conversation. It lets you run your entire dispatch operation without ever leaving your chat window.

## Overview
- **Category:** erp-operations
- **Price:** Free
- **Tags:** last-mile-delivery, route-optimization, fleet-tracking, dispatch, proof-of-delivery, real-time-logistics

## Description

Running a fleet of drivers means juggling dozens of tabs: the map view, the schedule board, the task creator, and the history log. This MCP connects all those functions to any AI agent. You can tell your client exactly what you need—for instance, 'Check who's available near downtown and create three new tasks for them.' The system handles the complex API calls, letting you manage everything from task creation to verifying worker schedules in a single chat exchange. Because this connection lives on Vinkius, you don't have to worry about integrating multiple services; you just connect once and get access to all your core delivery tools.

It’s designed for when speed matters. You can tell it to list every task that failed yesterday or find the current location of a package by its tracking ID. It turns what used to take half an hour of dashboard clicking into a simple question you ask your agent.

## Tools

### complete_task_override
Force-completes a specific delivery task in Onfleet, overriding its current status.

### create_delivery_task
Creates an entirely new delivery task using full recipient details and addresses.

### delete_delivery_task
Archives or deletes a specified delivery task from the system records.

### list_dispatch_hubs
Retrieves a list of all operational dispatch hubs and their location coordinates.

### get_task_details
Fetches detailed information for one specific delivery task, including its current status or history.

### list_tasks_by_date
Queries and returns a list of all delivery tasks that fall within an exact date range you specify.

### list_fleet_teams
Retrieves the structured list of all active delivery teams or work groups.

### get_worker_schedule
Pulls a specific driver's full work schedule, including shift start and end times.

### list_fleet_workers
Lists every registered driver or worker in the fleet along with their current status.

### update_delivery_task
Modifies existing details on a task, such as changing an address or adding notes.

## Prompt Examples

**Prompt:** 
```
Create a delivery task to 123 Main St, San Francisco for John Doe with phone 415-555-0100.
```

**Response:** 
```
Task created successfully. Tracking ID: 8f3a...b2c1. Destination: 123 Main St, San Francisco, CA. Recipient: John Doe (415-555-0100). Status: unassigned. The task is ready to be auto-assigned to the nearest available driver. Want me to check which drivers are currently online?
```

**Prompt:** 
```
Show me all deliveries from yesterday with their status.
```

**Response:** 
```
Found 47 tasks from yesterday. 41 completed successfully (87.2%), 3 failed (wrong address), 2 cancelled by customer, and 1 still pending. The failed deliveries are task IDs a4f2..., b3e1..., and c7d8.... Want me to pull the details on the failed ones?
```

**Prompt:** 
```
Which drivers are online right now and how many active tasks does each have?
```

**Response:** 
```
5 drivers currently online. Maria Chen — 3 active tasks, last seen at Market St. Alex Rivera — 6 active tasks (at capacity). Tom Wilson — 1 active task, available for more. Sarah Kim — 4 active tasks. Jake Patel — 0 active tasks, standing by at Hub North. Want me to pull Tom's schedule to confirm his shift end time?
```

## Capabilities

### Manage Delivery Tasks
Create, update, delete, and force-complete tasks using specific details like addresses and recipient names.

### Monitor the Fleet Status
List all active drivers, determine who's currently online, and see their assigned capacity in real time.

### Review Worker Schedules
Pull exact shift times or view available windows for any driver on the team.

### Audit Operations History
Query task records by a date range to review all completed, failed, or pending deliveries across your entire operation.

### View Team Structure and Zones
Browse the team hierarchy and view details about dispatch hubs, including their geographic coverage coordinates.

## Use Cases

### Handling Customer Inquiries
A customer calls asking where their package is. Instead of promising a callback, you tell your agent to run `get_task_details` for the tracking ID. The agent instantly returns the real-time ETA and driver location, solving the issue right there.

### Correcting Field Errors
A driver reports that a task address is wrong. You ask your agent to use `update_delivery_task` with the correct coordinates and notes. This corrects the record immediately, preventing future routing issues.

### End-of-Day Reporting
You need performance stats for last week's deliveries. You ask your agent to run `list_tasks_by_date` for the past seven days. It returns a summary of all tasks, highlighting failed or pending orders.

### Preparing for Peak Season
You need to see who is available next week. You ask your agent to run `list_fleet_workers` followed by querying specific schedules with `get_worker_schedule`. This lets you coordinate manpower without manual checking.

## Benefits

- Centralized Operations: Instead of jumping between the Onfleet dashboard and multiple internal apps, you keep it all in a single conversation with your agent. You can check driver status, create tasks, and review history without context switching.
- Instant Exception Handling: If a package gets stuck or needs rerouting, you don't need to manually log into the system. You simply tell your client what happened, and it uses tools like `update_delivery_task` or `complete_task_override` immediately.
- Auditable History: Need proof of what happened last month? Use `list_tasks_by_date`. Your agent pulls all necessary records instantly, letting you audit failures or successes across any period without running complex reports.
- Personnel Visibility: Know who's available and when. You can quickly run `list_fleet_workers` to check current status, then follow up with `get_worker_schedule` to confirm if they are working that shift week.
- New Task Creation on Demand: When a client calls in an urgent order, you don't open the task form; you just ask your agent to run `create_delivery_task`, providing all necessary details immediately.

## How It Works

The bottom line is you talk to your agent naturally, and it executes the complex logistics commands through Onfleet.

1. Subscribe to this MCP on Vinkius.
2. Provide your Onfleet API Key to authorize access.
3. Ask your AI client to perform a task, like 'List all drivers who are currently online and their capacity.'

## Frequently Asked Questions

**How do I use Onfleet MCP to check if a driver is working today?**
You run `list_fleet_workers` to see everyone online, then ask the agent for specific shift details using `get_worker_schedule`. This gives you their full availability window instantly.

**Can Onfleet MCP create a task if I forget an address detail?**
No. The `create_delivery_task` tool requires robust information, including the full address and recipient details. If it's missing, the tool won't run until you provide those specific inputs.

**What if a delivery fails? Can Onfleet MCP record that?**
Yes. You use `list_tasks_by_date` to pull all records for a time frame and then ask your agent to get details on those specific tasks using `get_task_details`.

**How do I find out which dispatch hubs are in my area?**
Simply run the `list_dispatch_hubs` tool. This returns a list of all operational hubs, including their precise geographic coordinates and zone coverage details.