Singapore LTA DataMall MCP Server
Access real-time public transit information including bus arrivals, train service alerts, and station crowding levels in Singapore. Check live parking availability and monitor expressway travel times or traffic incidents for smoother commutes. Plan journeys more effectively using forecasted crowd levels and up-to-the-minute road updates. This MCP is an enhanced fork of arjunkmrm/lta-mcp, rebuilt for self-hosted VPS deployment with zero-friction onboarding.
Ask AI about Singapore LTA DataMall MCP Server
Powered by Claude Β· Grounded in docs
I know everything about Singapore LTA DataMall MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Singapore LTA DataMall MCP Server
π Access Singapore's real-time transport data through AI assistants β bus arrivals, train crowding, traffic incidents, and more!
This is an enhanced fork of arjunkmrm/lta-mcp, rebuilt for self-hosted VPS deployment with zero-friction onboarding β no API key required to get started!
β¨ Features
- π No API Key Required β Start using immediately with the server's default quota
- π Remote Access β Connect from any MCP client via HTTPS (not just local stdio)
- π One-Line Setup β Just add the URL to your MCP client config
- π Real-Time Data β Bus arrivals, train crowding, traffic incidents, carpark availability
- π Auto-Deployment β Push to GitHub, automatically deploys to VPS
π Quick Start
Step 1: Add to Your MCP Client
Copy this configuration to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"lta-datamall": {
"transport": "streamable-http",
"url": "https://mcp.techmavie.digital/ltadatamallsg/mcp"
}
}
}
Cursor/Windsurf (MCP settings):
{
"lta-datamall": {
"transport": "streamable-http",
"url": "https://mcp.techmavie.digital/ltadatamallsg/mcp"
}
}
Step 2: Start Asking!
Once configured, you can ask your AI assistant things like:
- "When is the next bus arriving at Marsiling Mall?" (the AI will look up the bus stop code automatically)
- "When is bus 143 arriving at bus stop 83139?"
- "How crowded is the North-South Line right now?"
- "Are there any train service disruptions?"
- "Show me traffic incidents on the expressways"
- "What's the carpark availability near Orchard?"
π Using Your Own API Key (Optional)
By default, this server uses a shared LTA DataMall API key for convenience. To avoid rate limiting during heavy usage, you can register your own key via the MCP Key Service:
- Visit mcpkeys.techmavie.digital and register your LTA DataMall API key
- You'll receive a
usr_XXXXXXXXkey - Use it in your MCP client config:
{
"mcpServers": {
"lta-datamall": {
"transport": "streamable-http",
"url": "https://mcp.techmavie.digital/ltadatamallsg/mcp/usr_YOUR_KEY_HERE"
}
}
}
Alternatively, use the query parameter format: /mcp?api_key=usr_YOUR_KEY_HERE
Note: Registering an LTA API key is optional even with the key service β you can register without one and still use the server's default quota.
How to Get Your Own LTA DataMall API Key
- Visit LTA DataMall
- Click "Request for API Access" and fill in the provided form, then hit Submit button.
- Once approved, find your API key in the email sent to you.
- Register it at mcpkeys.techmavie.digital
π οΈ Available Tools
This MCP server provides 8 tools for accessing Singapore transport data:
| Tool | Description | Update Frequency |
|---|---|---|
bus_stop_search | Look up bus stop codes by name, road, or landmark | Cached (24h) |
bus_arrival | Real-time bus arrival times, locations & crowding | Real-time |
station_crowding | MRT/LRT station crowdedness levels | Every 10 min |
station_crowd_forecast | Predicted station crowding (30-min intervals) | Periodic |
train_alerts | Service disruptions & shuttle bus info | On change |
carpark_availability | HDB, LTA & URA carpark lot availability | Every 1 min |
travel_times | Expressway travel time estimates | Every 5 min |
traffic_incidents | Accidents, roadworks & heavy traffic | Every 2 min |
Tool Details
π bus_stop_search
Search for bus stop codes by name, road, or landmark. Use this to find the 5-digit bus stop code needed for bus_arrival.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | β | Search query (e.g., "Marsiling Mall", "Orchard", "Victoria St") |
limit | number | β | Max results to return (default: 10, max: 20) |
The bus stop database (~5,500 stops) is loaded on first search and cached for 24 hours.
π bus_arrival
Get real-time bus arrival information for any bus stop in Singapore.
| Parameter | Type | Required | Description |
|---|---|---|---|
busStopCode | string | β | 5-digit bus stop code (e.g., "83139") |
serviceNo | string | β | Filter by specific bus service (e.g., "143") |
π station_crowding
Check how crowded MRT/LRT stations are right now.
| Parameter | Type | Required | Description |
|---|---|---|---|
trainLine | enum | β | Train line code (see below) |
π station_crowd_forecast
Get predicted crowding levels for the next few hours.
| Parameter | Type | Required | Description |
|---|---|---|---|
trainLine | enum | β | Train line code (see below) |
Supported Train Lines:
| Code | Line Name |
|---|---|
NSL | North-South Line |
EWL | East-West Line |
NEL | North-East Line |
CCL | Circle Line |
DTL | Downtown Line |
TEL | Thomson-East Coast Line |
BPL | Bukit Panjang LRT |
SLRT | Sengkang LRT |
PLRT | Punggol LRT |
CEL | Circle Line Extension |
CGL | Changi Airport Branch |
π¨ train_alerts
Get current train service alerts (no parameters required).
π
ΏοΈ carpark_availability
Get real-time carpark availability across Singapore (no parameters required).
β±οΈ travel_times
Get estimated travel times on expressways (no parameters required).
π§ traffic_incidents
Get current road incidents (no parameters required).
π What's Changed from Original
This fork introduces major improvements over the original repository:
| Aspect | Original | This Fork |
|---|---|---|
| Hosting | Smithery cloud | Self-hosted VPS |
| Transport | stdio (local only) | Streamable HTTP (remote) |
| API Key | Required | Optional (server default) |
| Deployment | Manual | Auto via GitHub Actions |
| SDK Version | 0.5.0 | 1.11.0+ |
Key Changes
-
New HTTP Server (
src/http-server.ts)- Express-based server with Streamable HTTP transport
- Session management for concurrent users
- Health check endpoint for monitoring
-
Zero-Friction Onboarding
- Server provides default API quota
- Users can start immediately without registration
- Optional personal API key via MCP Key Service
-
Bus Stop Search (
src/bus-stops-cache.ts)- Look up bus stop codes by name, road, or landmark
- Lazy-loaded cache of all ~5,500 Singapore bus stops
- No more web searching for bus stop codes
-
MCP Key Service Integration (
src/utils/key-service.ts)- Centralized credential management via
usr_xxxkeys - Per-request server/transport isolation for key-service users
- 60-second cache with request deduplication
- Centralized credential management via
-
Production Infrastructure
- Docker + Docker Compose configuration
- Nginx reverse proxy setup
- GitHub Actions auto-deployment
- Health checks and graceful shutdown
- Firebase analytics with dashboard
π₯οΈ API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Server information and available tools |
/health | GET | Health check (for monitoring) |
/mcp | POST | MCP protocol endpoint (server default key) |
/mcp/:userKey | POST | MCP protocol endpoint (key-service auth) |
/analytics | GET | Usage analytics (JSON) |
/analytics/dashboard | GET | Analytics dashboard (HTML) |
/.well-known/mcp/server-card.json | GET | Smithery server discovery |
/.well-known/mcp-config | GET | MCP client configuration schema |
π Self-Hosting Guide
Want to host your own instance? Here's what you need:
Prerequisites
- VPS with Docker & Docker Compose
- Nginx with SSL (Let's Encrypt)
- Your own LTA DataMall API key
Deployment Files
| File | Purpose |
|---|---|
Dockerfile | Container build configuration |
docker-compose.yml | Docker orchestration |
deploy/nginx-mcp.conf | Nginx reverse proxy config |
.github/workflows/deploy-vps.yml | Auto-deployment workflow |
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
LTA_API_KEY | β | β | Your LTA DataMall API key |
KEY_SERVICE_URL | β | β | MCP Key Service resolve endpoint (enables /mcp/:userKey route) |
KEY_SERVICE_TOKEN | β | β | Bearer token for key service (unique per server) |
PORT | β | 8080 | Server port |
HOST | β | 0.0.0.0 | Server host |
GitHub Secrets (for auto-deployment)
Set these in your repository settings:
VPS_HOSTβ Your VPS IP addressVPS_USERNAMEβ SSH usernameVPS_SSH_KEYβ Private SSH keyVPS_PORTβ SSH port (usually 22)LTA_API_KEYβ Your LTA DataMall API keyKEY_SERVICE_URLβ MCP Key Service resolve endpoint (optional)KEY_SERVICE_TOKENβ Bearer token for key service (optional)
π License
MIT License β See LICENSE file for details.
π Credits
- Original MCP server by @arjunkmrm
- Data provided by LTA DataMall
- Enhanced by @hithereiamaliff
