Skip to content
MCP server
Registry

transitland-mcp-server MCP Server

Global transit via Transitland v2 — operators, GTFS/GTFS-RT/GBFS feeds, routes, stops, departures.

transitland-mcp-server scores 71 (Good), licensed Apache-2.0 and written in TypeScript. It installs as a local process. It declares 8 tools. Filed under Uncategorized. GitHub shows 1 stars. Package registries report about 696 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by cyanheadsApache-2.0TypeScript1 stars
Trust score
71Good
Trust score 71 of 100, Good

Good trust

71 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: apache-2.0.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 71 comes from

22 + 20 + 5 + 10 + 4 + 10 = 71. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity5 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 5 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "cyanheads-transitland-mcp-server": {      "command": "npx",      "args": [        "-y",        "@cyanheads/transitland-mcp-server@0.3.1"      ],      "env": {        "TRANSITLAND_API_KEY": "YOUR_TRANSITLAND_API_KEY",        "TRANSITLAND_BASE_URL": "https://transit.land/api/v2/rest",        "MCP_LOG_LEVEL": "info"      }    }  }}

Environment variables

NameRequiredNotes
TRANSITLAND_API_KEYSecretRequiredTransitland v2 API key, sent as the `apikey` query parameter. Get one at the Transitland developer portal.
TRANSITLAND_BASE_URLOptionalOverride the Transitland REST API base URL (default https://transit.land/api/v2/rest).
MCP_LOG_LEVELOptionalSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_TRANSPORT_TYPEOptionalSelects the HTTP transport.
TRANSITLAND_API_KEYSecretRequiredTransitland v2 API key, sent as the `apikey` query parameter. Get one at the Transitland developer portal.
TRANSITLAND_BASE_URLOptionalOverride the Transitland REST API base URL (default https://transit.land/api/v2/rest).
MCP_HTTP_HOSTOptionalThe hostname for the HTTP server.
MCP_HTTP_PORTOptionalThe port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHOptionalThe endpoint path for the MCP server.
MCP_AUTH_MODEOptionalAuthentication mode to use: 'none', 'jwt', or 'oauth'.
MCP_LOG_LEVELOptionalSets the minimum log level for output (e.g., 'debug', 'info', 'warn').

Tools8Tool docs quality grade F

All capabilities

About

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework


Overview

Transit data for thousands of operators worldwide from Transitland, the open aggregator of GTFS, GTFS-Realtime, GBFS, and MDS feeds. Find operators and their feeds, and look up routes, stops, departures, and service alerts.

Tools

ToolDescription
transitland_find_operatorsFind transit operators/agencies by name, point/radius, bounding box, country/region, or Onestop ID
transitland_get_operatorFetch the full operator record by Onestop ID — agencies, feeds, and source tags
transitland_find_feedsFind GTFS, GTFS-Realtime, GBFS, and MDS feeds with fetch URLs, license terms, and feed version metadata
transitland_find_routesFind routes by point/radius, bounding box, operator, Onestop ID, or GTFS mode
transitland_find_stopsFind stops/stations by name, point/radius, bounding box, Onestop ID, or operator network
transitland_get_departuresStop and station departures with platform, real-time predictions, and service alerts

For geography filters, resolve place names to coordinates with openstreetmap_search_places from openstreetmap-mcp-server.

Resources

ResourceDescription
transitland://operator/{onestop_id}Operator record by Onestop ID — agencies, places served, published feeds, and source tags
transitland://feed/{onestop_id}Feed record by Onestop ID — spec, fetch URL, license terms, and freshness

All resource data is also reachable via tools (transitland_get_operator, transitland_find_feeds).

The transitland guide covers station and platform selection, overnight service days, alert scope, and feed reuse checks. It ships with plugin, npm, Docker, and MCPB installs and is available over MCP as skill://transitland-guide/SKILL.md.

Capability reference

Page limits default to 20 and are capped at 100. A larger limit is clamped with a notice. Pages that reach the limit carry truncated, shown, and cap. When cursor is present, pass it as after with the same filters. An empty continuation means the listing is exhausted.

The geography tools accept bbox in minLon,minLat,maxLon,maxLat order. Longitude must be within ±180, latitude within ±90, and each minimum must be at most its maximum. A box and a point/radius can be combined to search their intersection.

transitland_find_operators tool

  • Filter by search (name), lat+lon+radius (max 100,000m, default 1,000m), bbox, onestop_id, or adm0_name/adm1_name (country/region) — at least one required, or the call fails as no_filter
  • lat requires lon and vice versa, or the call fails as incomplete_point
  • Use an operator Onestop ID (e.g. o-9q9-bart). A numeric ID filter returns an empty page with guidance.
  • Returns each operator's Onestop ID, name, places served, published feeds (a GTFS_RT entry signals real-time departures may be available), and Wikidata QID

transitland_get_operator tool

  • Accepts an operator Onestop ID (e.g. o-9q9-bart)
  • Returns agencies (each with places served), published feeds, and source tags: Wikidata QID, US NTD ID, general Twitter/X handle
  • operator_not_found for unknown or numeric IDs

transitland_find_feeds tool

  • Supply at least one filter. Use onestop_id for one exact feed Onestop ID or positive internal feed ID as a string. Combine it with operator_onestop_id, spec (gtfs, gtfs-rt, gbfs, mds, or variants such as GTFS_RT), search, or fetch_error.
  • Operator scope applies the other filters before the limit and returns one page in operator feed order. Use an operator Onestop ID. A numeric or unknown operator key returns operator_not_found. Supplying after in this scope produces a notice.
  • Each feed includes its download or discovery URL, any GTFS-Realtime endpoints, and its selected version’s recorded fetch timestamp, hash, and calendar window.
  • License terms include redistribution, commercial use, derived products, share-alike, and attribution requirements as yes/no/unknown, plus SPDX identifier, attribution text, and attribution instructions where recorded.
  • authorizationRequired flags feeds whose download needs a separate key or registration

transitland_find_routes tool

  • Filter by lat+lon+radius (max 50,000m, default 1,000m), bbox, operator_onestop_id, onestop_id, route_type (GTFS mode integer), or search — at least one required
  • lat requires lon and vice versa, or the call fails as incomplete_point
  • onestop_id also accepts an internal route ID as a string and combines with other filters. Use the returned feedOnestopId as onestop_id in transitland_find_feeds to look up its source feed.
  • Returns short/long name, GTFS mode (bus, subway, rail, ferry, tram, …), brand color, and the operating agency's and source feed's Onestop IDs. A missing route type is null with mode unknown
  • Scheduled (GTFS static) route definitions, not live vehicle positions

transitland_find_stops tool

  • Filter by lat+lon+radius (max 10,000m, default 500m), bbox, onestop_id, served_by_onestop_ids (comma-separated operator/route Onestop IDs), or stop-name search — at least one required. Name searches need no geocoding
  • onestop_id also accepts an internal stop ID as a string and combines with other filters.
  • Returns location type, coordinates, accessibility, timezone, and source feed Onestop ID, plus separate GTFS stop ID, public stop code, platform code, and description fields when published.
  • Use a station ID or a stop's parentOnestopId for station-wide departures. A platform ID scopes the lookup to that platform.

transitland_get_departures tool

  • Find a stop or station with transitland_find_stops, then pass its Onestop ID as stop_key. For a specific feed's record, use <feedOnestopId>:<stopId>. An internal stop ID also works. An unknown stop returns stop_not_found.
  • next_seconds sets the window from now (60–86,400 seconds, default 3,600). Set service_date to start at the service day's first departure, or add start_time in GTFS HH:MM:SS to start a next_seconds window at that time. GTFS hours can exceed 23. Set use_service_window: true to allow a typical-service fallback.
  • Departures from all matching stop records and their returned descendants share one time-ordered limit. Each row lists the boarding location's Onestop ID, internal stop ID, GTFS stop ID, and source feed in platform when available.
  • A notice flags possible gaps when any station reaches Transitland's 100-child limit. Query a platform directly if it may be missing. When the departure limit cuts the results, raise it up to 100 or narrow the departure window.
  • Each departure includes its route, trip, headsign, scheduled and estimated times, delay, realtime, and scheduleRelationship. realtimeAvailable is true when a returned row carries a live prediction.
  • Top-level alerts cover the queried stop and its returned children, including entrances. A departure's optional alerts cover that trip. Stop alerts can be present on an empty departure list.

transitland://operator/{onestop_id} resource

  • Mirrors transitland_get_operator — agencies, places served, published feeds, and source tags
  • Use an operator Onestop ID (e.g. o-9q9-bart). Unknown and numeric IDs return operator_not_found.

transitland://feed/{onestop_id} resource

  • Mirrors a single-feed result from transitland_find_feeds — spec, fetch URL, real-time endpoints, license terms, and freshness
  • onestop_id accepts a feed Onestop ID (e.g. f-9q9-bart) or internal integer ID; feed_not_found when it doesn't resolve
  • Blank license fields come back as unknown/null, never inferred as permissive

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

Transitland-specific:

  • Direct HTTP client for the Transitland v2 REST API — no SDK dependency, a flat query-param contract over a handful of GET endpoints
  • Onestop IDs (o-/f-/r-/s-) are the public identifiers. Internal ID support is limited to the feed, route, stop, and departure lookups described above.
  • Feed lookups return the recorded metadata of the first version supplied by Transitland.
  • Coverage polygons and route/stop geometry are omitted; results carry a compact country/region/city place summary instead

Agent-friendly output:

  • Real-time status is explicit: per-departure realtime and scheduleRelationship, plus a top-level realtimeAvailable
  • Blank license fields come back as unknown/null, never inferred as permissive, and agents are told to confirm against the license URL before redistributing
  • Upstream pagination URLs embed the API key; only the opaque after cursor is surfaced, so the key never reaches tool output or logs
  • Empty results include a notice with query guidance or pagination status.

Getting started

Add the following to your MCP client configuration file. A Transitland API key is required — see Prerequisites for how to get one.

{
  "mcpServers": {
    "transitland-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/transitland-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "TRANSITLAND_API_KEY": "your-api-key"
      }
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "transitland-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/transitland-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "TRANSITLAND_API_KEY": "your-api-key"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "transitland-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "MCP_TRANSPORT_TYPE=stdio",
        "-e", "TRANSITLAND_API_KEY=your-api-key",
        "ghcr.io/cyanheads/transitland-mcp-server:latest"
      ]
    }
  }
}

For Streamable HTTP, set the transport and start the server:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 TRANSITLAND_API_KEY=your-api-key bun run start:http
# Server listens at http://localhost:3010/mcp

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/transitland-mcp-server.git
  1. Navigate into the directory:
cd transitland-mcp-server
  1. Install dependencies:
bun install
  1. Configure environment:
cp .env.example .env
# edit .env and set TRANSITLAND_API_KEY

Configuration

All configuration is validated at startup via Zod schemas in src/config/server-config.ts. A missing TRANSITLAND_API_KEY fails at startup with a banner naming the variable, not at the first tool call.

VariableDescriptionDefault
TRANSITLAND_API_KEYRequired. Transitland v2 API key, sent as the apikey query parameter.—
TRANSITLAND_BASE_URLTransitland REST API base URL. Override to pin a specific deployment or a self-hosted instance.https://transit.land/api/v2/rest
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for the HTTP server.3010
MCP_HTTP_ENDPOINT_PATHHTTP endpoint path where the MCP server is mounted./mcp
MCP_AUTH_MODEAuthentication mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, notice, warning, error).info
LOGS_DIRDirectory for log files (Node.js only). Relative paths resolve from the server package. Set an absolute path to store logs elsewhere.<server-root>/logs
LOG_TOOL_FAILURE_PAYLOADSLog failed calls' arguments and result, redacted by key name (secrets in free-form values remain). Size capped by LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384).false
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry instrumentation (spans, metrics, completion logs).false

See .env.example for the full list of optional overrides.

HTTP sessions are stateless by default; set MCP_SESSION_MODE to override.

Running the server

Local development

  • Build and run:

    # One-time build
    bun run rebuild
    
    # Run the built server
    bun run start:stdio
    # or
    bun run start:http
    
  • Run checks and tests:

    bun run devcheck   # Lint, format, typecheck, security, changelog sync
    bun run test       # Vitest test suite
    bun run lint:mcp   # Validate MCP definitions against spec
    

Docker

docker build -t transitland-mcp-server .
docker run --rm -e TRANSITLAND_API_KEY=your-key -p 3010:3010 transitland-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/transitland-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers tools and resources, inits the Transitland service.
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts). Six tools across operators, feeds, routes, stops, and departures.
src/mcp-server/resourcesResource definitions (*.resource.ts). Operator and feed records.
src/services/transitlandTransitland v2 REST client — HTTP, apikey injection, cursor normalization, error classification, and per-endpoint typed methods.
tests/Unit and integration tests mirroring src/.

Development guide

See CLAUDE.md / AGENTS.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools and resources via the barrels in src/mcp-server/*/definitions/index.ts
  • Wrap the Transitland API: validate raw → normalize to domain type → return output schema; never fabricate missing fields (especially license terms — blanks are unknown, not permissive)

Data & licensing

Transit data is provided by Transitland — an open registry aggregating GTFS, GTFS-Realtime, and GBFS feeds from thousands of operators worldwide. Products built on Transitland data must display the name "Transitland" with a link to transit.land/terms, clearly visible to end users.

Transitland aggregates feeds from thousands of operators, each of which may carry its own license and attribution requirements. Review the per-feed license terms at transit.land/terms and comply with each source feed's requirements before redistributing or publishing data obtained through this server.

Contributing

Issues are welcome. Run checks and tests before submitting:

bun run devcheck
bun run test

License

Apache-2.0 — see LICENSE for details.

Frequently asked questions

What is transitland-mcp-server MCP Server?

Global transit via Transitland v2 — operators, GTFS/GTFS-RT/GBFS feeds, routes, stops, departures.

How do I install transitland-mcp-server MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. transitland-mcp-server MCP Server runs locally from the npm package @cyanheads/transitland-mcp-server with the command npx -y @cyanheads/transitland-mcp-server@0.3.1.

Is transitland-mcp-server MCP Server free and open source?

Yes. transitland-mcp-server MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

What tools does transitland-mcp-server MCP Server provide?

transitland-mcp-server MCP Server provides 8 tools, including ctx.log, operator_not_found, transitland_find_feeds, and transitland_find_operators. See the full tool list for descriptions and parameters.

How is transitland-mcp-server MCP Server's trust score calculated?

transitland-mcp-server MCP Server scores 71 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server