Développeurs
Serveur MCP Konvoi
Connectez Claude, ChatGPT, Cursor ou vos propres scripts aux données de votre flotte dans Konvoi via le Model Context Protocol.
URL du serveur
https://konvoi.ai/api/mcp
Bêta privéeKonvoi Dispatch et les clients IA sont en bêta privée et s’activent par espace de travail.
Prérequis
| Espace de travail | Dispatch et clients IA (MCP) activés |
|---|---|
| Connexion | Votre identifiant Konvoi, avec votre clé d’accès (passkey) ou votre deuxième étape si vous en utilisez une |
| Client | Un client MCP qui se connecte à des serveurs distants en HTTP avec OAuth |
Connexion
Claude
- Settings → Connectors
- Add custom connector
- Collez l’URL du serveur
- Connectez-vous à Konvoi et autorisez l’accès
ChatGPT
- Settings → Connectors → Advanced
- Activez Developer mode
- Créez un connecteur avec l’URL du serveur, authentification OAuth
- Connectez-vous à Konvoi et autorisez l’accès
Claude Code
Exécutez dans un terminal :
claude mcp add --transport http konvoi https://konvoi.ai/api/mcp Lancez /mcp dans Claude Code et connectez-vous à Konvoi
Cursor · VS Code
- Cursor : ajoutez à ~/.cursor/mcp.json
- VS Code : MCP: Add Server → HTTP → collez l’URL du serveur
- Connectez-vous à Konvoi quand c’est demandé
{
"mcpServers": {
"konvoi": {
"url": "https://konvoi.ai/api/mcp"
}
}
} Scripts
Jetons personnels : Profile → AI clients → Create personal token
curl -s https://konvoi.ai/api/mcp \
-H "Authorization: Bearer $KONVOI_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": {
"name": "curl",
"version": "1.0"
}
}
}' curl -s https://konvoi.ai/api/mcp \
-H "Authorization: Bearer $KONVOI_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' curl -s https://konvoi.ai/api/mcp \
-H "Authorization: Bearer $KONVOI_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_workspaces","arguments":{}}}' Ce qui est accessible
- Chaque espace de travail auquel vous avez accès et où Dispatch et les clients IA sont activés, avec votre rôle dans cet espace de travail.
- Lors de la connexion, vous pouvez la limiter à certains espaces de travail et exclure « Propose changes ».
- Un administrateur d’espace de travail peut retirer une connexion de son espace de travail dans Dispatch → Connect.
- Profile → AI clients liste vos connexions ; Disconnect met fin à l’une d’elles immédiatement.
Outils
Les outils de lecture consultent les données avec votre rôle. Les outils propose_* créent une proposition et ne modifient rien eux-mêmes.
Compte
- whoami
- Who this connection acts for: the person, the connection's scopes, and the default workspace when there is exactly one. Tout rôle
- list_workspaces
- Every workspace this connection can open: slug, name, organisation, the person's role, whether Dispatch is on, and the vehicle count. Tout rôle
- fleet_overview
- Headline numbers for one or more workspaces side by side: vehicles, drivers, open fines, open fuel cases, silent trackers and fleet fuel use (median L/100 km over the last 30 days). Rôle minimum: VIEWER
Flotte
- search_fleet
- Search across the entire workspace for vehicles, drivers, fines, invoices, fuelings, emails, inspections, incidents, and contacts. Rôle minimum: VIEWER
- list_vehicles
- List the fleet page by page: plate, name, make, model, year, type, VIN, primary driver and whether it is active. Rôle minimum: VIEWER
- get_vehicle
- Get full details of a specific vehicle including its documents, ownership history, odometer readings, and fine count. Rôle minimum: VIEWER
- get_vehicle_tco
- Get Total Cost of Ownership (TCO) breakdown for a specific vehicle, including invoices by category and fuel costs. Rôle minimum: VIEWER
- list_drivers
- List the drivers page by page: name, e-mail, phone, external id, licence validity and whether they are active. Rôle minimum: VIEWER
- get_driver
- Get full details of a specific driver including their vehicle assignments, license information, and fine count. Rôle minimum: VIEWER
- list_contacts
- List workspace contacts (insurance companies, leasing companies, garages, etc.). Rôle minimum: VIEWER
- get_fleet_alerts
- Get fleet health alerts for the workspace. Rôle minimum: VIEWER
- find_duplicate_vehicles
- Find vehicle records that may be the same vehicle twice: same plate, same VIN, VINs one or two characters apart (a misread 0/O, 1/I, 8/B), plates one character apart on the same make, or a VIN typed into the plate field. Rôle minimum: VIEWER
- list_permits
- List the exceptional-transport permits: number, holder, category, validity, status and the vehicles on each. Rôle minimum: VIEWER
- get_permit
- Read one permit in full: vehicles, route legs, conditions, validity in the issuing country's days. Rôle minimum: VIEWER
- list_inspections
- List vehicle inspections, newest first: vehicle, type, status, odometer, defects found, photo count and the evidence-seal status. Rôle minimum: VIEWER
- get_inspection
- Read one inspection: vehicle, status, odometer, the photos taken (category and notes), the damage analysis and warning lights, and the seal status. Rôle minimum: VIEWER
Amendes et documents
- list_fines
- List traffic fines in the workspace with optional filters. Rôle minimum: VIEWER
- get_fine
- Get full details of a specific traffic fine including the associated vehicle, driver, payment information, and document. Rôle minimum: VIEWER
- list_document_reviews
- List documents in the review inbox that need human verification. Rôle minimum: VIEWER
- list_document_requests
- List document requests sent to contacts (insurance companies, leasing companies, garages, etc.). Rôle minimum: VIEWER
- get_document
- Get full details of an uploaded document: its classification, processing status, the records it produced (results: permits, fines, invoices with their fuelings, vehicle documents, driver licences, incidents, vehicle imp… Rôle minimum: VIEWER
- read_document
- Read any uploaded file (document page, inbox attachment, review item): PDF text layer, OCR for scans and photos, spreadsheets. Rôle minimum: VIEWER
Carburant
- query_fuelings
- Query fuel transactions with filters (date range, vehicle, plate, card, min quantity). Rôle minimum: VIEWER
- get_fuel_consumption
- The Consumption page numbers from the CAN counter: L/100 km while driving, litres, distance and idle share per driver (default) or per vehicle, over the last days (default 30, max 120), with the fleet baseline (p10/medi… Rôle minimum: VIEWER
- get_fuel_ledger
- Read one vehicle's fuel ledger over a window: every fill seen at the tank or on a card, with level from→to, litres into the tank, card litres, the delta (tank − card), station, driver and flags, plus the tank capacity u… Rôle minimum: VIEWER
- query_fuel_cases
- List fuel-integrity cases (open, held or resolved) for the workspace or one vehicle, with their unexplained litres and value at risk. Rôle minimum: VIEWER
- get_fuel_readiness
- Whether Fuel Watch can judge this fleet: per vehicle which inputs are there (level sensor, CAN fuel counter, fuel cards, tank size) over the last days (default 30), and what is missing. Rôle minimum: VIEWER
Télémétrie et lieux
- fleet_now
- What every tracked vehicle is doing right now: DRIVING, STOPPED (ignition on), PARKED, NOT_DRIVEN (tracker reporting, not moved for the Fleet Health idle days, 7 by default) or NO_SIGNAL (tracker silent — whether it mov… Rôle minimum: VIEWER
- locate_vehicle
- Where was a vehicle at a moment: the telemetry position nearest to at (within toleranceMinutes, default 120), with speed, ignition and how many minutes the fix is from the moment. Rôle minimum: VIEWER
- vehicle_whereabouts
- Track a vehicle around a moment or over a window, per tracker: sample counts, the largest gap, coverage, and the fix nearest to the moment (or to a reference point refLat/refLng, with its distance). Rôle minimum: VIEWER
- list_vehicle_positions
- Latest known position per vehicle as delivered by its primary tracker: lat/lng, speed, heading, ignition, battery, odometer (real CAN or GPS estimate), recorded time, hours since, and which provider/device reported it. Rôle minimum: VIEWER
- list_trackers
- List telematics trackers/devices discovered from the providers (Ruptela, Transics, PAJ, …) with their IMEI, provider device id, provider label, the linked vehicle (plate), link status (LINKED/UNMATCHED/IGNORED/CONFLICT)… Rôle minimum: VIEWER
- list_tracker_events
- Events the trackers raised (POWER_LOST, DISCONNECTED, SOS, GEOFENCE_ENTER/EXIT, provider alarms, …) with severity, message, location and time. Rôle minimum: VIEWER
- list_telemetry_signals
- Discover which telemetry signals a vehicle (or the fleet) actually emits, with basic stats (count, min, max, last). Rôle minimum: VIEWER
- get_telemetry_timeseries
- Fetch the downsampled raw (and optionally derived) time-series for ONE vehicle over a window, so you can inspect the data — read the fuel curve, find the exact drop, pick a threshold, or benchmark against fleet norms. Rôle minimum: VIEWER
- query_telemetry_data
- Generic, bounded query over everything the telemetry sources deliver. Rôle minimum: VIEWER · Lourd
- run_telemetry_report
- Answer behavioural questions about vehicle GPS/telemetry OVER TIME, across one or many vehicles and any tracker provider (Ruptela, Teltonika, etc.). Rôle minimum: VIEWER · Lourd
- run_telemetry_analysis
- Run a composable detector analysis across one or many vehicles. Rôle minimum: VIEWER · Lourd
- search_places
- Find places (geofences) in this workspace — depots, customer sites, fuel stations, workshops, parkings. Rôle minimum: VIEWER
- place_visits
- Visits of vehicles to known places (depots, customers, fuel stations): entered/left times, newest first. Rôle minimum: VIEWER
Rapports et tableaux
- list_reports
- List the saved smart reports: id, name, description, number of sections, number of runs and the latest run. Rôle minimum: VIEWER
- run_report
- Run a saved smart report now (list_reports gives the id) and return its sections with their rows (max 1000 per section). Rôle minimum: USER · Lourd
- query_report_rows
- Query enriched report rows (e.g. night-allowance claims from the nightly Nachtrapport) across runs, by the day the claim is about. Rôle minimum: VIEWER
- list_boards
- List the fleet boards (wall reports): the built-in ones and the ones made from a sentence, with their key, title and description. Rôle minimum: VIEWER
- read_board
- Read a fleet board's current numbers (list_boards gives the key), over its saved period or the last days. Rôle minimum: VIEWER
- draft_board
- Draft a fleet board from a sentence ("fuel per driver for the Antwerp trucks, this month"). Rôle minimum: USER · Lourd
Dispatch
- list_pending_proposals
- Changes waiting for a person: proposals from chat or an AI client, and standing-order steps held for approval, newest first. Rôle minimum: VIEWER
- list_standing_orders
- The standing orders Dispatch runs for this workspace: name, trigger, whether it is on, its autonomy rung (how much it may do without a person) and how often it ran. Rôle minimum: VIEWER
Modifications
- propose_fine_assignment
- Propose assigning a fine to the driver on record (matched by plate and violation date). Rôle minimum: USER
- propose_place
- Propose saving a place (depot, customer, fuel station) with its geofence. Rôle minimum: USER
- propose_board
- Propose saving a fleet board: a draft_board spec, or a sentence to draft and save. Rôle minimum: USER
- propose_vehicle_changes
- Propose creating or updating vehicles in bulk (from a list or a file). Rôle minimum: USER · Approbation admin
- propose_vehicle_merge
- Propose merging duplicate vehicle records (same truck from a telematics sync and a registration import, or a plate/VIN typo): everything on the duplicate moves to the kept vehicle and the duplicate is removed. Rôle minimum: ADMIN · Approbation admin
- propose_document_request
- Propose e-mailing a contact to ask for a missing document. Rôle minimum: ADMIN · Approbation admin
- propose_archive_document
- Propose archiving an uploaded document. Rôle minimum: USER · Approbation admin
- propose_driver_message
- Propose a message to a driver's phone (push + the Konvoi app's inbox), optionally with a link to an app screen or an https address. Rôle minimum: USER · Approbation admin
- propose_close_fuel_case
- Propose closing a fuel case with a resolution and a note. Rôle minimum: USER · Approbation admin
- propose_standing_order
- Propose a standing order: a rule Dispatch runs on a trigger (it starts at proposal-only autonomy). Rôle minimum: ADMIN · Approbation admin
- propose_scheduled_report
- Propose emailing a report on a schedule: the read calls you used (with rolling dates like "today-7d"), recipients, a cron in a timezone, and xlsx/csv/pdf. Rôle minimum: USER · Approbation admin
Les modifications sont des propositions
- Un outil propose_* ne modifie rien lui-même. Il crée une proposition dans Konvoi Dispatch et renvoie son lien.
- Propositions courantes : approuvez-les ou rejetez-les dans le client quand il peut vous le demander, sinon dans Konvoi Dispatch.
- Propositions marquées « Approbation admin » : un administrateur de l’espace de travail les approuve dans Konvoi Dispatch.
- Une modification approuvée s’exécute au nom de la personne qui l’approuve, avec son rôle. Chaque appel et chaque décision sont journalisés.
- Proposer nécessite l’accès « Propose changes », choisi lors de la connexion.
Prompts
- Handle this week’s fines
- Match each open fine to a driver, propose assignments, flag contest candidates.
- fine-triage
- Sweep fuel for anomalies
- Impossible fills vs tank size, off-hours fills at the depot, duplicate charges.
- fuel-anomaly
- What expires in the next 30 days
- Technical inspections, insurance, registrations and licenses coming due.
- expiry-sweep
- Weekly fleet review
- Utilization, idle vehicles, telemetry highlights — one digest.
- weekly-telemetry
Limites
| Par connexion | 120 appels par minute, 5 simultanés |
|---|---|
| Outils lourds | 10 appels par minute par connexion |
| Par personne | 300 appels par minute pour l’ensemble des connexions |
| Taille du résultat | 100 Ko ; les listes plus longues sont raccourcies et le résultat indique ce qui a été coupé |
| Au-delà d’une limite | RATE_LIMITED, avec le nombre de secondes à attendre |
Sécurité
- Les jetons sont des chaînes aléatoires stockées uniquement sous forme de hash. Les jetons d’accès durent 1 heure ; les jetons de rafraîchissement changent à chaque utilisation et expirent après 30 jours sans utilisation ; les jetons personnels durent 30, 90 ou 365 jours.
- Toutes vos connexions sont révoquées d’un coup lorsque vous changez votre mot de passe, vous déconnectez partout ou désactivez l’authentification à deux facteurs.
- Présenter à nouveau un ancien jeton de rafraîchissement révoque cette connexion.
- Les connexions ne suivent pas le verrouillage de session. Autoriser une connexion nécessite une session entièrement déverrouillée.
- Le texte provenant de l’extérieur de Konvoi, comme les documents scannés et les e-mails, est marqué {"untrusted": true}. Les clients ont pour consigne de le traiter comme des données, jamais comme des instructions.
- Les données sur lesquelles vous posez des questions sont envoyées au client que vous utilisez.
Dépannage
| WORKSPACE_REQUIRED | La connexion donne accès à plusieurs espaces de travail. Passez workspace, un slug issu de list_workspaces. |
|---|---|
| WORKSPACE_NOT_FOUND | Le slug est erroné ou l’espace de travail ne fait pas partie de cette connexion. Vérifiez list_workspaces. |
| DISPATCH_OFF | Dispatch ou les clients IA sont désactivés pour cet espace de travail. Adressez-vous à un administrateur de l’espace de travail. |
| ROLE_REQUIRED | Votre rôle dans cet espace de travail est inférieur au rôle minimum de l’outil. |
| SCOPE_REQUIRED | La connexion n’a pas « Propose changes ». Reconnectez-vous et cochez cette option. |
| RATE_LIMITED | Attendez le nombre de secondes indiqué dans le message. |
| INVALID_ARGUMENTS | Les arguments ne correspondent pas au schéma d’entrée de l’outil. |
| 401 | Le jeton a expiré ou a été révoqué. Reconnectez-vous depuis le client. |
Référence du protocole
| Endpoint | POST https://konvoi.ai/api/mcp |
|---|---|
| Transport | Streamable HTTP, sans état : POST uniquement, pas de Mcp-Session-Id ; GET et DELETE répondent 405 |
| Métadonnées du serveur d’autorisation | /.well-known/oauth-authorization-server |
| Métadonnées de la ressource protégée | /.well-known/oauth-protected-resource |
| Endpoints OAuth | authorize /oauth/authorize · token /api/oauth/token · register /api/oauth/register · revoke /api/oauth/revoke |
| Enregistrement du client | Client ID Metadata Documents (un client_id https), ou Dynamic Client Registration (RFC 7591), 10 par heure par IP |
| PKCE | S256, obligatoire |
| Indicateur de ressource | resource=https://konvoi.ai/api/mcp (RFC 8707) ; les jetons y sont liés |
| URI de redirection | https, correspondance exacte ; http uniquement sur 127.0.0.1 ou localhost, tout port |
| Scopes | fleet:read (toujours), fleet:propose (outils propose_*) |
| Durée de vie des jetons | code 60 s · accès 1 h · rafraîchissement 30 jours d’inactivité, avec rotation · personnel 30/90/365 jours |
| Jeton absent ou invalide | 401 avec WWW-Authenticate: Bearer resource_metadata=… |
| Erreurs d’outil | Un résultat d’outil avec isError: true et structuredContent.error = { code, message } |