KosmoKrator

logistics

Onfleet MCP Integration for OpenAI Agents SDK

Connect Onfleet to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

9 functions 6 read 3 write API key auth

Connect Onfleet to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

Onfleet MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-onfleet": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=onfleet",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=onfleet --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Onfleet instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Onfleet Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the Onfleet integration catalog.

MCP toolSource functionTypeDescription
integration__onfleet__onfleet_list_tasks onfleet.onfleet_list_tasks Read List delivery tasks from Onfleet. Filter by state (0=unassigned, 1=assigned, 2=active, 3=completed), worker, team, or time range. Returns task details including destination, recipient, and completion status.
integration__onfleet__onfleet_get_task onfleet.onfleet_get_task Read Get detailed information about a specific delivery task by its ID. Returns destination, recipient, worker assignment, completion details, and tracking info.
integration__onfleet__onfleet_create_task onfleet.onfleet_create_task Write Create a new delivery task in Onfleet. Requires a destination address and recipient details. Optionally assign to a worker or team, set time windows, and add notes.
integration__onfleet__onfleet_update_task onfleet.onfleet_update_task Write Update an existing delivery task in Onfleet. Only the fields you provide will be changed. You can update destination, assignment, notes, time windows, and more.
integration__onfleet__onfleet_delete_task onfleet.onfleet_delete_task Write Delete a delivery task from Onfleet. Only unassigned or unsuccessfully completed tasks can be deleted. This action is permanent.
integration__onfleet__onfleet_list_workers onfleet.onfleet_list_workers Read List all workers (drivers) in Onfleet. Optionally filter by team or worker state. Returns worker name, phone, vehicle details, and current status.
integration__onfleet__onfleet_list_teams onfleet.onfleet_list_teams Read List all teams in your Onfleet organization. Returns team name, manager, assigned workers, and hub location.
integration__onfleet__onfleet_list_recipients onfleet.onfleet_list_recipients Read List recipients (delivery customers) from Onfleet. Search by name, phone, or email. Returns recipient contact details.
integration__onfleet__onfleet_get_current_user onfleet.onfleet_get_current_user Read Get the currently authenticated Onfleet user profile. Returns name, email, organization, and account details. Useful for verifying API connectivity.

Related Onfleet Pages