
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
mcp-server-public-transport
Advanced tools
An MCP-compatible server for querying public transport data in Europe (UK, CH, BE).
An MCP-compatible server providing real-time public transport data across Europe.
mcp-server-public-transport is a Model Context Protocol (MCP)-compatible local server that provides access to public transport data across Europe. Currently, it integrates APIs from UK, Switzerland and Belgium, allowing you to retrieve train connections, live departures, and bus locations.
Country | API Base URL | Status |
---|---|---|
United Kingdom | https://transportapi.com | ✅ |
Switzerland | https://transport.opendata.ch | ✅ |
Belgium | https://api.irail.be | ✅ |
Feature | API Path | Status |
---|---|---|
United Kingdom | ||
Live Departures | /uk/train/station_timetables/{station_code}.json | ✅ |
Switzerland | ||
Search Connections | /connections | ✅ |
Station Lookup | /locations | ✅ |
Departure Board | /stationboard | ✅ |
Nearby Stations | /locations?x={lon}&y={lat} | ✅ |
Belgium | ||
Live Departures | /departures | ✅ |
Station Lookup | /stations | ✅ |
Nearby Stations | /stations/nearby | ✅ |
Set the following environment variables:
UK_TRANSPORT_APP_ID=your_uk_app_id
UK_TRANSPORT_API_KEY=your_uk_api_key
Add to your claude_desktop_config.json`:
{
"mcpServers": {
"mcp-server-public-transport": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/mcp-server-public-transport",
"run",
"server.py"
],
"env": {
"UK_TRANSPORT_APP_ID": "your-uk-app-id",
"UK_TRANSPORT_API_KEY": "your-uk-api-key"
}
}
}
}
Replace /ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-server-public-transport
with the actual path where you've cloned the repository.
Note: You may need to put the full path to the uv executable in the command field. You can get this by running which uv on MacOS/Linux or where uv on Windows.
Clone the repository
git clone https://github.com/mirodn/mcp-server-public-transport.git
cd mcp-server-public-transport
Install dependencies
uv sync
Set environment variables
cp .env.example .env
Run the server
uv run server.py
The project uses pytest for testing with the following commands available:
# Run all tests
make test
# Run linting
make lint
# Run code formatting
make format
The project includes a GitHub Actions workflow (.github/workflows/test.yml
) that automatically:
main
branchThe CI pipeline ensures code quality and compatibility across supported Python versions before any changes are merged.
Contributions are welcome! Please feel free to submit a Pull Request.
The package is deployed automatically to PyPI when project.version is updated in pyproject.toml
.
Follow semver for versioning.
FAQs
An MCP-compatible server for querying public transport data in Europe (UK, CH, BE).
We found that mcp-server-public-transport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.