Wialon MCP Server
Connect FlowTrux workflows to Wialon (Hosting / Local) - units, positions, sensors, messages, events, resources, reports and access rights
The Wialon MCP server connects workflows and Agent nodes to the Wialon telematics platform, both Wialon Hosting and Wialon Local. It provides 14 tools for finding units and groups, reading positions and sensor values, raw messages, detector events, everything a resource holds (drivers, geofences, notifications, report templates), access rights, and reports.
The server only reads. It never changes your Wialon configuration or data; changes are made in the Wialon Console. (Some reads - messages, events, reports - are recorded by Wialon as usage.)
The template gallery has ready-made descriptions for the Telematics / Fleet area - offline units, speeding and fuel-drain alerts, daily mileage and weekly fuel reports and more - that the AI assistant builds into workflows on this server. They are a good starting point.
Setup
Go to Resources > MCP Servers > Add Server (OWNER or ADMIN) and choose Wialon (Hosting / Local). The fields:
| Field | Required | Description |
|---|---|---|
| Host URL | Yes | https://hst-api.wialon.com for Wialon Hosting (https://hst-api.wialon.eu for the EU region), or your own server's address for Wialon Local |
| API Token | No | Leave empty and use Connect (recommended), or paste a token |
| Time zone override | No | A fixed offset such as UTC+3 or -05:30. Empty = the Wialon user's own time zone, daylight saving included |
Option A - Connect your Wialon account (recommended)
- Fill in Host URL, leave API Token empty, give the server a Name, pick the workspaces under Available in workspaces, and click Add Server.
- Click Connect on the saved server. Wialon's sign-in page opens.
- Sign in with your Wialon account and approve access for FlowTrux.
- You return to FlowTrux and the server shows as connected.
If the token is revoked or expires, click Reconnect.
Option B - Paste a token
- Get a long-lived token from Wialon, for example by opening
https://hosting.wialon.com/login.html?client_id=FlowTrux&access_type=-1&duration=0&flags=4&response_type=tokenin a browser. After sign-in, Wialon puts the token (access_token) in the address it redirects to. - Add the server with Host URL and the token in API Token.
Workflows see what the token's Wialon user sees: the user's access rights decide which units, resources and reports are available.
Before You Build
Wialon answers a wrong question with an empty result far more often than with an error. Three habits avoid most surprises:
- Take names from the server. Report table and column names come from
list_report_catalog; fields and sections fromdescribe_schema; ids fromfind_itemsandread_resource. Every Wialon install offers its own set of reports, and a name it does not have is dropped without an error. - Check a report before running it.
check_reporttakes the same arguments asrun_report, runs nothing, and tells you what Wialon would silently drop, how rows will be grouped and which columns the answer will have. - Read
warningsandnotefirst. They are the only signal that part of a request was ignored, or that an empty answer means "this token cannot see it" rather than "there is none". Warnings are shown on the node in the canvas and in the execution panel.
The AI chat assistant works the same way when it builds a Wialon workflow and checks the report nodes it writes.
Tools
Finding and reading items
| Tool | What it answers | Main parameters |
|---|---|---|
find_items | Units, unit groups, users, resources, routes, retranslators, hardware types. groupId returns the member units of a unit group in one call; sections adds data such as position, sensors, counters. | type (required), nameMask, groupId, property + propertyValue, conditions + match, sections, output, sortBy, offset, limit |
describe_item | One item in full, by named sections - including a unit's report settings, trip detection, driving-quality criteria and message filter. | type, id (both required), sections, output, includeAccount |
read_state | The current state of several units: last position with its age, mileage, engine hours, and every sensor's calculated value (fuel level, ignition, temperature). | unitIds or groupId, sensorNames, sensorTypes |
read_resource | What resources hold: drivers, trailers, passengers and their groups, geofences and geofence groups, notifications, jobs, orders, points of interest, report templates. Also who is bound to a unit (now or over a period) and which geofences hold a unit or a point. | resourceId, kinds, itemNameMask, resourceNameMask, detail, unitId, at, point, timeFrom + timeTo |
read_access | Who has access to items and what each accessor may do, with permissions decoded by name. | type, itemIds (both required, up to 100), userId |
Ask for output: "decoded". By default find_items and describe_item return Wialon's own field names (pos.y). With output: "decoded" the same data arrives under readable names with units: decoded.position.lat, decoded.position.speedKmh, decoded.counters.mileageKm.
Two kinds of "group". A group of units is found with find_items; groups of drivers, trailers, passengers or geofences live inside a resource and are read with read_resource. find_items cannot find them and answers zero.
Messages and events
| Tool | What it answers | Main parameters |
|---|---|---|
read_messages | Raw messages of one item: positions and parameters as the device sent them, SMS, commands, events, fired notifications; a user's log; a resource's billing and driver SMS. sensorValues: true adds calculated sensor values. | itemId, kind, lastCount or timeFrom + timeTo, sensorValues, maxRows |
read_events | What a unit's detectors recorded over a period - trips, fuel fillings and thefts, speedings, ignition and sensor intervals, eco-driving. Counts per detector by default; includeEvents adds the events themselves. | unitId, timeFrom, timeTo (all required), detectors, includeEvents, detail, maxEvents, sensorId |
Times are Unix seconds (read_resource and find_items also accept ISO 8601). In read_events, a fuel lls value is signed: positive is a filling, negative a theft. Check truncated in read_messages - a cut answer looks complete otherwise.
Reports
| Tool | What it answers | Main parameters |
|---|---|---|
list_report_catalog | Which report tables and columns this Wialon install offers: no arguments for the object types, objectType for its tables, tableName for one table's columns. | objectType, tableName, includeColumns |
check_report | Checks a report request without running it (see above). | the run_report arguments; namesOnly to skip the ids |
run_report | Runs a report and returns its rows - built now from tables, or from a template saved in the Wialon Console (savedTemplateId), never both. All 14 object types. | objectType, objectId, resourceId (all required), tables or savedTemplateId, period or periodCount + periodUnit or timeFrom + timeTo, options, maxRowsPerTable, objectIds |
Things that make a report come back empty instead of failing:
- Table names are per object type. A driver-group report uses
drivers_group_trips, a unit groupunit_group_trips, neverunit_trips. resourceIdmust be the right one. Under the wrong resource a report is empty, not an error.objectIdis always the object's own id (a driver id for a driver report).- Statistics tables answer in
stats, not intables- that is a success. - Periods.
periodis resolved in the session's time zone, andlast_*periods exclude the current hour or day (last_7_daysends at last midnight). The answer'swindowgives the exact span. - Rows are grouped by the report's subject - one row per unit of a group, per driver of a driver group.
groupBychanges it;groupedByin the answer says what applied.
To put a report table into Google Sheets or a PDF, ask the table for matrix: true and pass {{steps.report.output.response.tables[0].matrix}} as the rows.
Checks, schema and other reads
| Tool | What it answers | Main parameters |
|---|---|---|
describe_schema | Wialon's data model, from the server itself (no Wialon call): entities, sections and fields, what a tool returns, and topics such as playbook (which tool answers what) and report_periods. Also finds Wialon services for call_service. | entity, section, tool, topic, search, service |
check_call | Checks the arguments of any other tool of this server without calling Wialon. | tool (required), arguments |
check_ids | Checks that the ids written into up to 20 calls exist and are of the right item type. | calls (required) |
call_service | Calls one read-only Wialon service by name, for anything no other tool covers. Services that could change data are refused. | svc (required), params, maxBytes |
Common Patterns
Where are my vehicles right now?
find_items with type: "unit", groupId of the group, sections: ["position"] and output: "decoded". Each unit carries decoded.position.lat, lon and the age of the position. A unit that never reported has no position at all.
Daily mileage report
A schedule trigger → run_report with objectType: "unit_group", the group's objectId, its resourceId, period: "yesterday" and a mileage table taken from list_report_catalog → pdf:generate_pdf_table or google-workspace:sheets_append with the table's matrix.
React to an event as it happens
Do not poll. Create a notification in Wialon whose action sends a request to the URL of a workflow's webhook trigger - Wialon calls FlowTrux the moment the event fires. read_resource with kinds: ["notifications"] and detail: "full" shows what existing notifications do.
Fuel fillings and drains over a period
read_events with the unit, the window and detectors: ["lls"] for counts; add includeEvents: true for the individual fillings and drains.