Skip to main content
Glama

ruter-connector

Er bussen i rute? En MCP-server som gir AI-agenter sanntidsdata for norsk kollektivtrafikk — buss, trikk, t-bane, tog og båt.

Dataene hentes fra Enturs åpne API-er, dit Ruter og alle andre norske kollektivselskaper publiserer rutedata og sanntid. Det betyr at connectoren dekker hele Norge, ikke bare Ruter-området: Skyss i Bergen, AtB i Trondheim, Kolumbus i Stavanger, alle togselskapene — alt sammen. Ingen API-nøkkel kreves.

Verktøy

finn_stoppested

Søker etter holdeplass eller stasjon på navn og returnerer NSR-id-er (Nasjonalt stoppestedsregister) som brukes videre i avganger.

{ "navn": "Nydalen", "antall": 2 }
[
  { "id": "NSR:StopPlace:59605", "navn": "Nydalen", "sted": "Oslo, Oslo", "kategorier": ["metroStation", "onstreetBus"] },
  { "id": "NSR:StopPlace:31393", "navn": "Nydalen", "sted": "Bergen, Vestland", "kategorier": ["onstreetBus"] }
]

avganger

Sanntidsavganger fra et stoppested: planlagt vs. forventet tid, forsinkelse i minutter, status og eventuelle avviksmeldinger. Kan filtreres på linjenummer og/eller destinasjon, og ta et starttidspunkt (ISO 8601) for oppslag frem i tid.

{ "stoppested_id": "NSR:StopPlace:58366", "linje": "19", "antall": 1 }
{
  "stoppested": "Jernbanetorget",
  "stoppested_id": "NSR:StopPlace:58366",
  "hentet": "11.9., 21:23",
  "avganger": [
    {
      "linje": "19",
      "transportmiddel": "trikk",
      "destinasjon": "Majorstuen",
      "plattform": "C",
      "planlagt": "11.9., 21:27",
      "forventet": "11.9., 21:29",
      "forsinkelse_minutter": 3,
      "sanntid": true,
      "status": "3 min forsinket",
      "operatoer": "Ruter",
      "avvik": []
    }
  ]
}

status er én av: i rute, N min forsinket, innstilt eller kun rutetid (ingen sanntidsdata) — det siste når avgangen ikke rapporterer sanntid ennå.

Typisk agentflyt: finn_stoppested("Jernbanetorget")avganger("NSR:StopPlace:58366", linje: "19").

Related MCP server: mcp-irail

Kom i gang

Krever Node.js 18+.

git clone https://github.com/fredrsat/ruter-connector.git
cd ruter-connector
npm install
npm run smoke   # røyktest mot Entur uten MCP-laget

Bruk med en MCP-klient

Serveren snakker MCP over stdio og fungerer med alle MCP-klienter (Claude Desktop, Claude Code, AI SDK, m.fl.):

{
  "mcpServers": {
    "ruter": {
      "command": "npx",
      "args": ["tsx", "/absolutt/sti/til/ruter-connector/src/index.ts"]
    }
  }
}

I Claude Code: claude mcp add ruter -- npx tsx /absolutt/sti/til/ruter-connector/src/index.ts

Konfigurasjon

Miljøvariabel

Standard

Beskrivelse

ET_CLIENT_NAME

fredrsat-ruter-connector

Entur ber alle konsumenter identifisere seg med en ET-Client-Name-header på formen firma-applikasjon. Sett din egen hvis du kjører dette selv.

Datakilder og lisens

Dataene er lisensiert under NLOD av Entur. Koden i dette repoet er MIT-lisensiert, se LICENSE.

Available Tools

2 tools
avgangerSanntidsavgangerA

Hent avganger fra et stoppested med sanntidsinfo: planlagt vs. forventet tid, forsinkelse i minutter og eventuelle avviksmeldinger. Svarer på «er bussen i rute?». Bruk NSR-id fra finn_stoppested (f.eks. «NSR:StopPlace:58366»). Kan filtreres på linjenummer og/eller destinasjon.

ParametersJSON Schema
NameRequiredDescriptionDefault
linjeNoFiltrer på linjenummer, f.eks. «31» eller «L2»
antallNoMaks antall avganger
tidspunktNoHent avganger fra dette tidspunktet (ISO 8601). Utelat for «nå».
destinasjonNoFiltrer på destinasjon (delvis match), f.eks. «Fornebu»
stoppested_idYesNSR-id fra finn_stoppested

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does disclose the returned content (planned vs expected times, delay in minutes, deviation messages), which implies a read-only real-time query. It does not state data freshness, upstream provider dependency, or what happens on an unrecognized NSR-id, so the behavioral picture is only partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four compact sentences with the core purpose first, then the use-case framing, then the id prerequisite, then the optional filters. No filler, though the use-case question and filter note could be folded together slightly more tightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must convey return values, and it does name the four returned data points. All five parameters are covered by the schema, so the only remaining gap is error/edge-case behavior for an invalid stop id or an empty result set.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including the NSR-id pattern and the line/destination filters is already documented. The description reinforces the NSR-id format and confirms filters can be combined with «og/eller», but adds no semantics beyond the schema; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource («Hent avganger fra et stoppested») plus the exact payload («planlagt vs. forventet tid, forsinkelse i minutter og eventuelle avviksmeldinger»). It also names the sibling that produces the required identifier («Bruk NSR-id fra finn_stoppested»), so an agent can separate this from the lookup tool without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete triggering question («Svarer på «er bussen i rute?»») and a prerequisite (obtain the NSR-id via finn_stoppested), plus optional narrowing by line/destination. It stops short of explicit when-not guidance or describing behavior for a missing/invalid stop id.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

finn_stoppestedFinn stoppestedA

Søk etter holdeplass/stasjon i Norge etter navn (f.eks. «Jernbanetorget» eller «Nydalen»). Returnerer NSR-id-er som brukes i avganger-verktøyet. Bruk alltid dette først hvis du ikke kjenner id-en.

ParametersJSON Schema
NameRequiredDescriptionDefault
navnYesNavn på holdeplass eller stasjon, f.eks. «Majorstuen»
antallNoMaks antall treff

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses the key downstream contract (returns NSR-ids consumed by avganger) but doesn't state pagination/limit behavior or exact return shape beyond ids. Good but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core action, examples, return contract, and usage rule. No waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a simple 2-param lookup with full schema coverage; the description covers purpose, return semantics, and sequencing with the sibling. Lacks only explicit note on what happens with no matches.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline 3. The description gives example name values matching the 'navn' param, but adds nothing about 'antall' beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource in Norwegian ('Søk etter holdeplass/stasjon i Norge etter navn') and gives concrete examples. Clearly distinguishes itself from the sibling 'avganger' by explaining it returns NSR-ids used by that tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Bruk alltid dette først hvis du ikke kjenner id-en' (always use this first if you don't know the id), naming the exact condition and the downstream alternative. Full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedavganger
    • First observedfinn_stoppested

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools serve clearly distinct purposes: one searches for stops by name, the other retrieves departures for a given stop. There is no overlap or ambiguity in their intended use.

Naming Consistency3/5

The names follow mixed conventions: 'finn_stoppested' is a verb+noun phrase, while 'avganger' is a noun. This inconsistency makes the pattern less predictable, though both are descriptive.

Tool Count3/5

Two tools is borderline thin for a transit connector. While they cover a basic workflow (find stop, get departures), the server name suggests a broader API surface that is not represented.

Completeness3/5

The core workflow of finding a stop and checking departures is covered, but notable gaps exist such as journey planning, line information, and location-based stop lookup, which are typical for a Ruter connector.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Provides real-time Transport for London journey data, including routes, alerts, and disruptions, allowing AI assistants to search journeys and get station information.
    1
    24
    4
    ISC
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides real-time Belgian rail (SNCB/NMBS) data via the iRail API, enabling AI agents to query train schedules and live information.
    5
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides access to Norway's nationwide public transport data (all modes) via the Entur API, enabling queries about routes, stops, and departures through natural language.
    6
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables querying Norwegian traffic messages (roadworks, closures, detours) from Statens vegvesen, filtered by route and time window. Supports both current and future travel times, with tools for route-based and general searches.
    3
    MIT