Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

165 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenBusData MCP Server

mcp-name: io.github.AndrewAubury/openbusdata

MCP server for the UK Bus Open Data Service with rich timetable parsing, stop search, route discovery, journey planning and real-time bus tracking.

Features

  • Live API tools — query timetables, fares, disruptions, cancellations and real-time bus locations
  • Coverage tools — departures board, live ETA at a stop, filtered live buses, disruption-aware journey planning, and fares price extraction
  • Stop search — fuzzy text search across every bus stop in the UK
  • Route finder — discover all routes serving a pair of stops
  • Journey planner — "get to X by Y o'clock" with support for direct and chained multi-leg journeys
  • Live tracking — see exactly where buses are right now

Installation

Option 1: via uvx (recommended — no install needed)

uvx openbusdata-mcp

Option 2: via pip

pip install openbusdata-mcp

Option 3: via Docker (recommended for always-on deployments)

docker build -f Dockerfile.image -t openbusdata-mcp:latest .

# The named volume persists the SQLite timetable index across container
# restarts — first bootstrap downloads ~940 datasets, after that startup is
# instant with no re-download.
docker run -i --rm \
  -e OPENBUS_API_KEY \
  -v openbusdata-cache:/root/.cache/openbusdata \
  openbusdata-mcp

Configuration

Set your Bus Open Data Service API key as an environment variable:

export OPENBUS_API_KEY="your-api-key-here"

Get a free key at data.bus-data.dft.gov.uk.

Usage

With uvx (recommended)

Add to your MCP client (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "openbusdata": {
      "command": "uvx",
      "args": ["openbusdata-mcp"],
      "env": {
        "OPENBUS_API_KEY": "your-api-key-here"
      }
    }
  }
}

With pip install

{
  "mcpServers": {
    "openbusdata": {
      "command": "openbusdata-mcp",
      "env": {
        "OPENBUS_API_KEY": "your-api-key-here"
      }
    }
  }
}

With Docker

{
  "mcpServers": {
    "openbusdata": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "OPENBUS_API_KEY",
               "-v", "openbusdata-cache:/root/.cache/openbusdata",
               "openbusdata-mcp"],
      "env": {
        "OPENBUS_API_KEY": "your-api-key-here"
      }
    }
  }
}

For the full ops detail — initial bootstrap (~940 datasets), scheduled delta refreshes, key rotation and verification — see docs/RUNBOOK.md.

Development

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows

# Install in editable mode with test dependencies
pip install -e ".[dev]"

# Run the test suite
pytest

# Run server
python -m openbusdata_mcp.server

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages