Entur Developer
Open
MCP
Transit Data MCP

Transit Data MCP

MCP server over Norwegian public transport reference data (NeTEx): lines, service journeys, quays, stop places, operators, authorities and journey patterns, with read-only tools to look up one entity or page through many.

Transit Data MCP is a Model Context Protocol (MCP) server over Entur's NeTEx-derived transit reference data. Connect it to an MCP-capable AI client and the assistant can look up lines, service journeys, the quays they call at, stop places, operators and authorities, and page through any of them.

Connecting

Point your MCP client at https://api.entur.io/transit-data/v1beta/mcp. The endpoint is public and needs no authentication. Identify your client with the ET-Client-Name header, in the form <company>-<application> (lowercase, no spaces); see Client identification.

Tools

Each kind of entity has a read-only tool that looks up one entity by identifier (serviceJourney, quay, line, ...) and one that pages through them (serviceJourneys, quays, lines, ...). Experimental data (real-time departures, geo-queries, activeDates) is not offered as tools and is rejected if requested through fields.

A tool takes its own arguments, plus an optional fields:

  • fields is a GraphQL selection set for the entity the tool returns, such as id line { id name }. Without it, a tool returns the entity's scalar and enum fields. Each tool's fields description lists what can be selected on that entity, one level deep.
  • A tool that returns a page (quays, lines, ...) takes first and after. The result has the entities under nodes (under edges { node } for datedServiceJourneys) and a pageInfo with hasNextPage and endCursor; pass endCursor as after for the next page. For these tools fields describes one entity, not the page.

Tool results

A tool result carries the GraphQL response as JSON text in content[0].text: {"data": ...} on success. When the call did not do what it asked for (a missing required argument, an unknown or experimental field, an invalid fields), the result has isError: true and the text is {"errors": [...]} or a plain message. An unknown tool name is reported the same way, not as a JSON-RPC error.

Transport

The server speaks Streamable HTTP in stateless mode, so any replica can answer any request. See the /mcp operation for the details and the status codes.

Did you find what you were looking for?